@intlayer/chokidar 8.4.4 → 8.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_virtual/_rolldown/runtime.cjs +29 -0
- package/dist/cjs/_virtual/_utils_asset.cjs +98 -0
- package/dist/cjs/build.cjs +58 -1
- package/dist/cjs/buildIntlayerDictionary/buildIntlayerDictionary.cjs +62 -1
- package/dist/cjs/buildIntlayerDictionary/buildIntlayerDictionary.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/index.cjs +6 -1
- package/dist/cjs/buildIntlayerDictionary/processContentDeclaration.cjs +26 -1
- package/dist/cjs/buildIntlayerDictionary/processContentDeclaration.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/writeDynamicDictionary.cjs +107 -5
- package/dist/cjs/buildIntlayerDictionary/writeDynamicDictionary.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/writeFetchDictionary.cjs +80 -3
- package/dist/cjs/buildIntlayerDictionary/writeFetchDictionary.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/writeMergedDictionary.cjs +46 -1
- package/dist/cjs/buildIntlayerDictionary/writeMergedDictionary.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/writeRemoteDictionary.cjs +50 -1
- package/dist/cjs/buildIntlayerDictionary/writeRemoteDictionary.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/writeUnmergedDictionary.cjs +59 -1
- package/dist/cjs/buildIntlayerDictionary/writeUnmergedDictionary.cjs.map +1 -1
- package/dist/cjs/cleanOutputDir.cjs +30 -1
- package/dist/cjs/cleanOutputDir.cjs.map +1 -1
- package/dist/cjs/cleanRemovedContentDeclaration.cjs +97 -1
- package/dist/cjs/cleanRemovedContentDeclaration.cjs.map +1 -1
- package/dist/cjs/cli.cjs +35 -1
- package/dist/cjs/createDictionaryEntryPoint/createDictionaryEntryPoint.cjs +70 -1
- package/dist/cjs/createDictionaryEntryPoint/createDictionaryEntryPoint.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/generateDictionaryListContent.cjs +42 -7
- package/dist/cjs/createDictionaryEntryPoint/generateDictionaryListContent.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDictionariesPath.cjs +23 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDictionariesPath.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs +24 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.cjs +24 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs +23 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs +23 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/index.cjs +16 -1
- package/dist/cjs/createType/createModuleAugmentation.cjs +112 -9
- package/dist/cjs/createType/createModuleAugmentation.cjs.map +1 -1
- package/dist/cjs/createType/createType.cjs +29 -1
- package/dist/cjs/createType/createType.cjs.map +1 -1
- package/dist/cjs/createType/index.cjs +8 -1
- package/dist/cjs/detectFormatCommand.cjs +32 -1
- package/dist/cjs/detectFormatCommand.cjs.map +1 -1
- package/dist/cjs/fetchDistantDictionaries.cjs +51 -1
- package/dist/cjs/fetchDistantDictionaries.cjs.map +1 -1
- package/dist/cjs/filterInvalidDictionaries.cjs +52 -1
- package/dist/cjs/filterInvalidDictionaries.cjs.map +1 -1
- package/dist/cjs/formatDictionary.cjs +49 -1
- package/dist/cjs/formatDictionary.cjs.map +1 -1
- package/dist/cjs/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs +61 -7
- package/dist/cjs/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs.map +1 -1
- package/dist/cjs/getContentDeclarationFileTemplate/index.cjs +4 -1
- package/dist/cjs/handleAdditionalContentDeclarationFile.cjs +34 -1
- package/dist/cjs/handleAdditionalContentDeclarationFile.cjs.map +1 -1
- package/dist/cjs/handleContentDeclarationFileChange.cjs +49 -1
- package/dist/cjs/handleContentDeclarationFileChange.cjs.map +1 -1
- package/dist/cjs/handleContentDeclarationFileMoved.cjs +24 -1
- package/dist/cjs/handleContentDeclarationFileMoved.cjs.map +1 -1
- package/dist/cjs/handleUnlinkedContentDeclarationFile.cjs +37 -1
- package/dist/cjs/handleUnlinkedContentDeclarationFile.cjs.map +1 -1
- package/dist/cjs/init/index.cjs +284 -1
- package/dist/cjs/init/index.cjs.map +1 -1
- package/dist/cjs/init/utils/configManipulation.cjs +111 -1
- package/dist/cjs/init/utils/configManipulation.cjs.map +1 -1
- package/dist/cjs/init/utils/fileSystem.cjs +39 -1
- package/dist/cjs/init/utils/fileSystem.cjs.map +1 -1
- package/dist/cjs/init/utils/index.cjs +14 -1
- package/dist/cjs/init/utils/jsonParser.cjs +42 -3
- package/dist/cjs/init/utils/jsonParser.cjs.map +1 -1
- package/dist/cjs/init/utils/tsConfig.cjs +18 -1
- package/dist/cjs/init/utils/tsConfig.cjs.map +1 -1
- package/dist/cjs/initConfig/index.cjs +39 -1
- package/dist/cjs/initConfig/index.cjs.map +1 -1
- package/dist/cjs/installMCP/installMCP.cjs +50 -1
- package/dist/cjs/installMCP/installMCP.cjs.map +1 -1
- package/dist/cjs/installSkills/index.cjs +303 -1
- package/dist/cjs/installSkills/index.cjs.map +1 -1
- package/dist/cjs/listDictionariesPath.cjs +42 -1
- package/dist/cjs/listDictionariesPath.cjs.map +1 -1
- package/dist/cjs/listGitFiles.cjs +105 -5
- package/dist/cjs/listGitFiles.cjs.map +1 -1
- package/dist/cjs/listProjects.cjs +47 -1
- package/dist/cjs/listProjects.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/getIntlayerBundle.cjs +68 -1
- package/dist/cjs/loadDictionaries/getIntlayerBundle.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/index.cjs +14 -1
- package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs +93 -2
- package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/loadDictionaries.cjs +127 -1
- package/dist/cjs/loadDictionaries/loadDictionaries.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/loadLocalDictionaries.cjs +27 -1
- package/dist/cjs/loadDictionaries/loadLocalDictionaries.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs +61 -1
- package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/log.cjs +138 -3
- package/dist/cjs/loadDictionaries/log.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/logTypeScriptErrors.cjs +63 -2
- package/dist/cjs/loadDictionaries/logTypeScriptErrors.cjs.map +1 -1
- package/dist/cjs/logConfigDetails.cjs +39 -2
- package/dist/cjs/logConfigDetails.cjs.map +1 -1
- package/dist/cjs/prepareIntlayer.cjs +103 -1
- package/dist/cjs/prepareIntlayer.cjs.map +1 -1
- package/dist/cjs/reduceDictionaryContent/applyMask.cjs +30 -1
- package/dist/cjs/reduceDictionaryContent/applyMask.cjs.map +1 -1
- package/dist/cjs/reduceDictionaryContent/reduceDictionaryContent.cjs +12 -1
- package/dist/cjs/reduceDictionaryContent/reduceDictionaryContent.cjs.map +1 -1
- package/dist/cjs/utils/autoDecorateContent.cjs +89 -1
- package/dist/cjs/utils/autoDecorateContent.cjs.map +1 -1
- package/dist/cjs/utils/buildComponentFilesList.cjs +67 -1
- package/dist/cjs/utils/buildComponentFilesList.cjs.map +1 -1
- package/dist/cjs/utils/buildFilesList.cjs +83 -1
- package/dist/cjs/utils/buildFilesList.cjs.map +1 -1
- package/dist/cjs/utils/chunkJSON.cjs +336 -1
- package/dist/cjs/utils/chunkJSON.cjs.map +1 -1
- package/dist/cjs/utils/formatter.cjs +18 -1
- package/dist/cjs/utils/formatter.cjs.map +1 -1
- package/dist/cjs/utils/getChunk.cjs +34 -1
- package/dist/cjs/utils/getChunk.cjs.map +1 -1
- package/dist/cjs/utils/getContentExtension.cjs +29 -1
- package/dist/cjs/utils/getContentExtension.cjs.map +1 -1
- package/dist/cjs/utils/getFormatFromExtension.cjs +34 -1
- package/dist/cjs/utils/getFormatFromExtension.cjs.map +1 -1
- package/dist/cjs/utils/getPathHash.cjs +10 -1
- package/dist/cjs/utils/getPathHash.cjs.map +1 -1
- package/dist/cjs/utils/index.cjs +49 -1
- package/dist/cjs/utils/mergeChunks.cjs +28 -1
- package/dist/cjs/utils/mergeChunks.cjs.map +1 -1
- package/dist/cjs/utils/pLimit.cjs +128 -1
- package/dist/cjs/utils/pLimit.cjs.map +1 -1
- package/dist/cjs/utils/parallelize.cjs +11 -1
- package/dist/cjs/utils/parallelize.cjs.map +1 -1
- package/dist/cjs/utils/parallelizeGlobal.cjs +29 -1
- package/dist/cjs/utils/parallelizeGlobal.cjs.map +1 -1
- package/dist/cjs/utils/reduceObjectFormat.cjs +31 -1
- package/dist/cjs/utils/reduceObjectFormat.cjs.map +1 -1
- package/dist/cjs/utils/resolveObjectPromises.cjs +21 -1
- package/dist/cjs/utils/resolveObjectPromises.cjs.map +1 -1
- package/dist/cjs/utils/resolveRelativePath.cjs +21 -1
- package/dist/cjs/utils/resolveRelativePath.cjs.map +1 -1
- package/dist/cjs/utils/runOnce.cjs +95 -1
- package/dist/cjs/utils/runOnce.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/bin.cjs +54 -1
- package/dist/cjs/utils/runParallel/bin.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/bootstrap.cjs +24 -1
- package/dist/cjs/utils/runParallel/bootstrap.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/index.cjs +115 -1
- package/dist/cjs/utils/runParallel/index.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/pidTree.cjs +145 -1
- package/dist/cjs/utils/runParallel/pidTree.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/ps.cjs +49 -1
- package/dist/cjs/utils/runParallel/ps.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/runTask.cjs +154 -1
- package/dist/cjs/utils/runParallel/runTask.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/spawnPosix.cjs +59 -1
- package/dist/cjs/utils/runParallel/spawnPosix.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/spawnWin32.cjs +43 -1
- package/dist/cjs/utils/runParallel/spawnWin32.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/wmic.cjs +52 -1
- package/dist/cjs/utils/runParallel/wmic.cjs.map +1 -1
- package/dist/cjs/utils/sortAlphabetically.cjs +7 -1
- package/dist/cjs/utils/sortAlphabetically.cjs.map +1 -1
- package/dist/cjs/utils/splitTextByLine.cjs +11 -1
- package/dist/cjs/utils/splitTextByLine.cjs.map +1 -1
- package/dist/cjs/utils/verifyIdenticObjectFormat.cjs +60 -1
- package/dist/cjs/utils/verifyIdenticObjectFormat.cjs.map +1 -1
- package/dist/cjs/watcher.cjs +120 -1
- package/dist/cjs/watcher.cjs.map +1 -1
- package/dist/cjs/writeConfiguration/index.cjs +42 -1
- package/dist/cjs/writeConfiguration/index.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/detectExportedComponentName.cjs +28 -1
- package/dist/cjs/writeContentDeclaration/detectExportedComponentName.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/index.cjs +10 -1
- package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs +94 -1
- package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/transformJSFile.cjs +412 -3
- package/dist/cjs/writeContentDeclaration/transformJSFile.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/transformJSONFile.cjs +127 -2
- package/dist/cjs/writeContentDeclaration/transformJSONFile.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs +148 -1
- package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/writeJSFile.cjs +92 -1
- package/dist/cjs/writeContentDeclaration/writeJSFile.cjs.map +1 -1
- package/dist/cjs/writeFileIfChanged.cjs +50 -1
- package/dist/cjs/writeFileIfChanged.cjs.map +1 -1
- package/dist/cjs/writeJsonIfChanged.cjs +17 -1
- package/dist/cjs/writeJsonIfChanged.cjs.map +1 -1
- package/dist/esm/_virtual/_rolldown/runtime.mjs +8 -0
- package/dist/esm/_virtual/_utils_asset.mjs +97 -0
- package/dist/esm/build.mjs +25 -1
- package/dist/esm/buildIntlayerDictionary/buildIntlayerDictionary.mjs +60 -1
- package/dist/esm/buildIntlayerDictionary/buildIntlayerDictionary.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/index.mjs +4 -1
- package/dist/esm/buildIntlayerDictionary/processContentDeclaration.mjs +24 -1
- package/dist/esm/buildIntlayerDictionary/processContentDeclaration.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/writeDynamicDictionary.mjs +102 -5
- package/dist/esm/buildIntlayerDictionary/writeDynamicDictionary.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/writeFetchDictionary.mjs +76 -3
- package/dist/esm/buildIntlayerDictionary/writeFetchDictionary.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/writeMergedDictionary.mjs +44 -1
- package/dist/esm/buildIntlayerDictionary/writeMergedDictionary.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/writeRemoteDictionary.mjs +48 -1
- package/dist/esm/buildIntlayerDictionary/writeRemoteDictionary.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/writeUnmergedDictionary.mjs +56 -1
- package/dist/esm/buildIntlayerDictionary/writeUnmergedDictionary.mjs.map +1 -1
- package/dist/esm/cleanOutputDir.mjs +28 -1
- package/dist/esm/cleanOutputDir.mjs.map +1 -1
- package/dist/esm/cleanRemovedContentDeclaration.mjs +94 -1
- package/dist/esm/cleanRemovedContentDeclaration.mjs.map +1 -1
- package/dist/esm/cli.mjs +15 -1
- package/dist/esm/createDictionaryEntryPoint/createDictionaryEntryPoint.mjs +68 -1
- package/dist/esm/createDictionaryEntryPoint/createDictionaryEntryPoint.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/generateDictionaryListContent.mjs +40 -7
- package/dist/esm/createDictionaryEntryPoint/generateDictionaryListContent.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltDictionariesPath.mjs +20 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltDictionariesPath.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.mjs +21 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.mjs +21 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.mjs +20 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.mjs +20 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/index.mjs +9 -1
- package/dist/esm/createType/createModuleAugmentation.mjs +108 -9
- package/dist/esm/createType/createModuleAugmentation.mjs.map +1 -1
- package/dist/esm/createType/createType.mjs +26 -1
- package/dist/esm/createType/createType.mjs.map +1 -1
- package/dist/esm/createType/index.mjs +4 -1
- package/dist/esm/detectFormatCommand.mjs +30 -1
- package/dist/esm/detectFormatCommand.mjs.map +1 -1
- package/dist/esm/fetchDistantDictionaries.mjs +49 -1
- package/dist/esm/fetchDistantDictionaries.mjs.map +1 -1
- package/dist/esm/filterInvalidDictionaries.mjs +48 -1
- package/dist/esm/filterInvalidDictionaries.mjs.map +1 -1
- package/dist/esm/formatDictionary.mjs +44 -1
- package/dist/esm/formatDictionary.mjs.map +1 -1
- package/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs +59 -7
- package/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs.map +1 -1
- package/dist/esm/getContentDeclarationFileTemplate/index.mjs +3 -1
- package/dist/esm/handleAdditionalContentDeclarationFile.mjs +32 -1
- package/dist/esm/handleAdditionalContentDeclarationFile.mjs.map +1 -1
- package/dist/esm/handleContentDeclarationFileChange.mjs +47 -1
- package/dist/esm/handleContentDeclarationFileChange.mjs.map +1 -1
- package/dist/esm/handleContentDeclarationFileMoved.mjs +22 -1
- package/dist/esm/handleContentDeclarationFileMoved.mjs.map +1 -1
- package/dist/esm/handleUnlinkedContentDeclarationFile.mjs +35 -1
- package/dist/esm/handleUnlinkedContentDeclarationFile.mjs.map +1 -1
- package/dist/esm/init/index.mjs +281 -1
- package/dist/esm/init/index.mjs.map +1 -1
- package/dist/esm/init/utils/configManipulation.mjs +108 -1
- package/dist/esm/init/utils/configManipulation.mjs.map +1 -1
- package/dist/esm/init/utils/fileSystem.mjs +34 -1
- package/dist/esm/init/utils/fileSystem.mjs.map +1 -1
- package/dist/esm/init/utils/index.mjs +6 -1
- package/dist/esm/init/utils/jsonParser.mjs +40 -3
- package/dist/esm/init/utils/jsonParser.mjs.map +1 -1
- package/dist/esm/init/utils/tsConfig.mjs +16 -1
- package/dist/esm/init/utils/tsConfig.mjs.map +1 -1
- package/dist/esm/initConfig/index.mjs +37 -1
- package/dist/esm/initConfig/index.mjs.map +1 -1
- package/dist/esm/installMCP/installMCP.mjs +46 -1
- package/dist/esm/installMCP/installMCP.mjs.map +1 -1
- package/dist/esm/installSkills/index.mjs +295 -1
- package/dist/esm/installSkills/index.mjs.map +1 -1
- package/dist/esm/listDictionariesPath.mjs +38 -1
- package/dist/esm/listDictionariesPath.mjs.map +1 -1
- package/dist/esm/listGitFiles.mjs +100 -5
- package/dist/esm/listGitFiles.mjs.map +1 -1
- package/dist/esm/listProjects.mjs +43 -1
- package/dist/esm/listProjects.mjs.map +1 -1
- package/dist/esm/loadDictionaries/getIntlayerBundle.mjs +67 -1
- package/dist/esm/loadDictionaries/getIntlayerBundle.mjs.map +1 -1
- package/dist/esm/loadDictionaries/index.mjs +6 -1
- package/dist/esm/loadDictionaries/loadContentDeclaration.mjs +88 -2
- package/dist/esm/loadDictionaries/loadContentDeclaration.mjs.map +1 -1
- package/dist/esm/loadDictionaries/loadDictionaries.mjs +124 -1
- package/dist/esm/loadDictionaries/loadDictionaries.mjs.map +1 -1
- package/dist/esm/loadDictionaries/loadLocalDictionaries.mjs +25 -1
- package/dist/esm/loadDictionaries/loadLocalDictionaries.mjs.map +1 -1
- package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs +58 -1
- package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs.map +1 -1
- package/dist/esm/loadDictionaries/log.mjs +134 -3
- package/dist/esm/loadDictionaries/log.mjs.map +1 -1
- package/dist/esm/loadDictionaries/logTypeScriptErrors.mjs +61 -2
- package/dist/esm/loadDictionaries/logTypeScriptErrors.mjs.map +1 -1
- package/dist/esm/logConfigDetails.mjs +36 -2
- package/dist/esm/logConfigDetails.mjs.map +1 -1
- package/dist/esm/prepareIntlayer.mjs +99 -1
- package/dist/esm/prepareIntlayer.mjs.map +1 -1
- package/dist/esm/reduceDictionaryContent/applyMask.mjs +28 -1
- package/dist/esm/reduceDictionaryContent/applyMask.mjs.map +1 -1
- package/dist/esm/reduceDictionaryContent/reduceDictionaryContent.mjs +10 -1
- package/dist/esm/reduceDictionaryContent/reduceDictionaryContent.mjs.map +1 -1
- package/dist/esm/utils/autoDecorateContent.mjs +86 -1
- package/dist/esm/utils/autoDecorateContent.mjs.map +1 -1
- package/dist/esm/utils/buildComponentFilesList.mjs +64 -1
- package/dist/esm/utils/buildComponentFilesList.mjs.map +1 -1
- package/dist/esm/utils/buildFilesList.mjs +79 -1
- package/dist/esm/utils/buildFilesList.mjs.map +1 -1
- package/dist/esm/utils/chunkJSON.mjs +333 -1
- package/dist/esm/utils/chunkJSON.mjs.map +1 -1
- package/dist/esm/utils/formatter.mjs +13 -1
- package/dist/esm/utils/formatter.mjs.map +1 -1
- package/dist/esm/utils/getChunk.mjs +33 -1
- package/dist/esm/utils/getChunk.mjs.map +1 -1
- package/dist/esm/utils/getContentExtension.mjs +27 -1
- package/dist/esm/utils/getContentExtension.mjs.map +1 -1
- package/dist/esm/utils/getFormatFromExtension.mjs +31 -1
- package/dist/esm/utils/getFormatFromExtension.mjs.map +1 -1
- package/dist/esm/utils/getPathHash.mjs +7 -1
- package/dist/esm/utils/getPathHash.mjs.map +1 -1
- package/dist/esm/utils/index.mjs +22 -1
- package/dist/esm/utils/mergeChunks.mjs +26 -1
- package/dist/esm/utils/mergeChunks.mjs.map +1 -1
- package/dist/esm/utils/pLimit.mjs +125 -1
- package/dist/esm/utils/pLimit.mjs.map +1 -1
- package/dist/esm/utils/parallelize.mjs +10 -1
- package/dist/esm/utils/parallelize.mjs.map +1 -1
- package/dist/esm/utils/parallelizeGlobal.mjs +26 -1
- package/dist/esm/utils/parallelizeGlobal.mjs.map +1 -1
- package/dist/esm/utils/reduceObjectFormat.mjs +29 -1
- package/dist/esm/utils/reduceObjectFormat.mjs.map +1 -1
- package/dist/esm/utils/resolveObjectPromises.mjs +19 -1
- package/dist/esm/utils/resolveObjectPromises.mjs.map +1 -1
- package/dist/esm/utils/resolveRelativePath.mjs +19 -1
- package/dist/esm/utils/resolveRelativePath.mjs.map +1 -1
- package/dist/esm/utils/runOnce.mjs +92 -1
- package/dist/esm/utils/runOnce.mjs.map +1 -1
- package/dist/esm/utils/runParallel/bin.mjs +52 -1
- package/dist/esm/utils/runParallel/bin.mjs.map +1 -1
- package/dist/esm/utils/runParallel/bootstrap.mjs +22 -1
- package/dist/esm/utils/runParallel/bootstrap.mjs.map +1 -1
- package/dist/esm/utils/runParallel/index.mjs +113 -1
- package/dist/esm/utils/runParallel/index.mjs.map +1 -1
- package/dist/esm/utils/runParallel/pidTree.mjs +142 -1
- package/dist/esm/utils/runParallel/pidTree.mjs.map +1 -1
- package/dist/esm/utils/runParallel/ps.mjs +46 -1
- package/dist/esm/utils/runParallel/ps.mjs.map +1 -1
- package/dist/esm/utils/runParallel/runTask.mjs +152 -1
- package/dist/esm/utils/runParallel/runTask.mjs.map +1 -1
- package/dist/esm/utils/runParallel/spawnPosix.mjs +57 -1
- package/dist/esm/utils/runParallel/spawnPosix.mjs.map +1 -1
- package/dist/esm/utils/runParallel/spawnWin32.mjs +41 -1
- package/dist/esm/utils/runParallel/spawnWin32.mjs.map +1 -1
- package/dist/esm/utils/runParallel/wmic.mjs +49 -1
- package/dist/esm/utils/runParallel/wmic.mjs.map +1 -1
- package/dist/esm/utils/sortAlphabetically.mjs +5 -1
- package/dist/esm/utils/sortAlphabetically.mjs.map +1 -1
- package/dist/esm/utils/splitTextByLine.mjs +9 -1
- package/dist/esm/utils/splitTextByLine.mjs.map +1 -1
- package/dist/esm/utils/verifyIdenticObjectFormat.mjs +58 -1
- package/dist/esm/utils/verifyIdenticObjectFormat.mjs.map +1 -1
- package/dist/esm/watcher.mjs +117 -1
- package/dist/esm/watcher.mjs.map +1 -1
- package/dist/esm/writeConfiguration/index.mjs +39 -1
- package/dist/esm/writeConfiguration/index.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/detectExportedComponentName.mjs +26 -1
- package/dist/esm/writeContentDeclaration/detectExportedComponentName.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/index.mjs +6 -1
- package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs +91 -1
- package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/transformJSFile.mjs +407 -3
- package/dist/esm/writeContentDeclaration/transformJSFile.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/transformJSONFile.mjs +124 -2
- package/dist/esm/writeContentDeclaration/transformJSONFile.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs +146 -1
- package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/writeJSFile.mjs +90 -1
- package/dist/esm/writeContentDeclaration/writeJSFile.mjs.map +1 -1
- package/dist/esm/writeFileIfChanged.mjs +48 -1
- package/dist/esm/writeFileIfChanged.mjs.map +1 -1
- package/dist/esm/writeJsonIfChanged.mjs +16 -1
- package/dist/esm/writeJsonIfChanged.mjs.map +1 -1
- package/dist/types/build.d.ts +20 -20
- package/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts +25 -2
- package/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts.map +1 -0
- package/dist/types/buildIntlayerDictionary/index.d.ts +2 -2
- package/dist/types/buildIntlayerDictionary/processContentDeclaration.d.ts +11 -2
- package/dist/types/buildIntlayerDictionary/processContentDeclaration.d.ts.map +1 -0
- package/dist/types/buildIntlayerDictionary/writeDynamicDictionary.d.ts +49 -2
- package/dist/types/buildIntlayerDictionary/writeDynamicDictionary.d.ts.map +1 -0
- package/dist/types/buildIntlayerDictionary/writeFetchDictionary.d.ts +1 -1
- package/dist/types/buildIntlayerDictionary/writeFetchDictionary.d.ts.map +1 -1
- package/dist/types/buildIntlayerDictionary/writeMergedDictionary.d.ts +30 -2
- package/dist/types/buildIntlayerDictionary/writeMergedDictionary.d.ts.map +1 -0
- package/dist/types/buildIntlayerDictionary/writeUnmergedDictionary.d.ts +34 -2
- package/dist/types/buildIntlayerDictionary/writeUnmergedDictionary.d.ts.map +1 -0
- package/dist/types/cli.d.ts +6 -6
- package/dist/types/createDictionaryEntryPoint/createDictionaryEntryPoint.d.ts +14 -2
- package/dist/types/createDictionaryEntryPoint/createDictionaryEntryPoint.d.ts.map +1 -0
- package/dist/types/createDictionaryEntryPoint/generateDictionaryListContent.d.ts +10 -2
- package/dist/types/createDictionaryEntryPoint/generateDictionaryListContent.d.ts.map +1 -0
- package/dist/types/createDictionaryEntryPoint/getBuiltDictionariesPath.d.ts +10 -2
- package/dist/types/createDictionaryEntryPoint/getBuiltDictionariesPath.d.ts.map +1 -0
- package/dist/types/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.d.ts +10 -2
- package/dist/types/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.d.ts.map +1 -0
- package/dist/types/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.d.ts +10 -2
- package/dist/types/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.d.ts.map +1 -0
- package/dist/types/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.d.ts +10 -2
- package/dist/types/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.d.ts.map +1 -0
- package/dist/types/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.d.ts +10 -2
- package/dist/types/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.d.ts.map +1 -0
- package/dist/types/createDictionaryEntryPoint/index.d.ts +7 -7
- package/dist/types/createType/createModuleAugmentation.d.ts +9 -2
- package/dist/types/createType/createModuleAugmentation.d.ts.map +1 -0
- package/dist/types/createType/createType.d.ts +12 -2
- package/dist/types/createType/createType.d.ts.map +1 -0
- package/dist/types/createType/index.d.ts +2 -2
- package/dist/types/fetchDistantDictionaries.d.ts +1 -1
- package/dist/types/fetchDistantDictionaries.d.ts.map +1 -1
- package/dist/types/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.d.ts +7 -2
- package/dist/types/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.d.ts.map +1 -0
- package/dist/types/getContentDeclarationFileTemplate/index.d.ts +1 -1
- package/dist/types/loadDictionaries/index.d.ts +4 -4
- package/dist/types/loadDictionaries/loadContentDeclaration.d.ts +12 -2
- package/dist/types/loadDictionaries/loadContentDeclaration.d.ts.map +1 -0
- package/dist/types/loadDictionaries/loadDictionaries.d.ts +23 -2
- package/dist/types/loadDictionaries/loadDictionaries.d.ts.map +1 -0
- package/dist/types/loadDictionaries/loadLocalDictionaries.d.ts +8 -2
- package/dist/types/loadDictionaries/loadLocalDictionaries.d.ts.map +1 -0
- package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts +15 -2
- package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts.map +1 -0
- package/dist/types/loadDictionaries/log.d.ts +1 -1
- package/dist/types/utils/getFormatFromExtension.d.ts +8 -2
- package/dist/types/utils/getFormatFromExtension.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/writeConfiguration/index.d.ts.map +1 -1
- package/dist/types/writeContentDeclaration/detectExportedComponentName.d.ts +12 -2
- package/dist/types/writeContentDeclaration/detectExportedComponentName.d.ts.map +1 -0
- package/dist/types/writeContentDeclaration/dictionaryStatus.d.ts +5 -2
- package/dist/types/writeContentDeclaration/dictionaryStatus.d.ts.map +1 -0
- package/dist/types/writeContentDeclaration/index.d.ts +5 -5
- package/dist/types/writeContentDeclaration/processContentDeclarationContent.d.ts.map +1 -1
- package/dist/types/writeContentDeclaration/transformJSFile.d.ts +11 -2
- package/dist/types/writeContentDeclaration/transformJSFile.d.ts.map +1 -0
- package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts +19 -2
- package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts.map +1 -0
- package/dist/types/writeContentDeclaration/writeJSFile.d.ts +14 -2
- package/dist/types/writeContentDeclaration/writeJSFile.d.ts.map +1 -0
- package/package.json +8 -8
- package/dist/cjs/_utils_asset-SJVy1xMD.cjs +0 -2
- package/dist/cjs/chunk-Bmb41Sf3.cjs +0 -1
- package/dist/esm/_utils_asset-4w8dPH9r.mjs +0 -2
- package/dist/esm/chunk-DDgYwkfe.mjs +0 -1
- package/dist/types/buildIntlayerDictionary-C-LWgPIL.d.ts +0 -25
- package/dist/types/buildIntlayerDictionary-C-LWgPIL.d.ts.map +0 -1
- package/dist/types/createDictionaryEntryPoint-Bc5lHSiY.d.ts +0 -14
- package/dist/types/createDictionaryEntryPoint-Bc5lHSiY.d.ts.map +0 -1
- package/dist/types/createModuleAugmentation-D1eIVnjg.d.ts +0 -9
- package/dist/types/createModuleAugmentation-D1eIVnjg.d.ts.map +0 -1
- package/dist/types/createType--rDwdg2t.d.ts +0 -12
- package/dist/types/createType--rDwdg2t.d.ts.map +0 -1
- package/dist/types/detectExportedComponentName-DVXsp_FG.d.ts +0 -12
- package/dist/types/detectExportedComponentName-DVXsp_FG.d.ts.map +0 -1
- package/dist/types/dictionaryStatus-DPVO37qe.d.ts +0 -5
- package/dist/types/dictionaryStatus-DPVO37qe.d.ts.map +0 -1
- package/dist/types/generateDictionaryListContent-DAtHG6SR.d.ts +0 -10
- package/dist/types/generateDictionaryListContent-DAtHG6SR.d.ts.map +0 -1
- package/dist/types/getBuiltDictionariesPath-C4it65a1.d.ts +0 -10
- package/dist/types/getBuiltDictionariesPath-C4it65a1.d.ts.map +0 -1
- package/dist/types/getBuiltDynamicDictionariesPath-Cj9EWnjT.d.ts +0 -10
- package/dist/types/getBuiltDynamicDictionariesPath-Cj9EWnjT.d.ts.map +0 -1
- package/dist/types/getBuiltFetchDictionariesPath-1JleRhT3.d.ts +0 -10
- package/dist/types/getBuiltFetchDictionariesPath-1JleRhT3.d.ts.map +0 -1
- package/dist/types/getBuiltRemoteDictionariesPath-DHOmqNCr.d.ts +0 -10
- package/dist/types/getBuiltRemoteDictionariesPath-DHOmqNCr.d.ts.map +0 -1
- package/dist/types/getBuiltUnmergedDictionariesPath-GUmmLxTB.d.ts +0 -10
- package/dist/types/getBuiltUnmergedDictionariesPath-GUmmLxTB.d.ts.map +0 -1
- package/dist/types/getContentDeclarationFileTemplate-Dz3rnFy9.d.ts +0 -7
- package/dist/types/getContentDeclarationFileTemplate-Dz3rnFy9.d.ts.map +0 -1
- package/dist/types/getFormatFromExtension-SdXYWfPx.d.ts +0 -8
- package/dist/types/getFormatFromExtension-SdXYWfPx.d.ts.map +0 -1
- package/dist/types/loadContentDeclaration-CBMS4vkA.d.ts +0 -12
- package/dist/types/loadContentDeclaration-CBMS4vkA.d.ts.map +0 -1
- package/dist/types/loadDictionaries-BIqHwtYE.d.ts +0 -23
- package/dist/types/loadDictionaries-BIqHwtYE.d.ts.map +0 -1
- package/dist/types/loadLocalDictionaries-CNmVaw0c.d.ts +0 -8
- package/dist/types/loadLocalDictionaries-CNmVaw0c.d.ts.map +0 -1
- package/dist/types/loadRemoteDictionaries-MoITTb7W.d.ts +0 -15
- package/dist/types/loadRemoteDictionaries-MoITTb7W.d.ts.map +0 -1
- package/dist/types/processContentDeclaration-CAvrHaIT.d.ts +0 -11
- package/dist/types/processContentDeclaration-CAvrHaIT.d.ts.map +0 -1
- package/dist/types/transformJSFile-Cg0LkeLb.d.ts +0 -11
- package/dist/types/transformJSFile-Cg0LkeLb.d.ts.map +0 -1
- package/dist/types/writeContentDeclaration-XdGxj0KP.d.ts +0 -19
- package/dist/types/writeContentDeclaration-XdGxj0KP.d.ts.map +0 -1
- package/dist/types/writeDynamicDictionary-BE0mF2zZ.d.ts +0 -49
- package/dist/types/writeDynamicDictionary-BE0mF2zZ.d.ts.map +0 -1
- package/dist/types/writeJSFile-kK95jzg_.d.ts +0 -14
- package/dist/types/writeJSFile-kK95jzg_.d.ts.map +0 -1
- package/dist/types/writeMergedDictionary-CMeghcRI.d.ts +0 -30
- package/dist/types/writeMergedDictionary-CMeghcRI.d.ts.map +0 -1
- package/dist/types/writeUnmergedDictionary-Cxx51isz.d.ts +0 -34
- package/dist/types/writeUnmergedDictionary-Cxx51isz.d.ts.map +0 -1
package/dist/cjs/cli.cjs
CHANGED
|
@@ -1 +1,35 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_listProjects = require('./listProjects.cjs');
|
|
3
|
+
const require_listDictionariesPath = require('./listDictionariesPath.cjs');
|
|
4
|
+
const require_writeContentDeclaration_detectExportedComponentName = require('./writeContentDeclaration/detectExportedComponentName.cjs');
|
|
5
|
+
const require_writeContentDeclaration_transformJSFile = require('./writeContentDeclaration/transformJSFile.cjs');
|
|
6
|
+
const require_detectFormatCommand = require('./detectFormatCommand.cjs');
|
|
7
|
+
const require_getContentDeclarationFileTemplate_getContentDeclarationFileTemplate = require('./getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs');
|
|
8
|
+
const require_writeContentDeclaration_writeJSFile = require('./writeContentDeclaration/writeJSFile.cjs');
|
|
9
|
+
const require_writeContentDeclaration_writeContentDeclaration = require('./writeContentDeclaration/writeContentDeclaration.cjs');
|
|
10
|
+
const require_init_index = require('./init/index.cjs');
|
|
11
|
+
const require_installSkills_index = require('./installSkills/index.cjs');
|
|
12
|
+
const require_installMCP_installMCP = require('./installMCP/installMCP.cjs');
|
|
13
|
+
const require_listGitFiles = require('./listGitFiles.cjs');
|
|
14
|
+
const require_logConfigDetails = require('./logConfigDetails.cjs');
|
|
15
|
+
|
|
16
|
+
exports.PLATFORMS = require_installSkills_index.PLATFORMS;
|
|
17
|
+
exports.PLATFORMS_METADATA = require_installSkills_index.PLATFORMS_METADATA;
|
|
18
|
+
exports.SKILLS = require_installSkills_index.SKILLS;
|
|
19
|
+
exports.SKILLS_METADATA = require_installSkills_index.SKILLS_METADATA;
|
|
20
|
+
exports.detectExportedComponentName = require_writeContentDeclaration_detectExportedComponentName.detectExportedComponentName;
|
|
21
|
+
exports.detectFormatCommand = require_detectFormatCommand.detectFormatCommand;
|
|
22
|
+
exports.getContentDeclarationFileTemplate = require_getContentDeclarationFileTemplate_getContentDeclarationFileTemplate.getContentDeclarationFileTemplate;
|
|
23
|
+
exports.getInitialSkills = require_installSkills_index.getInitialSkills;
|
|
24
|
+
exports.initIntlayer = require_init_index.initIntlayer;
|
|
25
|
+
exports.installMCP = require_installMCP_installMCP.installMCP;
|
|
26
|
+
exports.installSkills = require_installSkills_index.installSkills;
|
|
27
|
+
exports.listDictionaries = require_listDictionariesPath.listDictionaries;
|
|
28
|
+
exports.listDictionariesWithStats = require_listDictionariesPath.listDictionariesWithStats;
|
|
29
|
+
exports.listGitFiles = require_listGitFiles.listGitFiles;
|
|
30
|
+
exports.listGitLines = require_listGitFiles.listGitLines;
|
|
31
|
+
exports.listProjects = require_listProjects.listProjects;
|
|
32
|
+
exports.logConfigDetails = require_logConfigDetails.logConfigDetails;
|
|
33
|
+
exports.transformJSFile = require_writeContentDeclaration_transformJSFile.transformJSFile;
|
|
34
|
+
exports.writeContentDeclaration = require_writeContentDeclaration_writeContentDeclaration.writeContentDeclaration;
|
|
35
|
+
exports.writeJSFile = require_writeContentDeclaration_writeJSFile.writeJSFile;
|
|
@@ -1,2 +1,71 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_utils_parallelize = require('../utils/parallelize.cjs');
|
|
4
|
+
const require_writeFileIfChanged = require('../writeFileIfChanged.cjs');
|
|
5
|
+
const require_createDictionaryEntryPoint_generateDictionaryListContent = require('./generateDictionaryListContent.cjs');
|
|
6
|
+
const require_createDictionaryEntryPoint_getBuiltDictionariesPath = require('./getBuiltDictionariesPath.cjs');
|
|
7
|
+
const require_createDictionaryEntryPoint_getBuiltDynamicDictionariesPath = require('./getBuiltDynamicDictionariesPath.cjs');
|
|
8
|
+
const require_createDictionaryEntryPoint_getBuiltFetchDictionariesPath = require('./getBuiltFetchDictionariesPath.cjs');
|
|
9
|
+
const require_createDictionaryEntryPoint_getBuiltRemoteDictionariesPath = require('./getBuiltRemoteDictionariesPath.cjs');
|
|
10
|
+
const require_createDictionaryEntryPoint_getBuiltUnmergedDictionariesPath = require('./getBuiltUnmergedDictionariesPath.cjs');
|
|
11
|
+
let node_fs_promises = require("node:fs/promises");
|
|
12
|
+
let node_path = require("node:path");
|
|
13
|
+
let _intlayer_config_node = require("@intlayer/config/node");
|
|
14
|
+
|
|
15
|
+
//#region src/createDictionaryEntryPoint/createDictionaryEntryPoint.ts
|
|
16
|
+
const writeDictionaryFiles = async (paths, fileName, importType, functionName, format, configuration = (0, _intlayer_config_node.getConfiguration)()) => {
|
|
17
|
+
const content = require_createDictionaryEntryPoint_generateDictionaryListContent.generateDictionaryListContent(await paths, functionName, importType, format, configuration);
|
|
18
|
+
const extension = format === "cjs" ? "cjs" : "mjs";
|
|
19
|
+
const { mainDir } = configuration.system;
|
|
20
|
+
await require_writeFileIfChanged.writeFileIfChanged((0, node_path.resolve)(mainDir, `${fileName}.${extension}`), content);
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* This function generates a list of dictionaries in the main directory
|
|
24
|
+
*/
|
|
25
|
+
const createDictionaryEntryPoint = async (configuration = (0, _intlayer_config_node.getConfiguration)(), options = {}) => {
|
|
26
|
+
const { formats, excludeKeys = [] } = options;
|
|
27
|
+
const outputFormats = formats ?? configuration.build.outputFormat;
|
|
28
|
+
const { mainDir } = configuration.system;
|
|
29
|
+
await (0, node_fs_promises.mkdir)(mainDir, { recursive: true });
|
|
30
|
+
await require_utils_parallelize.parallelize([
|
|
31
|
+
...outputFormats.map((format) => ({
|
|
32
|
+
paths: require_createDictionaryEntryPoint_getBuiltDictionariesPath.getBuiltDictionariesPath(configuration, excludeKeys),
|
|
33
|
+
importType: "json",
|
|
34
|
+
functionName: "getDictionaries",
|
|
35
|
+
fileName: "dictionaries",
|
|
36
|
+
format
|
|
37
|
+
})),
|
|
38
|
+
...outputFormats.map((format) => ({
|
|
39
|
+
paths: require_createDictionaryEntryPoint_getBuiltUnmergedDictionariesPath.getBuiltUnmergedDictionariesPath(configuration, excludeKeys),
|
|
40
|
+
importType: "json",
|
|
41
|
+
functionName: "getUnmergedDictionaries",
|
|
42
|
+
fileName: "unmerged_dictionaries",
|
|
43
|
+
format
|
|
44
|
+
})),
|
|
45
|
+
...outputFormats.map((format) => ({
|
|
46
|
+
paths: require_createDictionaryEntryPoint_getBuiltDynamicDictionariesPath.getBuiltDynamicDictionariesPath(configuration, format, excludeKeys),
|
|
47
|
+
importType: "javascript",
|
|
48
|
+
functionName: "getDynamicDictionaries",
|
|
49
|
+
fileName: "dynamic_dictionaries",
|
|
50
|
+
format
|
|
51
|
+
})),
|
|
52
|
+
...outputFormats.map((format) => ({
|
|
53
|
+
paths: require_createDictionaryEntryPoint_getBuiltFetchDictionariesPath.getBuiltFetchDictionariesPath(configuration, format, excludeKeys),
|
|
54
|
+
importType: "javascript",
|
|
55
|
+
functionName: "getFetchDictionaries",
|
|
56
|
+
fileName: "fetch_dictionaries",
|
|
57
|
+
format
|
|
58
|
+
})),
|
|
59
|
+
...outputFormats.map((format) => ({
|
|
60
|
+
paths: require_createDictionaryEntryPoint_getBuiltRemoteDictionariesPath.getBuiltRemoteDictionariesPath(configuration, excludeKeys),
|
|
61
|
+
importType: "json",
|
|
62
|
+
functionName: "getRemoteDictionaries",
|
|
63
|
+
fileName: "remote_dictionaries",
|
|
64
|
+
format
|
|
65
|
+
}))
|
|
66
|
+
], async ({ paths, fileName, format, functionName, importType }) => writeDictionaryFiles(paths, fileName, importType, functionName, format, configuration));
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
//#endregion
|
|
70
|
+
exports.createDictionaryEntryPoint = createDictionaryEntryPoint;
|
|
2
71
|
//# sourceMappingURL=createDictionaryEntryPoint.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDictionaryEntryPoint.cjs","names":["generateDictionaryListContent","writeFileIfChanged","parallelize","getBuiltDictionariesPath","getBuiltUnmergedDictionariesPath","getBuiltDynamicDictionariesPath","getBuiltFetchDictionariesPath","getBuiltRemoteDictionariesPath"],"sources":["../../../src/createDictionaryEntryPoint/createDictionaryEntryPoint.ts"],"sourcesContent":["import { mkdir } from 'node:fs/promises';\nimport { resolve } from 'node:path';\nimport { getConfiguration } from '@intlayer/config/node';\nimport { parallelize } from '../utils/parallelize';\nimport { writeFileIfChanged } from '../writeFileIfChanged';\nimport { generateDictionaryListContent } from './generateDictionaryListContent';\nimport { getBuiltDictionariesPath } from './getBuiltDictionariesPath';\nimport { getBuiltDynamicDictionariesPath } from './getBuiltDynamicDictionariesPath';\nimport { getBuiltFetchDictionariesPath } from './getBuiltFetchDictionariesPath';\nimport { getBuiltRemoteDictionariesPath } from './getBuiltRemoteDictionariesPath';\nimport { getBuiltUnmergedDictionariesPath } from './getBuiltUnmergedDictionariesPath';\n\nconst writeDictionaryFiles = async (\n paths: Promise<string[]>,\n fileName: string,\n importType: 'json' | 'javascript',\n functionName: string,\n format: 'cjs' | 'esm',\n configuration = getConfiguration()\n) => {\n const content = generateDictionaryListContent(\n await paths,\n functionName,\n importType,\n format,\n configuration\n );\n const extension = format === 'cjs' ? 'cjs' : 'mjs';\n\n const { mainDir } = configuration.system;\n\n await writeFileIfChanged(\n resolve(mainDir, `${fileName}.${extension}`),\n content\n );\n};\n\nexport type CreateDictionaryEntryPointOptions = {\n formats?: ('cjs' | 'esm')[];\n excludeKeys?: string[];\n};\n\n/**\n * This function generates a list of dictionaries in the main directory\n */\nexport const createDictionaryEntryPoint = async (\n configuration = getConfiguration(),\n options: CreateDictionaryEntryPointOptions = {}\n) => {\n const { formats, excludeKeys = [] } = options;\n const outputFormats = formats ?? configuration.build.outputFormat;\n const { mainDir } = configuration.system;\n\n await mkdir(mainDir, { recursive: true });\n\n const writeOperations = [\n ...outputFormats.map(\n (format) =>\n ({\n paths: getBuiltDictionariesPath(configuration, excludeKeys),\n importType: 'json',\n functionName: 'getDictionaries',\n fileName: 'dictionaries' as const,\n format,\n }) as const\n ),\n ...outputFormats.map(\n (format) =>\n ({\n paths: getBuiltUnmergedDictionariesPath(configuration, excludeKeys),\n importType: 'json',\n functionName: 'getUnmergedDictionaries',\n fileName: 'unmerged_dictionaries' as const,\n format,\n }) as const\n ),\n ...outputFormats.map(\n (format) =>\n ({\n paths: getBuiltDynamicDictionariesPath(\n configuration,\n format,\n excludeKeys\n ),\n importType: 'javascript',\n functionName: 'getDynamicDictionaries',\n fileName: 'dynamic_dictionaries' as const,\n format,\n }) as const\n ),\n ...outputFormats.map(\n (format) =>\n ({\n paths: getBuiltFetchDictionariesPath(\n configuration,\n format,\n excludeKeys\n ),\n importType: 'javascript',\n functionName: 'getFetchDictionaries',\n fileName: 'fetch_dictionaries' as const,\n format,\n }) as const\n ),\n ...outputFormats.map(\n (format) =>\n ({\n paths: getBuiltRemoteDictionariesPath(configuration, excludeKeys),\n importType: 'json',\n functionName: 'getRemoteDictionaries',\n fileName: 'remote_dictionaries' as const,\n format,\n }) as const\n ),\n ];\n\n await parallelize(\n writeOperations,\n async ({ paths, fileName, format, functionName, importType }) =>\n writeDictionaryFiles(\n paths,\n fileName,\n importType,\n functionName,\n format,\n configuration\n )\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"createDictionaryEntryPoint.cjs","names":["generateDictionaryListContent","writeFileIfChanged","parallelize","getBuiltDictionariesPath","getBuiltUnmergedDictionariesPath","getBuiltDynamicDictionariesPath","getBuiltFetchDictionariesPath","getBuiltRemoteDictionariesPath"],"sources":["../../../src/createDictionaryEntryPoint/createDictionaryEntryPoint.ts"],"sourcesContent":["import { mkdir } from 'node:fs/promises';\nimport { resolve } from 'node:path';\nimport { getConfiguration } from '@intlayer/config/node';\nimport { parallelize } from '../utils/parallelize';\nimport { writeFileIfChanged } from '../writeFileIfChanged';\nimport { generateDictionaryListContent } from './generateDictionaryListContent';\nimport { getBuiltDictionariesPath } from './getBuiltDictionariesPath';\nimport { getBuiltDynamicDictionariesPath } from './getBuiltDynamicDictionariesPath';\nimport { getBuiltFetchDictionariesPath } from './getBuiltFetchDictionariesPath';\nimport { getBuiltRemoteDictionariesPath } from './getBuiltRemoteDictionariesPath';\nimport { getBuiltUnmergedDictionariesPath } from './getBuiltUnmergedDictionariesPath';\n\nconst writeDictionaryFiles = async (\n paths: Promise<string[]>,\n fileName: string,\n importType: 'json' | 'javascript',\n functionName: string,\n format: 'cjs' | 'esm',\n configuration = getConfiguration()\n) => {\n const content = generateDictionaryListContent(\n await paths,\n functionName,\n importType,\n format,\n configuration\n );\n const extension = format === 'cjs' ? 'cjs' : 'mjs';\n\n const { mainDir } = configuration.system;\n\n await writeFileIfChanged(\n resolve(mainDir, `${fileName}.${extension}`),\n content\n );\n};\n\nexport type CreateDictionaryEntryPointOptions = {\n formats?: ('cjs' | 'esm')[];\n excludeKeys?: string[];\n};\n\n/**\n * This function generates a list of dictionaries in the main directory\n */\nexport const createDictionaryEntryPoint = async (\n configuration = getConfiguration(),\n options: CreateDictionaryEntryPointOptions = {}\n) => {\n const { formats, excludeKeys = [] } = options;\n const outputFormats = formats ?? configuration.build.outputFormat;\n const { mainDir } = configuration.system;\n\n await mkdir(mainDir, { recursive: true });\n\n const writeOperations = [\n ...outputFormats.map(\n (format) =>\n ({\n paths: getBuiltDictionariesPath(configuration, excludeKeys),\n importType: 'json',\n functionName: 'getDictionaries',\n fileName: 'dictionaries' as const,\n format,\n }) as const\n ),\n ...outputFormats.map(\n (format) =>\n ({\n paths: getBuiltUnmergedDictionariesPath(configuration, excludeKeys),\n importType: 'json',\n functionName: 'getUnmergedDictionaries',\n fileName: 'unmerged_dictionaries' as const,\n format,\n }) as const\n ),\n ...outputFormats.map(\n (format) =>\n ({\n paths: getBuiltDynamicDictionariesPath(\n configuration,\n format,\n excludeKeys\n ),\n importType: 'javascript',\n functionName: 'getDynamicDictionaries',\n fileName: 'dynamic_dictionaries' as const,\n format,\n }) as const\n ),\n ...outputFormats.map(\n (format) =>\n ({\n paths: getBuiltFetchDictionariesPath(\n configuration,\n format,\n excludeKeys\n ),\n importType: 'javascript',\n functionName: 'getFetchDictionaries',\n fileName: 'fetch_dictionaries' as const,\n format,\n }) as const\n ),\n ...outputFormats.map(\n (format) =>\n ({\n paths: getBuiltRemoteDictionariesPath(configuration, excludeKeys),\n importType: 'json',\n functionName: 'getRemoteDictionaries',\n fileName: 'remote_dictionaries' as const,\n format,\n }) as const\n ),\n ];\n\n await parallelize(\n writeOperations,\n async ({ paths, fileName, format, functionName, importType }) =>\n writeDictionaryFiles(\n paths,\n fileName,\n importType,\n functionName,\n format,\n configuration\n )\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AAYA,MAAM,uBAAuB,OAC3B,OACA,UACA,YACA,cACA,QACA,6DAAkC,KAC/B;CACH,MAAM,UAAUA,+FACd,MAAM,OACN,cACA,YACA,QACA,cACD;CACD,MAAM,YAAY,WAAW,QAAQ,QAAQ;CAE7C,MAAM,EAAE,YAAY,cAAc;AAElC,OAAMC,qEACI,SAAS,GAAG,SAAS,GAAG,YAAY,EAC5C,QACD;;;;;AAWH,MAAa,6BAA6B,OACxC,6DAAkC,EAClC,UAA6C,EAAE,KAC5C;CACH,MAAM,EAAE,SAAS,cAAc,EAAE,KAAK;CACtC,MAAM,gBAAgB,WAAW,cAAc,MAAM;CACrD,MAAM,EAAE,YAAY,cAAc;AAElC,mCAAY,SAAS,EAAE,WAAW,MAAM,CAAC;AA+DzC,OAAMC,sCA7DkB;EACtB,GAAG,cAAc,KACd,YACE;GACC,OAAOC,qFAAyB,eAAe,YAAY;GAC3D,YAAY;GACZ,cAAc;GACd,UAAU;GACV;GACD,EACJ;EACD,GAAG,cAAc,KACd,YACE;GACC,OAAOC,qGAAiC,eAAe,YAAY;GACnE,YAAY;GACZ,cAAc;GACd,UAAU;GACV;GACD,EACJ;EACD,GAAG,cAAc,KACd,YACE;GACC,OAAOC,mGACL,eACA,QACA,YACD;GACD,YAAY;GACZ,cAAc;GACd,UAAU;GACV;GACD,EACJ;EACD,GAAG,cAAc,KACd,YACE;GACC,OAAOC,+FACL,eACA,QACA,YACD;GACD,YAAY;GACZ,cAAc;GACd,UAAU;GACV;GACD,EACJ;EACD,GAAG,cAAc,KACd,YACE;GACC,OAAOC,iGAA+B,eAAe,YAAY;GACjE,YAAY;GACZ,cAAc;GACd,UAAU;GACV;GACD,EACJ;EACF,EAIC,OAAO,EAAE,OAAO,UAAU,QAAQ,cAAc,iBAC9C,qBACE,OACA,UACA,YACA,cACA,QACA,cACD,CACJ"}
|
|
@@ -1,8 +1,43 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_utils_getPathHash = require('../utils/getPathHash.cjs');
|
|
4
|
+
let node_path = require("node:path");
|
|
5
|
+
let _intlayer_config_node = require("@intlayer/config/node");
|
|
6
|
+
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
7
|
+
|
|
8
|
+
//#region src/createDictionaryEntryPoint/generateDictionaryListContent.ts
|
|
9
|
+
/**
|
|
10
|
+
* This function generates the content of the dictionary list file
|
|
11
|
+
*/
|
|
12
|
+
const generateDictionaryListContent = (dictionaries, functionName, importType, format = "esm", configuration = (0, _intlayer_config_node.getConfiguration)()) => {
|
|
13
|
+
const { mainDir } = configuration.system;
|
|
14
|
+
let content = "";
|
|
15
|
+
const dictionariesRef = dictionaries.map((dictionaryPath) => ({
|
|
16
|
+
relativePath: (0, _intlayer_config_utils.normalizePath)((0, node_path.relative)(mainDir, dictionaryPath)),
|
|
17
|
+
id: (0, node_path.basename)(dictionaryPath, (0, node_path.extname)(dictionaryPath)),
|
|
18
|
+
hash: `_${require_utils_getPathHash.getPathHash(dictionaryPath)}`
|
|
19
|
+
}));
|
|
20
|
+
dictionariesRef.forEach((dictionary) => {
|
|
21
|
+
if (format === "esm") content += `import ${dictionary.hash} from '${dictionary.relativePath}'${importType === "json" ? " with { type: 'json' }" : ""};\n`;
|
|
22
|
+
if (format === "cjs") content += `const ${dictionary.hash} = require('${dictionary.relativePath}');\n`;
|
|
23
|
+
});
|
|
24
|
+
content += "\n";
|
|
25
|
+
const formattedDictionaryMap = dictionariesRef.map((dictionary) => ` "${dictionary.id}": ${dictionary.hash}`).join(",\n");
|
|
26
|
+
content += `const dictionaries = {\n${formattedDictionaryMap}\n};\n`;
|
|
27
|
+
content += `const ${functionName} = () => dictionaries;\n`;
|
|
28
|
+
if (format === "esm") {
|
|
29
|
+
content += `\n`;
|
|
30
|
+
content += `export { ${functionName} };\n`;
|
|
31
|
+
content += `export default dictionaries;\n`;
|
|
32
|
+
}
|
|
33
|
+
if (format === "cjs") {
|
|
34
|
+
content += `\n`;
|
|
35
|
+
content += `module.exports.${functionName} = ${functionName};\n`;
|
|
36
|
+
content += `module.exports = dictionaries;\n`;
|
|
37
|
+
}
|
|
38
|
+
return content;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
exports.generateDictionaryListContent = generateDictionaryListContent;
|
|
8
43
|
//# sourceMappingURL=generateDictionaryListContent.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateDictionaryListContent.cjs","names":["getPathHash"],"sources":["../../../src/createDictionaryEntryPoint/generateDictionaryListContent.ts"],"sourcesContent":["import { basename, extname, relative } from 'node:path';\nimport { getConfiguration } from '@intlayer/config/node';\nimport { normalizePath } from '@intlayer/config/utils';\nimport { getPathHash } from '../utils/getPathHash';\n\n/**\n * This function generates the content of the dictionary list file\n */\nexport const generateDictionaryListContent = (\n dictionaries: string[],\n functionName: string,\n importType: 'json' | 'javascript',\n format: 'cjs' | 'esm' = 'esm',\n configuration = getConfiguration()\n): string => {\n const { mainDir } = configuration.system;\n\n let content = '';\n\n const dictionariesRef = dictionaries.map((dictionaryPath) => ({\n relativePath: normalizePath(relative(mainDir, dictionaryPath)),\n id: basename(dictionaryPath, extname(dictionaryPath)), // Get the base name as the dictionary id\n hash: `_${getPathHash(dictionaryPath)}`, // Get the hash of the dictionary to avoid conflicts\n }));\n\n // Import all dictionaries\n dictionariesRef.forEach((dictionary) => {\n if (format === 'esm')\n content += `import ${dictionary.hash} from '${dictionary.relativePath}'${importType === 'json' ? \" with { type: 'json' }\" : ''};\\n`;\n if (format === 'cjs')\n content += `const ${dictionary.hash} = require('${dictionary.relativePath}');\\n`;\n });\n\n content += '\\n';\n\n // Format Dictionary Map\n const formattedDictionaryMap: string = dictionariesRef\n .map((dictionary) => ` \"${dictionary.id}\": ${dictionary.hash}`)\n .join(',\\n');\n\n content += `const dictionaries = {\\n${formattedDictionaryMap}\\n};\\n`;\n content += `const ${functionName} = () => dictionaries;\\n`;\n\n if (format === 'esm') {\n content += `\\n`;\n content += `export { ${functionName} };\\n`;\n content += `export default dictionaries;\\n`;\n }\n\n if (format === 'cjs') {\n content += `\\n`;\n content += `module.exports.${functionName} = ${functionName};\\n`;\n content += `module.exports = dictionaries;\\n`;\n }\n\n return content;\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"generateDictionaryListContent.cjs","names":["getPathHash"],"sources":["../../../src/createDictionaryEntryPoint/generateDictionaryListContent.ts"],"sourcesContent":["import { basename, extname, relative } from 'node:path';\nimport { getConfiguration } from '@intlayer/config/node';\nimport { normalizePath } from '@intlayer/config/utils';\nimport { getPathHash } from '../utils/getPathHash';\n\n/**\n * This function generates the content of the dictionary list file\n */\nexport const generateDictionaryListContent = (\n dictionaries: string[],\n functionName: string,\n importType: 'json' | 'javascript',\n format: 'cjs' | 'esm' = 'esm',\n configuration = getConfiguration()\n): string => {\n const { mainDir } = configuration.system;\n\n let content = '';\n\n const dictionariesRef = dictionaries.map((dictionaryPath) => ({\n relativePath: normalizePath(relative(mainDir, dictionaryPath)),\n id: basename(dictionaryPath, extname(dictionaryPath)), // Get the base name as the dictionary id\n hash: `_${getPathHash(dictionaryPath)}`, // Get the hash of the dictionary to avoid conflicts\n }));\n\n // Import all dictionaries\n dictionariesRef.forEach((dictionary) => {\n if (format === 'esm')\n content += `import ${dictionary.hash} from '${dictionary.relativePath}'${importType === 'json' ? \" with { type: 'json' }\" : ''};\\n`;\n if (format === 'cjs')\n content += `const ${dictionary.hash} = require('${dictionary.relativePath}');\\n`;\n });\n\n content += '\\n';\n\n // Format Dictionary Map\n const formattedDictionaryMap: string = dictionariesRef\n .map((dictionary) => ` \"${dictionary.id}\": ${dictionary.hash}`)\n .join(',\\n');\n\n content += `const dictionaries = {\\n${formattedDictionaryMap}\\n};\\n`;\n content += `const ${functionName} = () => dictionaries;\\n`;\n\n if (format === 'esm') {\n content += `\\n`;\n content += `export { ${functionName} };\\n`;\n content += `export default dictionaries;\\n`;\n }\n\n if (format === 'cjs') {\n content += `\\n`;\n content += `module.exports.${functionName} = ${functionName};\\n`;\n content += `module.exports = dictionaries;\\n`;\n }\n\n return content;\n};\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,iCACX,cACA,cACA,YACA,SAAwB,OACxB,6DAAkC,KACvB;CACX,MAAM,EAAE,YAAY,cAAc;CAElC,IAAI,UAAU;CAEd,MAAM,kBAAkB,aAAa,KAAK,oBAAoB;EAC5D,gFAAqC,SAAS,eAAe,CAAC;EAC9D,4BAAa,uCAAwB,eAAe,CAAC;EACrD,MAAM,IAAIA,sCAAY,eAAe;EACtC,EAAE;AAGH,iBAAgB,SAAS,eAAe;AACtC,MAAI,WAAW,MACb,YAAW,UAAU,WAAW,KAAK,SAAS,WAAW,aAAa,GAAG,eAAe,SAAS,2BAA2B,GAAG;AACjI,MAAI,WAAW,MACb,YAAW,SAAS,WAAW,KAAK,cAAc,WAAW,aAAa;GAC5E;AAEF,YAAW;CAGX,MAAM,yBAAiC,gBACpC,KAAK,eAAe,MAAM,WAAW,GAAG,KAAK,WAAW,OAAO,CAC/D,KAAK,MAAM;AAEd,YAAW,2BAA2B,uBAAuB;AAC7D,YAAW,SAAS,aAAa;AAEjC,KAAI,WAAW,OAAO;AACpB,aAAW;AACX,aAAW,YAAY,aAAa;AACpC,aAAW;;AAGb,KAAI,WAAW,OAAO;AACpB,aAAW;AACX,aAAW,kBAAkB,aAAa,KAAK,aAAa;AAC5D,aAAW;;AAGb,QAAO"}
|
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
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 fast_glob = require("fast-glob");
|
|
5
|
+
fast_glob = require_runtime.__toESM(fast_glob);
|
|
6
|
+
let node_fs = require("node:fs");
|
|
7
|
+
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
8
|
+
|
|
9
|
+
//#region src/createDictionaryEntryPoint/getBuiltDictionariesPath.ts
|
|
10
|
+
/**
|
|
11
|
+
* This function generates a list of dictionaries in the main directory
|
|
12
|
+
*/
|
|
13
|
+
const getBuiltDictionariesPath = async (configuration, excludeKeys = []) => {
|
|
14
|
+
const { dictionariesDir, mainDir } = configuration.system;
|
|
15
|
+
if (!(0, node_fs.existsSync)(mainDir)) (0, node_fs.mkdirSync)(mainDir, { recursive: true });
|
|
16
|
+
return (await (0, fast_glob.default)(`${(0, _intlayer_config_utils.normalizePath)(dictionariesDir)}/**/*.json`)).filter((path) => {
|
|
17
|
+
const key = (0, node_path.basename)(path, ".json");
|
|
18
|
+
return !excludeKeys.includes(key);
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
exports.getBuiltDictionariesPath = getBuiltDictionariesPath;
|
|
2
24
|
//# sourceMappingURL=getBuiltDictionariesPath.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBuiltDictionariesPath.cjs","names":[],"sources":["../../../src/createDictionaryEntryPoint/getBuiltDictionariesPath.ts"],"sourcesContent":["import { existsSync, mkdirSync } from 'node:fs';\nimport { basename } from 'node:path';\nimport { normalizePath } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport fg from 'fast-glob';\n\n/**\n * This function generates a list of dictionaries in the main directory\n */\nexport const getBuiltDictionariesPath = async (\n configuration: IntlayerConfig,\n excludeKeys: string[] = []\n) => {\n const { dictionariesDir, mainDir } = configuration.system;\n\n // Create main directory if it doesn't exist\n if (!existsSync(mainDir)) {\n mkdirSync(mainDir, { recursive: true });\n }\n\n const dictionariesPath: string[] = await fg(\n `${normalizePath(dictionariesDir)}/**/*.json`\n );\n\n return dictionariesPath.filter((path) => {\n const key = basename(path, '.json');\n return !excludeKeys.includes(key);\n });\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getBuiltDictionariesPath.cjs","names":[],"sources":["../../../src/createDictionaryEntryPoint/getBuiltDictionariesPath.ts"],"sourcesContent":["import { existsSync, mkdirSync } from 'node:fs';\nimport { basename } from 'node:path';\nimport { normalizePath } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport fg from 'fast-glob';\n\n/**\n * This function generates a list of dictionaries in the main directory\n */\nexport const getBuiltDictionariesPath = async (\n configuration: IntlayerConfig,\n excludeKeys: string[] = []\n) => {\n const { dictionariesDir, mainDir } = configuration.system;\n\n // Create main directory if it doesn't exist\n if (!existsSync(mainDir)) {\n mkdirSync(mainDir, { recursive: true });\n }\n\n const dictionariesPath: string[] = await fg(\n `${normalizePath(dictionariesDir)}/**/*.json`\n );\n\n return dictionariesPath.filter((path) => {\n const key = basename(path, '.json');\n return !excludeKeys.includes(key);\n });\n};\n"],"mappings":";;;;;;;;;;;;AASA,MAAa,2BAA2B,OACtC,eACA,cAAwB,EAAE,KACvB;CACH,MAAM,EAAE,iBAAiB,YAAY,cAAc;AAGnD,KAAI,yBAAY,QAAQ,CACtB,wBAAU,SAAS,EAAE,WAAW,MAAM,CAAC;AAOzC,SAJmC,6BACjC,6CAAiB,gBAAgB,CAAC,YACnC,EAEuB,QAAQ,SAAS;EACvC,MAAM,8BAAe,MAAM,QAAQ;AACnC,SAAO,CAAC,YAAY,SAAS,IAAI;GACjC"}
|
|
@@ -1,2 +1,25 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
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 fast_glob = require("fast-glob");
|
|
5
|
+
fast_glob = require_runtime.__toESM(fast_glob);
|
|
6
|
+
let node_fs = require("node:fs");
|
|
7
|
+
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
8
|
+
|
|
9
|
+
//#region src/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.ts
|
|
10
|
+
/**
|
|
11
|
+
* This function generates a list of dictionaries in the main directory
|
|
12
|
+
*/
|
|
13
|
+
const getBuiltDynamicDictionariesPath = async (configuration, format = "esm", excludeKeys = []) => {
|
|
14
|
+
const { dynamicDictionariesDir, mainDir } = configuration.system;
|
|
15
|
+
if (!(0, node_fs.existsSync)(mainDir)) (0, node_fs.mkdirSync)(mainDir, { recursive: true });
|
|
16
|
+
const extension = format === "cjs" ? "cjs" : "mjs";
|
|
17
|
+
return (await (0, fast_glob.default)(`${(0, _intlayer_config_utils.normalizePath)(dynamicDictionariesDir)}/*.${extension}`)).filter((path) => {
|
|
18
|
+
const key = (0, node_path.basename)(path, `.${extension}`);
|
|
19
|
+
return !excludeKeys.includes(key);
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
exports.getBuiltDynamicDictionariesPath = getBuiltDynamicDictionariesPath;
|
|
2
25
|
//# sourceMappingURL=getBuiltDynamicDictionariesPath.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBuiltDynamicDictionariesPath.cjs","names":[],"sources":["../../../src/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.ts"],"sourcesContent":["import { existsSync, mkdirSync } from 'node:fs';\nimport { basename } from 'node:path';\nimport { normalizePath } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport fg from 'fast-glob';\n\n/**\n * This function generates a list of dictionaries in the main directory\n */\nexport const getBuiltDynamicDictionariesPath = async (\n configuration: IntlayerConfig,\n format: 'cjs' | 'esm' = 'esm',\n excludeKeys: string[] = []\n) => {\n const { dynamicDictionariesDir, mainDir } = configuration.system;\n\n // Create main directory if it doesn't exist\n if (!existsSync(mainDir)) {\n mkdirSync(mainDir, { recursive: true });\n }\n\n const extension = format === 'cjs' ? 'cjs' : 'mjs';\n\n const dictionariesPath: string[] = await fg(\n `${normalizePath(dynamicDictionariesDir)}/*.${extension}`\n );\n\n return dictionariesPath.filter((path) => {\n const key = basename(path, `.${extension}`);\n return !excludeKeys.includes(key);\n });\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getBuiltDynamicDictionariesPath.cjs","names":[],"sources":["../../../src/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.ts"],"sourcesContent":["import { existsSync, mkdirSync } from 'node:fs';\nimport { basename } from 'node:path';\nimport { normalizePath } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport fg from 'fast-glob';\n\n/**\n * This function generates a list of dictionaries in the main directory\n */\nexport const getBuiltDynamicDictionariesPath = async (\n configuration: IntlayerConfig,\n format: 'cjs' | 'esm' = 'esm',\n excludeKeys: string[] = []\n) => {\n const { dynamicDictionariesDir, mainDir } = configuration.system;\n\n // Create main directory if it doesn't exist\n if (!existsSync(mainDir)) {\n mkdirSync(mainDir, { recursive: true });\n }\n\n const extension = format === 'cjs' ? 'cjs' : 'mjs';\n\n const dictionariesPath: string[] = await fg(\n `${normalizePath(dynamicDictionariesDir)}/*.${extension}`\n );\n\n return dictionariesPath.filter((path) => {\n const key = basename(path, `.${extension}`);\n return !excludeKeys.includes(key);\n });\n};\n"],"mappings":";;;;;;;;;;;;AASA,MAAa,kCAAkC,OAC7C,eACA,SAAwB,OACxB,cAAwB,EAAE,KACvB;CACH,MAAM,EAAE,wBAAwB,YAAY,cAAc;AAG1D,KAAI,yBAAY,QAAQ,CACtB,wBAAU,SAAS,EAAE,WAAW,MAAM,CAAC;CAGzC,MAAM,YAAY,WAAW,QAAQ,QAAQ;AAM7C,SAJmC,6BACjC,6CAAiB,uBAAuB,CAAC,KAAK,YAC/C,EAEuB,QAAQ,SAAS;EACvC,MAAM,8BAAe,MAAM,IAAI,YAAY;AAC3C,SAAO,CAAC,YAAY,SAAS,IAAI;GACjC"}
|
|
@@ -1,2 +1,25 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
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 fast_glob = require("fast-glob");
|
|
5
|
+
fast_glob = require_runtime.__toESM(fast_glob);
|
|
6
|
+
let node_fs = require("node:fs");
|
|
7
|
+
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
8
|
+
|
|
9
|
+
//#region src/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.ts
|
|
10
|
+
/**
|
|
11
|
+
* This function generates a list of dictionaries in the main directory
|
|
12
|
+
*/
|
|
13
|
+
const getBuiltFetchDictionariesPath = async (configuration, format = "esm", excludeKeys = []) => {
|
|
14
|
+
const { fetchDictionariesDir, mainDir } = configuration.system;
|
|
15
|
+
if (!(0, node_fs.existsSync)(mainDir)) (0, node_fs.mkdirSync)(mainDir, { recursive: true });
|
|
16
|
+
const extension = format === "cjs" ? "cjs" : "mjs";
|
|
17
|
+
return (await (0, fast_glob.default)(`${(0, _intlayer_config_utils.normalizePath)(fetchDictionariesDir)}/*.${extension}`)).filter((path) => {
|
|
18
|
+
const key = (0, node_path.basename)(path, `.${extension}`);
|
|
19
|
+
return !excludeKeys.includes(key);
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
exports.getBuiltFetchDictionariesPath = getBuiltFetchDictionariesPath;
|
|
2
25
|
//# sourceMappingURL=getBuiltFetchDictionariesPath.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBuiltFetchDictionariesPath.cjs","names":[],"sources":["../../../src/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.ts"],"sourcesContent":["import { existsSync, mkdirSync } from 'node:fs';\nimport { basename } from 'node:path';\nimport { normalizePath } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport fg from 'fast-glob';\n\n/**\n * This function generates a list of dictionaries in the main directory\n */\nexport const getBuiltFetchDictionariesPath = async (\n configuration: IntlayerConfig,\n format: 'cjs' | 'esm' = 'esm',\n excludeKeys: string[] = []\n) => {\n const { fetchDictionariesDir, mainDir } = configuration.system;\n\n // Create main directory if it doesn't exist\n if (!existsSync(mainDir)) {\n mkdirSync(mainDir, { recursive: true });\n }\n\n const extension = format === 'cjs' ? 'cjs' : 'mjs';\n\n const dictionariesPath: string[] = await fg(\n `${normalizePath(fetchDictionariesDir)}/*.${extension}`\n );\n\n return dictionariesPath.filter((path) => {\n const key = basename(path, `.${extension}`);\n return !excludeKeys.includes(key);\n });\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getBuiltFetchDictionariesPath.cjs","names":[],"sources":["../../../src/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.ts"],"sourcesContent":["import { existsSync, mkdirSync } from 'node:fs';\nimport { basename } from 'node:path';\nimport { normalizePath } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport fg from 'fast-glob';\n\n/**\n * This function generates a list of dictionaries in the main directory\n */\nexport const getBuiltFetchDictionariesPath = async (\n configuration: IntlayerConfig,\n format: 'cjs' | 'esm' = 'esm',\n excludeKeys: string[] = []\n) => {\n const { fetchDictionariesDir, mainDir } = configuration.system;\n\n // Create main directory if it doesn't exist\n if (!existsSync(mainDir)) {\n mkdirSync(mainDir, { recursive: true });\n }\n\n const extension = format === 'cjs' ? 'cjs' : 'mjs';\n\n const dictionariesPath: string[] = await fg(\n `${normalizePath(fetchDictionariesDir)}/*.${extension}`\n );\n\n return dictionariesPath.filter((path) => {\n const key = basename(path, `.${extension}`);\n return !excludeKeys.includes(key);\n });\n};\n"],"mappings":";;;;;;;;;;;;AASA,MAAa,gCAAgC,OAC3C,eACA,SAAwB,OACxB,cAAwB,EAAE,KACvB;CACH,MAAM,EAAE,sBAAsB,YAAY,cAAc;AAGxD,KAAI,yBAAY,QAAQ,CACtB,wBAAU,SAAS,EAAE,WAAW,MAAM,CAAC;CAGzC,MAAM,YAAY,WAAW,QAAQ,QAAQ;AAM7C,SAJmC,6BACjC,6CAAiB,qBAAqB,CAAC,KAAK,YAC7C,EAEuB,QAAQ,SAAS;EACvC,MAAM,8BAAe,MAAM,IAAI,YAAY;AAC3C,SAAO,CAAC,YAAY,SAAS,IAAI;GACjC"}
|
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
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 fast_glob = require("fast-glob");
|
|
5
|
+
fast_glob = require_runtime.__toESM(fast_glob);
|
|
6
|
+
let node_fs = require("node:fs");
|
|
7
|
+
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
8
|
+
|
|
9
|
+
//#region src/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.ts
|
|
10
|
+
/**
|
|
11
|
+
* This function generates a list of dictionaries in the main directory
|
|
12
|
+
*/
|
|
13
|
+
const getBuiltRemoteDictionariesPath = async (configuration, excludeKeys = []) => {
|
|
14
|
+
const { remoteDictionariesDir, mainDir } = configuration.system;
|
|
15
|
+
if (!(0, node_fs.existsSync)(mainDir)) (0, node_fs.mkdirSync)(mainDir, { recursive: true });
|
|
16
|
+
return fast_glob.default.sync(`${(0, _intlayer_config_utils.normalizePath)(remoteDictionariesDir)}/**/*.json`).filter((path) => {
|
|
17
|
+
const key = (0, node_path.basename)(path, ".json");
|
|
18
|
+
return !excludeKeys.includes(key);
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
exports.getBuiltRemoteDictionariesPath = getBuiltRemoteDictionariesPath;
|
|
2
24
|
//# sourceMappingURL=getBuiltRemoteDictionariesPath.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBuiltRemoteDictionariesPath.cjs","names":["fg"],"sources":["../../../src/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.ts"],"sourcesContent":["import { existsSync, mkdirSync } from 'node:fs';\nimport { basename } from 'node:path';\nimport { normalizePath } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport fg from 'fast-glob';\n\n/**\n * This function generates a list of dictionaries in the main directory\n */\nexport const getBuiltRemoteDictionariesPath = async (\n configuration: IntlayerConfig,\n excludeKeys: string[] = []\n) => {\n const { remoteDictionariesDir, mainDir } = configuration.system;\n\n // Create main directory if it doesn't exist\n if (!existsSync(mainDir)) {\n mkdirSync(mainDir, { recursive: true });\n }\n\n const dictionariesPath: string[] = fg.sync(\n `${normalizePath(remoteDictionariesDir)}/**/*.json`\n );\n\n return dictionariesPath.filter((path) => {\n const key = basename(path, '.json');\n return !excludeKeys.includes(key);\n });\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getBuiltRemoteDictionariesPath.cjs","names":["fg"],"sources":["../../../src/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.ts"],"sourcesContent":["import { existsSync, mkdirSync } from 'node:fs';\nimport { basename } from 'node:path';\nimport { normalizePath } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport fg from 'fast-glob';\n\n/**\n * This function generates a list of dictionaries in the main directory\n */\nexport const getBuiltRemoteDictionariesPath = async (\n configuration: IntlayerConfig,\n excludeKeys: string[] = []\n) => {\n const { remoteDictionariesDir, mainDir } = configuration.system;\n\n // Create main directory if it doesn't exist\n if (!existsSync(mainDir)) {\n mkdirSync(mainDir, { recursive: true });\n }\n\n const dictionariesPath: string[] = fg.sync(\n `${normalizePath(remoteDictionariesDir)}/**/*.json`\n );\n\n return dictionariesPath.filter((path) => {\n const key = basename(path, '.json');\n return !excludeKeys.includes(key);\n });\n};\n"],"mappings":";;;;;;;;;;;;AASA,MAAa,iCAAiC,OAC5C,eACA,cAAwB,EAAE,KACvB;CACH,MAAM,EAAE,uBAAuB,YAAY,cAAc;AAGzD,KAAI,yBAAY,QAAQ,CACtB,wBAAU,SAAS,EAAE,WAAW,MAAM,CAAC;AAOzC,QAJmCA,kBAAG,KACpC,6CAAiB,sBAAsB,CAAC,YACzC,CAEuB,QAAQ,SAAS;EACvC,MAAM,8BAAe,MAAM,QAAQ;AACnC,SAAO,CAAC,YAAY,SAAS,IAAI;GACjC"}
|
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
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 fast_glob = require("fast-glob");
|
|
5
|
+
fast_glob = require_runtime.__toESM(fast_glob);
|
|
6
|
+
let node_fs = require("node:fs");
|
|
7
|
+
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
8
|
+
|
|
9
|
+
//#region src/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.ts
|
|
10
|
+
/**
|
|
11
|
+
* This function generates a list of dictionaries in the main directory
|
|
12
|
+
*/
|
|
13
|
+
const getBuiltUnmergedDictionariesPath = async (configuration, excludeKeys = []) => {
|
|
14
|
+
const { unmergedDictionariesDir, mainDir } = configuration.system;
|
|
15
|
+
if (!(0, node_fs.existsSync)(mainDir)) (0, node_fs.mkdirSync)(mainDir, { recursive: true });
|
|
16
|
+
return (await (0, fast_glob.default)(`${(0, _intlayer_config_utils.normalizePath)(unmergedDictionariesDir)}/**/*.json`)).filter((path) => {
|
|
17
|
+
const key = (0, node_path.basename)(path, ".json");
|
|
18
|
+
return !excludeKeys.includes(key);
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
exports.getBuiltUnmergedDictionariesPath = getBuiltUnmergedDictionariesPath;
|
|
2
24
|
//# sourceMappingURL=getBuiltUnmergedDictionariesPath.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBuiltUnmergedDictionariesPath.cjs","names":[],"sources":["../../../src/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.ts"],"sourcesContent":["import { existsSync, mkdirSync } from 'node:fs';\nimport { basename } from 'node:path';\nimport { normalizePath } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport fg from 'fast-glob';\n\n/**\n * This function generates a list of dictionaries in the main directory\n */\nexport const getBuiltUnmergedDictionariesPath = async (\n configuration: IntlayerConfig,\n excludeKeys: string[] = []\n) => {\n const { unmergedDictionariesDir, mainDir } = configuration.system;\n\n // Create main directory if it doesn't exist\n if (!existsSync(mainDir)) {\n mkdirSync(mainDir, { recursive: true });\n }\n\n const dictionariesPath: string[] = await fg(\n `${normalizePath(unmergedDictionariesDir)}/**/*.json`\n );\n\n return dictionariesPath.filter((path) => {\n const key = basename(path, '.json');\n return !excludeKeys.includes(key);\n });\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getBuiltUnmergedDictionariesPath.cjs","names":[],"sources":["../../../src/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.ts"],"sourcesContent":["import { existsSync, mkdirSync } from 'node:fs';\nimport { basename } from 'node:path';\nimport { normalizePath } from '@intlayer/config/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport fg from 'fast-glob';\n\n/**\n * This function generates a list of dictionaries in the main directory\n */\nexport const getBuiltUnmergedDictionariesPath = async (\n configuration: IntlayerConfig,\n excludeKeys: string[] = []\n) => {\n const { unmergedDictionariesDir, mainDir } = configuration.system;\n\n // Create main directory if it doesn't exist\n if (!existsSync(mainDir)) {\n mkdirSync(mainDir, { recursive: true });\n }\n\n const dictionariesPath: string[] = await fg(\n `${normalizePath(unmergedDictionariesDir)}/**/*.json`\n );\n\n return dictionariesPath.filter((path) => {\n const key = basename(path, '.json');\n return !excludeKeys.includes(key);\n });\n};\n"],"mappings":";;;;;;;;;;;;AASA,MAAa,mCAAmC,OAC9C,eACA,cAAwB,EAAE,KACvB;CACH,MAAM,EAAE,yBAAyB,YAAY,cAAc;AAG3D,KAAI,yBAAY,QAAQ,CACtB,wBAAU,SAAS,EAAE,WAAW,MAAM,CAAC;AAOzC,SAJmC,6BACjC,6CAAiB,wBAAwB,CAAC,YAC3C,EAEuB,QAAQ,SAAS;EACvC,MAAM,8BAAe,MAAM,QAAQ;AACnC,SAAO,CAAC,YAAY,SAAS,IAAI;GACjC"}
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_createDictionaryEntryPoint_generateDictionaryListContent = require('./generateDictionaryListContent.cjs');
|
|
3
|
+
const require_createDictionaryEntryPoint_getBuiltDictionariesPath = require('./getBuiltDictionariesPath.cjs');
|
|
4
|
+
const require_createDictionaryEntryPoint_getBuiltDynamicDictionariesPath = require('./getBuiltDynamicDictionariesPath.cjs');
|
|
5
|
+
const require_createDictionaryEntryPoint_getBuiltFetchDictionariesPath = require('./getBuiltFetchDictionariesPath.cjs');
|
|
6
|
+
const require_createDictionaryEntryPoint_getBuiltRemoteDictionariesPath = require('./getBuiltRemoteDictionariesPath.cjs');
|
|
7
|
+
const require_createDictionaryEntryPoint_getBuiltUnmergedDictionariesPath = require('./getBuiltUnmergedDictionariesPath.cjs');
|
|
8
|
+
const require_createDictionaryEntryPoint_createDictionaryEntryPoint = require('./createDictionaryEntryPoint.cjs');
|
|
9
|
+
|
|
10
|
+
exports.createDictionaryEntryPoint = require_createDictionaryEntryPoint_createDictionaryEntryPoint.createDictionaryEntryPoint;
|
|
11
|
+
exports.generateDictionaryListContent = require_createDictionaryEntryPoint_generateDictionaryListContent.generateDictionaryListContent;
|
|
12
|
+
exports.getBuiltDictionariesPath = require_createDictionaryEntryPoint_getBuiltDictionariesPath.getBuiltDictionariesPath;
|
|
13
|
+
exports.getBuiltDynamicDictionariesPath = require_createDictionaryEntryPoint_getBuiltDynamicDictionariesPath.getBuiltDynamicDictionariesPath;
|
|
14
|
+
exports.getBuiltFetchDictionariesPath = require_createDictionaryEntryPoint_getBuiltFetchDictionariesPath.getBuiltFetchDictionariesPath;
|
|
15
|
+
exports.getBuiltRemoteDictionariesPath = require_createDictionaryEntryPoint_getBuiltRemoteDictionariesPath.getBuiltRemoteDictionariesPath;
|
|
16
|
+
exports.getBuiltUnmergedDictionariesPath = require_createDictionaryEntryPoint_getBuiltUnmergedDictionariesPath.getBuiltUnmergedDictionariesPath;
|
|
@@ -1,10 +1,113 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_writeFileIfChanged = require('../writeFileIfChanged.cjs');
|
|
4
|
+
const require_utils_getPathHash = require('../utils/getPathHash.cjs');
|
|
5
|
+
let node_fs_promises = require("node:fs/promises");
|
|
6
|
+
let node_path = require("node:path");
|
|
7
|
+
let fast_glob = require("fast-glob");
|
|
8
|
+
fast_glob = require_runtime.__toESM(fast_glob);
|
|
9
|
+
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
10
|
+
let zod_to_ts = require("zod-to-ts");
|
|
11
|
+
|
|
12
|
+
//#region src/createType/createModuleAugmentation.ts
|
|
13
|
+
const getTypeName = (key) => `${(0, _intlayer_config_utils.kebabCaseToCamelCase)(key)}Content`;
|
|
14
|
+
/** Returns lines like: [Locales.FRENCH]: 1; */
|
|
15
|
+
const formatLocales = (locales) => locales.map((locale) => ` "${locale}": 1;`).join("\n");
|
|
16
|
+
const zodToTsString = (schema) => {
|
|
17
|
+
if (!schema) return "any";
|
|
18
|
+
const def = schema._def ?? schema.def ?? schema;
|
|
19
|
+
switch (def.typeName ?? def.type) {
|
|
20
|
+
case "ZodString":
|
|
21
|
+
case "string": return "string";
|
|
22
|
+
case "ZodNumber":
|
|
23
|
+
case "number": return "number";
|
|
24
|
+
case "ZodBoolean":
|
|
25
|
+
case "boolean": return "boolean";
|
|
26
|
+
case "ZodNull":
|
|
27
|
+
case "null": return "null";
|
|
28
|
+
case "ZodUndefined":
|
|
29
|
+
case "undefined": return "undefined";
|
|
30
|
+
case "ZodArray":
|
|
31
|
+
case "array": return `${zodToTsString(def.type ?? def.element)}[]`;
|
|
32
|
+
case "ZodObject":
|
|
33
|
+
case "object": {
|
|
34
|
+
const shape = typeof def.shape === "function" ? def.shape() : def.shape;
|
|
35
|
+
if (!shape) return "Record<string, any>";
|
|
36
|
+
return `{\n${Object.entries(shape).map(([k, v]) => ` "${k}": ${zodToTsString(v)};`).join("\n")}\n }`;
|
|
37
|
+
}
|
|
38
|
+
case "ZodOptional":
|
|
39
|
+
case "optional": return `${zodToTsString(def.innerType ?? def.wrapped)} | undefined`;
|
|
40
|
+
case "ZodNullable":
|
|
41
|
+
case "nullable": return `${zodToTsString(def.innerType ?? def.wrapped)} | null`;
|
|
42
|
+
case "ZodUnion":
|
|
43
|
+
case "union": return (def.options ?? []).map(zodToTsString).join(" | ");
|
|
44
|
+
case "ZodIntersection":
|
|
45
|
+
case "intersection": return `${zodToTsString(def.left)} & ${zodToTsString(def.right)}`;
|
|
46
|
+
case "ZodEnum":
|
|
47
|
+
case "enum": return (def.values ?? []).map((v) => `"${v}"`).join(" | ");
|
|
48
|
+
case "ZodLiteral":
|
|
49
|
+
case "literal": {
|
|
50
|
+
const value = def.value;
|
|
51
|
+
return typeof value === "string" ? `"${value}"` : String(value);
|
|
52
|
+
}
|
|
53
|
+
default: return "any";
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
/** Generate the content of the module augmentation file */
|
|
57
|
+
const generateTypeIndexContent = (typeFiles, configuration) => {
|
|
58
|
+
const { internationalization, system, editor } = configuration;
|
|
59
|
+
const { moduleAugmentationDir } = system;
|
|
60
|
+
const { enabled } = editor;
|
|
61
|
+
const { locales, requiredLocales, strictMode } = internationalization;
|
|
62
|
+
let fileContent = "import \"intlayer\";\n";
|
|
63
|
+
const dictionariesRef = typeFiles.map((dictionaryPath) => ({
|
|
64
|
+
relativePath: `./${(0, node_path.relative)(moduleAugmentationDir, dictionaryPath)}`,
|
|
65
|
+
id: (0, node_path.basename)(dictionaryPath, (0, node_path.extname)(dictionaryPath)),
|
|
66
|
+
hash: `_${require_utils_getPathHash.getPathHash(dictionaryPath)}`
|
|
67
|
+
}));
|
|
68
|
+
for (const dictionary of dictionariesRef) fileContent += `import ${dictionary.hash} from '${dictionary.relativePath}';\n`;
|
|
69
|
+
fileContent += "\n";
|
|
70
|
+
const formattedDictionaryMap = dictionariesRef.map((dictionary) => ` "${dictionary.id}": typeof ${dictionary.hash};`).join("\n");
|
|
71
|
+
const declared = locales;
|
|
72
|
+
const requiredSanitized = requiredLocales?.length ? requiredLocales.filter((requiredLocales) => declared.includes(requiredLocales)) : declared;
|
|
73
|
+
const formattedDeclaredLocales = formatLocales(declared);
|
|
74
|
+
const formattedRequiredLocales = formatLocales(requiredSanitized);
|
|
75
|
+
const schemas = configuration.schemas ?? {};
|
|
76
|
+
const formattedSchemas = Object.entries(schemas).map(([key, schema]) => {
|
|
77
|
+
let typeStr = "any";
|
|
78
|
+
if (schema) try {
|
|
79
|
+
const { node } = (0, zod_to_ts.zodToTs)(schema, { auxiliaryTypeStore: (0, zod_to_ts.createAuxiliaryTypeStore)() });
|
|
80
|
+
if (node.kind !== 133) typeStr = (0, zod_to_ts.printNode)(node);
|
|
81
|
+
else typeStr = zodToTsString(schema);
|
|
82
|
+
} catch (_e) {
|
|
83
|
+
typeStr = zodToTsString(schema);
|
|
84
|
+
}
|
|
85
|
+
return ` "${key}": ${typeStr};`;
|
|
86
|
+
}).join("\n");
|
|
87
|
+
const strictKey = strictMode === "strict" ? "strict" : strictMode === "inclusive" ? "inclusive" : "loose";
|
|
88
|
+
/**
|
|
89
|
+
* Module augmentation that ONLY adds keys to registries.
|
|
90
|
+
* No types/aliases redefined here—avoids merge conflicts.
|
|
91
|
+
*/
|
|
92
|
+
fileContent += `declare module 'intlayer' {\n`;
|
|
93
|
+
fileContent += ` interface __DictionaryRegistry {\n${formattedDictionaryMap}\n }\n\n`;
|
|
94
|
+
fileContent += ` interface __DeclaredLocalesRegistry {\n${formattedDeclaredLocales}\n }\n\n`;
|
|
95
|
+
fileContent += ` interface __RequiredLocalesRegistry {\n${formattedRequiredLocales}\n }\n\n`;
|
|
96
|
+
fileContent += ` interface __SchemaRegistry {\n${formattedSchemas}\n }\n\n`;
|
|
97
|
+
fileContent += ` interface __StrictModeRegistry { mode: '${strictKey}' }\n\n`;
|
|
98
|
+
fileContent += ` interface __EditorRegistry { enabled : ${enabled} } \n`;
|
|
99
|
+
fileContent += `}\n`;
|
|
100
|
+
return fileContent;
|
|
101
|
+
};
|
|
102
|
+
/** Generate the index file merging all the types */
|
|
103
|
+
const createModuleAugmentation = async (configuration) => {
|
|
104
|
+
const { moduleAugmentationDir, typesDir } = configuration.system;
|
|
105
|
+
await (0, node_fs_promises.mkdir)(moduleAugmentationDir, { recursive: true });
|
|
106
|
+
const tsContent = generateTypeIndexContent(await (0, fast_glob.default)((0, _intlayer_config_utils.normalizePath)(`${typesDir}/*.ts`), { ignore: ["**/*.d.ts"] }), configuration);
|
|
107
|
+
await require_writeFileIfChanged.writeFileIfChanged((0, node_path.join)(moduleAugmentationDir, "intlayer.d.ts"), tsContent);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
//#endregion
|
|
111
|
+
exports.createModuleAugmentation = createModuleAugmentation;
|
|
112
|
+
exports.getTypeName = getTypeName;
|
|
10
113
|
//# sourceMappingURL=createModuleAugmentation.cjs.map
|