@intlayer/chokidar 8.1.2 → 8.1.3
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/assets/installSkills/skills/angular.md +3 -0
- package/dist/assets/installSkills/skills/astro.md +3 -0
- package/dist/assets/installSkills/skills/cli.md +7 -4
- package/dist/assets/installSkills/skills/config.md +3 -0
- package/dist/assets/installSkills/skills/content.md +3 -0
- package/dist/assets/installSkills/skills/next_js.md +3 -0
- package/dist/assets/installSkills/skills/preact.md +3 -2
- package/dist/assets/installSkills/skills/react.md +3 -0
- package/dist/assets/installSkills/skills/solid.md +3 -0
- package/dist/assets/installSkills/skills/svelte.md +3 -0
- package/dist/assets/installSkills/skills/usage.md +2 -0
- package/dist/assets/installSkills/skills/vue.md +3 -0
- package/dist/cjs/_virtual/_rolldown/runtime.cjs +1 -29
- package/dist/cjs/_virtual/_utils_asset.cjs +2 -98
- package/dist/cjs/build.cjs +1 -51
- package/dist/cjs/buildIntlayerDictionary/buildIntlayerDictionary.cjs +1 -53
- package/dist/cjs/buildIntlayerDictionary/buildIntlayerDictionary.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/index.cjs +1 -6
- package/dist/cjs/buildIntlayerDictionary/processContentDeclaration.cjs +1 -26
- package/dist/cjs/buildIntlayerDictionary/processContentDeclaration.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/writeDynamicDictionary.cjs +4 -78
- package/dist/cjs/buildIntlayerDictionary/writeDynamicDictionary.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/writeFetchDictionary.cjs +4 -62
- package/dist/cjs/buildIntlayerDictionary/writeFetchDictionary.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/writeMergedDictionary.cjs +1 -46
- package/dist/cjs/buildIntlayerDictionary/writeMergedDictionary.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/writeRemoteDictionary.cjs +1 -50
- package/dist/cjs/buildIntlayerDictionary/writeRemoteDictionary.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/writeUnmergedDictionary.cjs +1 -59
- package/dist/cjs/buildIntlayerDictionary/writeUnmergedDictionary.cjs.map +1 -1
- package/dist/cjs/cleanOutputDir.cjs +1 -30
- package/dist/cjs/cleanOutputDir.cjs.map +1 -1
- package/dist/cjs/cleanRemovedContentDeclaration.cjs +1 -96
- package/dist/cjs/cleanRemovedContentDeclaration.cjs.map +1 -1
- package/dist/cjs/cli.cjs +1 -21
- package/dist/cjs/createDictionaryEntryPoint/createDictionaryEntryPoint.cjs +1 -70
- package/dist/cjs/createDictionaryEntryPoint/createDictionaryEntryPoint.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/generateDictionaryListContent.cjs +7 -41
- package/dist/cjs/createDictionaryEntryPoint/generateDictionaryListContent.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDictionariesPath.cjs +1 -23
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDictionariesPath.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs +1 -24
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.cjs +1 -24
- package/dist/cjs/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs +1 -23
- package/dist/cjs/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs +1 -23
- package/dist/cjs/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/index.cjs +1 -16
- package/dist/cjs/createType/createModuleAugmentation.cjs +9 -110
- package/dist/cjs/createType/createModuleAugmentation.cjs.map +1 -1
- package/dist/cjs/createType/createType.cjs +1 -29
- package/dist/cjs/createType/createType.cjs.map +1 -1
- package/dist/cjs/createType/index.cjs +1 -8
- package/dist/cjs/fetchDistantDictionaries.cjs +1 -50
- package/dist/cjs/fetchDistantDictionaries.cjs.map +1 -1
- package/dist/cjs/filterInvalidDictionaries.cjs +1 -49
- package/dist/cjs/filterInvalidDictionaries.cjs.map +1 -1
- package/dist/cjs/formatDictionary.cjs +1 -49
- package/dist/cjs/formatDictionary.cjs.map +1 -1
- package/dist/cjs/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs +1 -39
- package/dist/cjs/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs.map +1 -1
- package/dist/cjs/handleAdditionalContentDeclarationFile.cjs +1 -34
- package/dist/cjs/handleAdditionalContentDeclarationFile.cjs.map +1 -1
- package/dist/cjs/handleContentDeclarationFileChange.cjs +1 -49
- package/dist/cjs/handleContentDeclarationFileChange.cjs.map +1 -1
- package/dist/cjs/handleContentDeclarationFileMoved.cjs +1 -24
- package/dist/cjs/handleContentDeclarationFileMoved.cjs.map +1 -1
- package/dist/cjs/handleUnlinkedContentDeclarationFile.cjs +1 -37
- package/dist/cjs/handleUnlinkedContentDeclarationFile.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -131
- package/dist/cjs/init/index.cjs +1 -242
- package/dist/cjs/init/index.cjs.map +1 -1
- package/dist/cjs/init/utils/configManipulation.cjs +1 -164
- package/dist/cjs/init/utils/configManipulation.cjs.map +1 -1
- package/dist/cjs/init/utils/fileSystem.cjs +1 -30
- package/dist/cjs/init/utils/fileSystem.cjs.map +1 -1
- package/dist/cjs/init/utils/index.cjs +1 -13
- package/dist/cjs/init/utils/jsonParser.cjs +3 -42
- package/dist/cjs/init/utils/jsonParser.cjs.map +1 -1
- package/dist/cjs/init/utils/tsConfig.cjs +1 -18
- package/dist/cjs/init/utils/tsConfig.cjs.map +1 -1
- package/dist/cjs/initConfig/index.cjs +1 -38
- package/dist/cjs/initConfig/index.cjs.map +1 -1
- package/dist/cjs/installSkills/index.cjs +1 -172
- package/dist/cjs/installSkills/index.cjs.map +1 -1
- package/dist/cjs/listDictionariesPath.cjs +1 -41
- package/dist/cjs/listDictionariesPath.cjs.map +1 -1
- package/dist/cjs/listGitFiles.cjs +5 -95
- package/dist/cjs/listGitFiles.cjs.map +1 -1
- package/dist/cjs/listProjects.cjs +1 -47
- package/dist/cjs/listProjects.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/getIntlayerBundle.cjs +1 -66
- package/dist/cjs/loadDictionaries/getIntlayerBundle.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/index.cjs +1 -12
- package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs +2 -72
- package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/loadDictionaries.cjs +1 -125
- package/dist/cjs/loadDictionaries/loadDictionaries.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/loadLocalDictionaries.cjs +1 -28
- package/dist/cjs/loadDictionaries/loadLocalDictionaries.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs +1 -61
- package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/log.cjs +3 -135
- package/dist/cjs/loadDictionaries/log.cjs.map +1 -1
- package/dist/cjs/prepareIntlayer.cjs +1 -95
- package/dist/cjs/prepareIntlayer.cjs.map +1 -1
- package/dist/cjs/reduceDictionaryContent/applyMask.cjs +1 -30
- package/dist/cjs/reduceDictionaryContent/applyMask.cjs.map +1 -1
- package/dist/cjs/reduceDictionaryContent/reduceDictionaryContent.cjs +1 -12
- package/dist/cjs/reduceDictionaryContent/reduceDictionaryContent.cjs.map +1 -1
- package/dist/cjs/transformFiles/extractDictionaryKey.cjs +1 -16
- package/dist/cjs/transformFiles/extractDictionaryKey.cjs.map +1 -1
- package/dist/cjs/transformFiles/index.cjs +1 -10
- package/dist/cjs/transformFiles/transformFiles.cjs +1 -251
- package/dist/cjs/transformFiles/transformFiles.cjs.map +1 -1
- package/dist/cjs/utils/autoDecorateContent.cjs +1 -87
- package/dist/cjs/utils/autoDecorateContent.cjs.map +1 -1
- package/dist/cjs/utils/buildFilesList.cjs +1 -50
- package/dist/cjs/utils/buildFilesList.cjs.map +1 -1
- package/dist/cjs/utils/chunkJSON.cjs +1 -336
- package/dist/cjs/utils/chunkJSON.cjs.map +1 -1
- package/dist/cjs/utils/formatter.cjs +1 -16
- package/dist/cjs/utils/formatter.cjs.map +1 -1
- package/dist/cjs/utils/getChunk.cjs +1 -34
- package/dist/cjs/utils/getChunk.cjs.map +1 -1
- package/dist/cjs/utils/getComponentTransformPattern.cjs +1 -48
- package/dist/cjs/utils/getComponentTransformPattern.cjs.map +1 -1
- package/dist/cjs/utils/getFileHash.cjs +1 -12
- package/dist/cjs/utils/getFileHash.cjs.map +1 -1
- package/dist/cjs/utils/getFormatFromExtension.cjs +1 -31
- package/dist/cjs/utils/getFormatFromExtension.cjs.map +1 -1
- package/dist/cjs/utils/index.cjs +1 -46
- package/dist/cjs/utils/pLimit.cjs +1 -128
- package/dist/cjs/utils/pLimit.cjs.map +1 -1
- package/dist/cjs/utils/parallelize.cjs +1 -11
- package/dist/cjs/utils/parallelize.cjs.map +1 -1
- package/dist/cjs/utils/parallelizeGlobal.cjs +1 -29
- package/dist/cjs/utils/parallelizeGlobal.cjs.map +1 -1
- package/dist/cjs/utils/reduceObjectFormat.cjs +1 -31
- package/dist/cjs/utils/reduceObjectFormat.cjs.map +1 -1
- package/dist/cjs/utils/resolveObjectPromises.cjs +1 -21
- package/dist/cjs/utils/resolveObjectPromises.cjs.map +1 -1
- package/dist/cjs/utils/runOnce.cjs +1 -95
- package/dist/cjs/utils/runOnce.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/bin.cjs +1 -54
- package/dist/cjs/utils/runParallel/bin.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/bootstrap.cjs +1 -24
- package/dist/cjs/utils/runParallel/bootstrap.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/index.cjs +1 -110
- package/dist/cjs/utils/runParallel/index.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/pidTree.cjs +1 -145
- package/dist/cjs/utils/runParallel/pidTree.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/ps.cjs +1 -49
- package/dist/cjs/utils/runParallel/ps.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/runTask.cjs +1 -154
- package/dist/cjs/utils/runParallel/runTask.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/spawnPosix.cjs +1 -59
- package/dist/cjs/utils/runParallel/spawnPosix.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/spawnWin32.cjs +1 -43
- package/dist/cjs/utils/runParallel/spawnWin32.cjs.map +1 -1
- package/dist/cjs/utils/runParallel/wmic.cjs +1 -52
- package/dist/cjs/utils/runParallel/wmic.cjs.map +1 -1
- package/dist/cjs/utils/sortAlphabetically.cjs +1 -7
- package/dist/cjs/utils/sortAlphabetically.cjs.map +1 -1
- package/dist/cjs/utils/splitTextByLine.cjs +1 -11
- package/dist/cjs/utils/splitTextByLine.cjs.map +1 -1
- package/dist/cjs/utils/verifyIdenticObjectFormat.cjs +1 -60
- package/dist/cjs/utils/verifyIdenticObjectFormat.cjs.map +1 -1
- package/dist/cjs/watcher.cjs +1 -95
- package/dist/cjs/watcher.cjs.map +1 -1
- package/dist/cjs/writeConfiguration/index.cjs +1 -34
- package/dist/cjs/writeConfiguration/index.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/detectExportedComponentName.cjs +1 -28
- package/dist/cjs/writeContentDeclaration/detectExportedComponentName.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/detectFormatCommand.cjs +1 -31
- package/dist/cjs/writeContentDeclaration/detectFormatCommand.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/index.cjs +1 -12
- package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs +1 -93
- package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/transformJSFile.cjs +2 -1775
- package/dist/cjs/writeContentDeclaration/transformJSFile.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/transformJSONFile.cjs +1 -77
- package/dist/cjs/writeContentDeclaration/transformJSONFile.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs +1 -123
- package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/writeJSFile.cjs +1 -71
- package/dist/cjs/writeContentDeclaration/writeJSFile.cjs.map +1 -1
- package/dist/cjs/writeFileIfChanged.cjs +1 -12
- package/dist/cjs/writeFileIfChanged.cjs.map +1 -1
- package/dist/cjs/writeJsonIfChanged.cjs +1 -17
- package/dist/cjs/writeJsonIfChanged.cjs.map +1 -1
- package/dist/esm/_virtual/_rolldown/runtime.mjs +1 -8
- package/dist/esm/_virtual/_utils_asset.mjs +2 -97
- package/dist/esm/build.mjs +1 -24
- package/dist/esm/buildIntlayerDictionary/buildIntlayerDictionary.mjs +1 -51
- package/dist/esm/buildIntlayerDictionary/buildIntlayerDictionary.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/index.mjs +1 -4
- package/dist/esm/buildIntlayerDictionary/processContentDeclaration.mjs +1 -24
- package/dist/esm/buildIntlayerDictionary/processContentDeclaration.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/writeDynamicDictionary.mjs +4 -75
- package/dist/esm/buildIntlayerDictionary/writeDynamicDictionary.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/writeFetchDictionary.mjs +4 -59
- package/dist/esm/buildIntlayerDictionary/writeFetchDictionary.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/writeMergedDictionary.mjs +1 -44
- package/dist/esm/buildIntlayerDictionary/writeMergedDictionary.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/writeRemoteDictionary.mjs +1 -48
- package/dist/esm/buildIntlayerDictionary/writeRemoteDictionary.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/writeUnmergedDictionary.mjs +1 -56
- package/dist/esm/buildIntlayerDictionary/writeUnmergedDictionary.mjs.map +1 -1
- package/dist/esm/cleanOutputDir.mjs +1 -28
- package/dist/esm/cleanOutputDir.mjs.map +1 -1
- package/dist/esm/cleanRemovedContentDeclaration.mjs +1 -93
- package/dist/esm/cleanRemovedContentDeclaration.mjs.map +1 -1
- package/dist/esm/cli.mjs +1 -8
- package/dist/esm/createDictionaryEntryPoint/createDictionaryEntryPoint.mjs +1 -68
- package/dist/esm/createDictionaryEntryPoint/createDictionaryEntryPoint.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/generateDictionaryListContent.mjs +7 -39
- package/dist/esm/createDictionaryEntryPoint/generateDictionaryListContent.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltDictionariesPath.mjs +1 -20
- package/dist/esm/createDictionaryEntryPoint/getBuiltDictionariesPath.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.mjs +1 -21
- package/dist/esm/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.mjs +1 -21
- package/dist/esm/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.mjs +1 -20
- package/dist/esm/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.mjs +1 -20
- package/dist/esm/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/index.mjs +1 -9
- package/dist/esm/createType/createModuleAugmentation.mjs +9 -106
- package/dist/esm/createType/createModuleAugmentation.mjs.map +1 -1
- package/dist/esm/createType/createType.mjs +1 -26
- package/dist/esm/createType/createType.mjs.map +1 -1
- package/dist/esm/createType/index.mjs +1 -4
- package/dist/esm/fetchDistantDictionaries.mjs +1 -48
- package/dist/esm/fetchDistantDictionaries.mjs.map +1 -1
- package/dist/esm/filterInvalidDictionaries.mjs +1 -46
- package/dist/esm/filterInvalidDictionaries.mjs.map +1 -1
- package/dist/esm/formatDictionary.mjs +1 -44
- package/dist/esm/formatDictionary.mjs.map +1 -1
- package/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs +1 -37
- package/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs.map +1 -1
- package/dist/esm/handleAdditionalContentDeclarationFile.mjs +1 -32
- package/dist/esm/handleAdditionalContentDeclarationFile.mjs.map +1 -1
- package/dist/esm/handleContentDeclarationFileChange.mjs +1 -47
- package/dist/esm/handleContentDeclarationFileChange.mjs.map +1 -1
- package/dist/esm/handleContentDeclarationFileMoved.mjs +1 -22
- package/dist/esm/handleContentDeclarationFileMoved.mjs.map +1 -1
- package/dist/esm/handleUnlinkedContentDeclarationFile.mjs +1 -35
- package/dist/esm/handleUnlinkedContentDeclarationFile.mjs.map +1 -1
- package/dist/esm/index.mjs +1 -57
- package/dist/esm/init/index.mjs +1 -240
- package/dist/esm/init/index.mjs.map +1 -1
- package/dist/esm/init/utils/configManipulation.mjs +1 -161
- package/dist/esm/init/utils/configManipulation.mjs.map +1 -1
- package/dist/esm/init/utils/fileSystem.mjs +1 -26
- package/dist/esm/init/utils/fileSystem.mjs.map +1 -1
- package/dist/esm/init/utils/index.mjs +1 -6
- package/dist/esm/init/utils/jsonParser.mjs +3 -40
- package/dist/esm/init/utils/jsonParser.mjs.map +1 -1
- package/dist/esm/init/utils/tsConfig.mjs +1 -16
- package/dist/esm/init/utils/tsConfig.mjs.map +1 -1
- package/dist/esm/initConfig/index.mjs +1 -36
- package/dist/esm/initConfig/index.mjs.map +1 -1
- package/dist/esm/installSkills/index.mjs +1 -167
- package/dist/esm/installSkills/index.mjs.map +1 -1
- package/dist/esm/listDictionariesPath.mjs +1 -37
- package/dist/esm/listDictionariesPath.mjs.map +1 -1
- package/dist/esm/listGitFiles.mjs +5 -90
- package/dist/esm/listGitFiles.mjs.map +1 -1
- package/dist/esm/listProjects.mjs +1 -43
- package/dist/esm/listProjects.mjs.map +1 -1
- package/dist/esm/loadDictionaries/getIntlayerBundle.mjs +1 -65
- package/dist/esm/loadDictionaries/getIntlayerBundle.mjs.map +1 -1
- package/dist/esm/loadDictionaries/index.mjs +1 -6
- package/dist/esm/loadDictionaries/loadContentDeclaration.mjs +2 -69
- package/dist/esm/loadDictionaries/loadContentDeclaration.mjs.map +1 -1
- package/dist/esm/loadDictionaries/loadDictionaries.mjs +1 -123
- package/dist/esm/loadDictionaries/loadDictionaries.mjs.map +1 -1
- package/dist/esm/loadDictionaries/loadLocalDictionaries.mjs +1 -26
- package/dist/esm/loadDictionaries/loadLocalDictionaries.mjs.map +1 -1
- package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs +1 -58
- package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs.map +1 -1
- package/dist/esm/loadDictionaries/log.mjs +3 -132
- package/dist/esm/loadDictionaries/log.mjs.map +1 -1
- package/dist/esm/prepareIntlayer.mjs +1 -92
- package/dist/esm/prepareIntlayer.mjs.map +1 -1
- package/dist/esm/reduceDictionaryContent/applyMask.mjs +1 -28
- package/dist/esm/reduceDictionaryContent/applyMask.mjs.map +1 -1
- package/dist/esm/reduceDictionaryContent/reduceDictionaryContent.mjs +1 -10
- package/dist/esm/reduceDictionaryContent/reduceDictionaryContent.mjs.map +1 -1
- package/dist/esm/transformFiles/extractDictionaryKey.mjs +1 -14
- package/dist/esm/transformFiles/extractDictionaryKey.mjs.map +1 -1
- package/dist/esm/transformFiles/index.mjs +1 -4
- package/dist/esm/transformFiles/transformFiles.mjs +1 -244
- package/dist/esm/transformFiles/transformFiles.mjs.map +1 -1
- package/dist/esm/utils/autoDecorateContent.mjs +1 -85
- package/dist/esm/utils/autoDecorateContent.mjs.map +1 -1
- package/dist/esm/utils/buildFilesList.mjs +1 -47
- package/dist/esm/utils/buildFilesList.mjs.map +1 -1
- package/dist/esm/utils/chunkJSON.mjs +1 -333
- package/dist/esm/utils/chunkJSON.mjs.map +1 -1
- package/dist/esm/utils/formatter.mjs +1 -12
- package/dist/esm/utils/formatter.mjs.map +1 -1
- package/dist/esm/utils/getChunk.mjs +1 -33
- package/dist/esm/utils/getChunk.mjs.map +1 -1
- package/dist/esm/utils/getComponentTransformPattern.mjs +1 -44
- package/dist/esm/utils/getComponentTransformPattern.mjs.map +1 -1
- package/dist/esm/utils/getFileHash.mjs +1 -9
- package/dist/esm/utils/getFileHash.mjs.map +1 -1
- package/dist/esm/utils/getFormatFromExtension.mjs +1 -28
- package/dist/esm/utils/getFormatFromExtension.mjs.map +1 -1
- package/dist/esm/utils/index.mjs +1 -20
- package/dist/esm/utils/pLimit.mjs +1 -125
- package/dist/esm/utils/pLimit.mjs.map +1 -1
- package/dist/esm/utils/parallelize.mjs +1 -10
- package/dist/esm/utils/parallelize.mjs.map +1 -1
- package/dist/esm/utils/parallelizeGlobal.mjs +1 -26
- package/dist/esm/utils/parallelizeGlobal.mjs.map +1 -1
- package/dist/esm/utils/reduceObjectFormat.mjs +1 -29
- package/dist/esm/utils/reduceObjectFormat.mjs.map +1 -1
- package/dist/esm/utils/resolveObjectPromises.mjs +1 -19
- package/dist/esm/utils/resolveObjectPromises.mjs.map +1 -1
- package/dist/esm/utils/runOnce.mjs +1 -92
- package/dist/esm/utils/runOnce.mjs.map +1 -1
- package/dist/esm/utils/runParallel/bin.mjs +1 -52
- package/dist/esm/utils/runParallel/bin.mjs.map +1 -1
- package/dist/esm/utils/runParallel/bootstrap.mjs +1 -22
- package/dist/esm/utils/runParallel/bootstrap.mjs.map +1 -1
- package/dist/esm/utils/runParallel/index.mjs +1 -108
- package/dist/esm/utils/runParallel/index.mjs.map +1 -1
- package/dist/esm/utils/runParallel/pidTree.mjs +1 -142
- package/dist/esm/utils/runParallel/pidTree.mjs.map +1 -1
- package/dist/esm/utils/runParallel/ps.mjs +1 -46
- package/dist/esm/utils/runParallel/ps.mjs.map +1 -1
- package/dist/esm/utils/runParallel/runTask.mjs +1 -152
- package/dist/esm/utils/runParallel/runTask.mjs.map +1 -1
- package/dist/esm/utils/runParallel/spawnPosix.mjs +1 -57
- package/dist/esm/utils/runParallel/spawnPosix.mjs.map +1 -1
- package/dist/esm/utils/runParallel/spawnWin32.mjs +1 -41
- package/dist/esm/utils/runParallel/spawnWin32.mjs.map +1 -1
- package/dist/esm/utils/runParallel/wmic.mjs +1 -49
- package/dist/esm/utils/runParallel/wmic.mjs.map +1 -1
- package/dist/esm/utils/sortAlphabetically.mjs +1 -5
- package/dist/esm/utils/sortAlphabetically.mjs.map +1 -1
- package/dist/esm/utils/splitTextByLine.mjs +1 -9
- package/dist/esm/utils/splitTextByLine.mjs.map +1 -1
- package/dist/esm/utils/verifyIdenticObjectFormat.mjs +1 -58
- package/dist/esm/utils/verifyIdenticObjectFormat.mjs.map +1 -1
- package/dist/esm/watcher.mjs +1 -92
- package/dist/esm/watcher.mjs.map +1 -1
- package/dist/esm/writeConfiguration/index.mjs +1 -31
- package/dist/esm/writeConfiguration/index.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/detectExportedComponentName.mjs +1 -26
- package/dist/esm/writeContentDeclaration/detectExportedComponentName.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/detectFormatCommand.mjs +1 -29
- package/dist/esm/writeContentDeclaration/detectFormatCommand.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/index.mjs +1 -7
- package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs +1 -91
- package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/transformJSFile.mjs +2 -1773
- package/dist/esm/writeContentDeclaration/transformJSFile.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/transformJSONFile.mjs +1 -75
- package/dist/esm/writeContentDeclaration/transformJSONFile.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs +1 -121
- package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/writeJSFile.mjs +1 -69
- package/dist/esm/writeContentDeclaration/writeJSFile.mjs.map +1 -1
- package/dist/esm/writeFileIfChanged.mjs +1 -10
- package/dist/esm/writeFileIfChanged.mjs.map +1 -1
- package/dist/esm/writeJsonIfChanged.mjs +1 -16
- package/dist/esm/writeJsonIfChanged.mjs.map +1 -1
- package/dist/types/build.d.ts +3 -1
- package/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts.map +1 -1
- package/dist/types/buildIntlayerDictionary/writeDynamicDictionary.d.ts.map +1 -1
- package/dist/types/buildIntlayerDictionary/writeFetchDictionary.d.ts.map +1 -1
- package/dist/types/buildIntlayerDictionary/writeMergedDictionary.d.ts.map +1 -1
- package/dist/types/buildIntlayerDictionary/writeRemoteDictionary.d.ts.map +1 -1
- package/dist/types/createDictionaryEntryPoint/generateDictionaryListContent.d.ts.map +1 -1
- package/dist/types/fetchDistantDictionaries.d.ts.map +1 -1
- package/dist/types/index.d.ts +16 -24
- package/dist/types/initConfig/index.d.ts +1 -1
- package/dist/types/initConfig/index.d.ts.map +1 -1
- package/dist/types/listGitFiles.d.ts.map +1 -1
- package/dist/types/loadDictionaries/getIntlayerBundle.d.ts.map +1 -1
- package/dist/types/loadDictionaries/loadContentDeclaration.d.ts.map +1 -1
- package/dist/types/prepareIntlayer.d.ts.map +1 -1
- package/dist/types/transformFiles/transformFiles.d.ts +1 -1
- package/dist/types/transformFiles/transformFiles.d.ts.map +1 -1
- package/dist/types/utils/formatter.d.ts +1 -1
- package/dist/types/watcher.d.ts +1 -1
- package/dist/types/writeContentDeclaration/processContentDeclarationContent.d.ts.map +1 -1
- package/dist/types/writeContentDeclaration/transformJSFile.d.ts.map +1 -1
- package/package.json +10 -15
|
@@ -151,6 +151,9 @@ export class LinkComponent {
|
|
|
151
151
|
|
|
152
152
|
## References
|
|
153
153
|
|
|
154
|
+
- [Website](https://intlayer.org)
|
|
155
|
+
- [Doc](https://intlayer.org/doc)
|
|
156
|
+
|
|
154
157
|
- [Angular](https://intlayer.org/doc/environment/angular.md)
|
|
155
158
|
- [Angular Intlayer Exports](https://intlayer.org/doc/packages/angular-intlayer/exports.md)
|
|
156
159
|
- [Intlayer Exports](https://intlayer.org/doc/packages/intlayer/exports.md)
|
|
@@ -32,6 +32,9 @@ const content = await getIntlayer("my-dictionary-key");
|
|
|
32
32
|
|
|
33
33
|
## References
|
|
34
34
|
|
|
35
|
+
- [Website](https://intlayer.org)
|
|
36
|
+
- [Doc](https://intlayer.org/doc/concept/cli)
|
|
37
|
+
|
|
35
38
|
- [Astro](https://intlayer.org/doc/environment/astro.md)
|
|
36
39
|
- [Intlayer Exports](https://intlayer.org/doc/packages/intlayer/exports.md)
|
|
37
40
|
- [Astro Intlayer Exports](https://intlayer.org/doc/packages/astro-intlayer/exports.md)
|
|
@@ -32,7 +32,7 @@ npm install intlayer-cli
|
|
|
32
32
|
| `npx intlayer pull` | Pulls dictionaries from a remote source (e.g., Intlayer CMS). |
|
|
33
33
|
| `npx intlayer push` | Pushes dictionaries to a remote source. |
|
|
34
34
|
| `npx intlayer test` | Runs tests on dictionaries. |
|
|
35
|
-
| `npx intlayer
|
|
35
|
+
| `npx intlayer extract` | Extract content from component to create dictionary. |
|
|
36
36
|
|
|
37
37
|
## References
|
|
38
38
|
|
|
@@ -40,13 +40,13 @@ npm install intlayer-cli
|
|
|
40
40
|
|
|
41
41
|
- [Build](https://intlayer.org/doc/concept/cli/build.md)
|
|
42
42
|
- [CI](https://intlayer.org/doc/concept/cli/ci.md)
|
|
43
|
+
- [CLI Overview](https://intlayer.org/doc/concept/cli.md)
|
|
43
44
|
- [Configuration](https://intlayer.org/doc/concept/cli/configuration.md)
|
|
44
45
|
- [Debug](https://intlayer.org/doc/concept/cli/debug.md)
|
|
45
46
|
- [Doc Review](https://intlayer.org/doc/concept/cli/doc-review.md)
|
|
46
47
|
- [Doc Translate](https://intlayer.org/doc/concept/cli/doc-translate.md)
|
|
47
48
|
- [Editor](https://intlayer.org/doc/concept/cli/editor.md)
|
|
48
49
|
- [Fill](https://intlayer.org/doc/concept/cli/fill.md)
|
|
49
|
-
- [Overview](https://intlayer.org/doc/concept/cli/overview.md)
|
|
50
50
|
- [Init](https://intlayer.org/doc/concept/cli/init.md)
|
|
51
51
|
- [List](https://intlayer.org/doc/concept/cli/list.md)
|
|
52
52
|
- [List Projects](https://intlayer.org/doc/concept/cli/list-projects.md)
|
|
@@ -56,11 +56,14 @@ npm install intlayer-cli
|
|
|
56
56
|
- [Push](https://intlayer.org/doc/concept/cli/push.md)
|
|
57
57
|
- [SDK](https://intlayer.org/doc/concept/cli/sdk.md)
|
|
58
58
|
- [Test](https://intlayer.org/doc/concept/cli/test.md)
|
|
59
|
-
- [
|
|
59
|
+
- [Extract](https://intlayer.org/doc/concept/cli/extract.md)
|
|
60
60
|
- [Version](https://intlayer.org/doc/concept/cli/version.md)
|
|
61
61
|
- [Watch](https://intlayer.org/doc/concept/cli/watch.md)
|
|
62
62
|
|
|
63
63
|
### Packages
|
|
64
64
|
|
|
65
|
-
- [
|
|
65
|
+
- [Website](https://intlayer.org)
|
|
66
|
+
- [Doc](https://intlayer.org/doc/concept/cli)
|
|
67
|
+
|
|
68
|
+
- [Intlayer CLI](https://intlayer.org/doc/packages/intlayer-cli/exports.md)
|
|
66
69
|
- [Intlayer CLI Exports](https://intlayer.org/doc/packages/intlayer-cli/exports.md)
|
|
@@ -370,5 +370,8 @@ Behaviorals Settings
|
|
|
370
370
|
|
|
371
371
|
## References
|
|
372
372
|
|
|
373
|
+
- [Website](https://intlayer.org)
|
|
374
|
+
- [Doc](https://intlayer.org/doc)
|
|
375
|
+
|
|
373
376
|
- [Content Overview](https://intlayer.org/doc/concept/content.md)
|
|
374
377
|
- [Exports intlayer package](https://intlayer.org/doc/packages/intlayer/exports.md)
|
|
@@ -73,10 +73,11 @@ const MyComponent = () => {
|
|
|
73
73
|
};
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
[Preact package Documentation](https://intlayer.org/doc/packages/preact-intlayer.md)
|
|
77
|
-
|
|
78
76
|
## References
|
|
79
77
|
|
|
78
|
+
- [Website](https://intlayer.org)
|
|
79
|
+
- [Doc](https://intlayer.org/doc)
|
|
80
|
+
|
|
80
81
|
- [Vite and Preact](https://intlayer.org/doc/environment/vite-and-preact.md)
|
|
81
82
|
- [Intlayer Exports](https://intlayer.org/doc/packages/intlayer/exports.md)
|
|
82
83
|
- [Preact Intlayer Exports](https://intlayer.org/doc/packages/preact-intlayer/exports.md)
|
|
@@ -75,6 +75,9 @@ In Svelte, `useIntlayer` returns a **store**. You must use the `$` prefix to acc
|
|
|
75
75
|
|
|
76
76
|
## References
|
|
77
77
|
|
|
78
|
+
- [Website](https://intlayer.org)
|
|
79
|
+
- [Doc](https://intlayer.org/doc)
|
|
80
|
+
|
|
78
81
|
- [Intlayer Exports](https://intlayer.org/doc/packages/intlayer/exports.md)
|
|
79
82
|
- [Vite and Svelte](https://intlayer.org/doc/environment/vite-and-svelte.md)
|
|
80
83
|
- [SvelteKit](https://intlayer.org/doc/environment/sveltekit.md)
|
|
@@ -40,3 +40,5 @@ To use Intlayer effectively:
|
|
|
40
40
|
- [How Intlayer Works](https://intlayer.org/doc/concept/how-works-intlayer.md)
|
|
41
41
|
- [Why Intlayer](https://intlayer.org/doc/why.md)
|
|
42
42
|
- [Per-locale File](https://intlayer.org/doc/concept/per-locale-file.md)
|
|
43
|
+
- [Website](https://intlayer.org)
|
|
44
|
+
- [Doc](https://intlayer.org/doc)
|
|
@@ -47,6 +47,9 @@ console.log(content.title.raw); // Render as raw
|
|
|
47
47
|
|
|
48
48
|
## References
|
|
49
49
|
|
|
50
|
+
- [Website](https://intlayer.org)
|
|
51
|
+
- [Doc](https://intlayer.org/doc)
|
|
52
|
+
|
|
50
53
|
- [Vite and Vue](https://intlayer.org/doc/environment/vite-and-vue.md)
|
|
51
54
|
- [Nuxt and Vue](https://intlayer.org/doc/environment/nuxt-and-vue.md)
|
|
52
55
|
- [Vue Intlayer Exports](https://intlayer.org/doc/packages/vue-intlayer/exports.md)
|
|
@@ -1,29 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
-
key = keys[i];
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
-
__defProp(to, key, {
|
|
14
|
-
get: ((k) => from[k]).bind(null, key),
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
-
value: mod,
|
|
24
|
-
enumerable: true
|
|
25
|
-
}) : target, mod));
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
|
|
29
|
-
exports.__toESM = __toESM;
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));exports.__toESM=s;
|
|
@@ -1,98 +1,2 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
let node_fs = require("node:fs");
|
|
4
|
-
let node_url = require("node:url");
|
|
5
|
-
|
|
6
|
-
//#region \0utils:asset
|
|
7
|
-
const hereDirname = () => {
|
|
8
|
-
try {
|
|
9
|
-
return (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
|
|
10
|
-
} catch {
|
|
11
|
-
return typeof __dirname !== "undefined" ? __dirname : process.cwd();
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
const findDistRoot = (startDir) => {
|
|
15
|
-
let dir = startDir;
|
|
16
|
-
for (let i = 0; i < 12; i++) {
|
|
17
|
-
if ((0, node_path.basename)(dir) === "dist") return dir;
|
|
18
|
-
const parent = (0, node_path.resolve)(dir, "..");
|
|
19
|
-
if (parent === dir) break;
|
|
20
|
-
dir = parent;
|
|
21
|
-
}
|
|
22
|
-
return null;
|
|
23
|
-
};
|
|
24
|
-
const normalizeFrameFile = (file) => {
|
|
25
|
-
if (!file) return null;
|
|
26
|
-
try {
|
|
27
|
-
if (file.startsWith("file://")) return (0, node_url.fileURLToPath)(file);
|
|
28
|
-
} catch {}
|
|
29
|
-
return file;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Returns the directory of the *caller* module that invoked readAsset.
|
|
33
|
-
* Prefers non-virtual frames; falls back to the first real frame.
|
|
34
|
-
*/
|
|
35
|
-
const getCallerDir = () => {
|
|
36
|
-
const prev = Error.prepareStackTrace;
|
|
37
|
-
try {
|
|
38
|
-
Error.prepareStackTrace = (_, structured) => structured;
|
|
39
|
-
const err = /* @__PURE__ */ new Error();
|
|
40
|
-
Error.captureStackTrace(err, getCallerDir);
|
|
41
|
-
/** @type {import('node:vm').CallSite[]} */
|
|
42
|
-
const frames = err.stack || [];
|
|
43
|
-
const isVirtualPath = (p) => p.includes(`${node_path.sep}_virtual${node_path.sep}`) || p.includes("/_virtual/");
|
|
44
|
-
for (const frame of frames) {
|
|
45
|
-
const file = normalizeFrameFile(typeof frame.getFileName === "function" ? frame.getFileName() : null);
|
|
46
|
-
if (!file) continue;
|
|
47
|
-
if (file.includes("node:internal") || file.includes(`${node_path.sep}internal${node_path.sep}modules${node_path.sep}`)) continue;
|
|
48
|
-
if (!isVirtualPath(file)) return (0, node_path.dirname)(file);
|
|
49
|
-
}
|
|
50
|
-
for (const frame of frames) {
|
|
51
|
-
const file = normalizeFrameFile(typeof frame.getFileName === "function" ? frame.getFileName() : null);
|
|
52
|
-
if (file) return (0, node_path.dirname)(file);
|
|
53
|
-
}
|
|
54
|
-
} catch {} finally {
|
|
55
|
-
Error.prepareStackTrace = prev;
|
|
56
|
-
}
|
|
57
|
-
return hereDirname();
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* Read an asset copied from src/** to dist/assets/**.
|
|
61
|
-
* - './' or '../' is resolved relative to the *caller module's* emitted directory.
|
|
62
|
-
* - otherwise, treat as src-relative.
|
|
63
|
-
*
|
|
64
|
-
* @param {string} relPath - e.g. './PROMPT.md' or 'utils/AI/askDocQuestion/embeddings/<fileKey>.json'
|
|
65
|
-
* @param {BufferEncoding} [encoding='utf8']
|
|
66
|
-
*/
|
|
67
|
-
const readAsset = (relPath, encoding = "utf8") => {
|
|
68
|
-
const here = hereDirname();
|
|
69
|
-
const distRoot = findDistRoot(here) ?? (0, node_path.resolve)(here, "..", "..", "dist");
|
|
70
|
-
const assetsRoot = (0, node_path.join)(distRoot, "assets");
|
|
71
|
-
const tried = [];
|
|
72
|
-
/**
|
|
73
|
-
* Transform dist/(esm|cjs)/... and _virtual/ prefix to clean subpath (Windows-safe)
|
|
74
|
-
*/
|
|
75
|
-
const callerSubpath = (0, node_path.relative)(distRoot, getCallerDir()).split("\\").join("/").replace(/^(?:dist\/)?(?:esm|cjs)\//, "").replace(/^_virtual\//, "");
|
|
76
|
-
if (relPath.startsWith("./") || relPath.startsWith("../")) {
|
|
77
|
-
const fromCallerAbs = (0, node_path.resolve)(assetsRoot, callerSubpath, relPath);
|
|
78
|
-
tried.push(fromCallerAbs);
|
|
79
|
-
if ((0, node_fs.existsSync)(fromCallerAbs)) return (0, node_fs.readFileSync)(fromCallerAbs, encoding);
|
|
80
|
-
}
|
|
81
|
-
const directPath = (0, node_path.join)(assetsRoot, relPath);
|
|
82
|
-
tried.push(directPath);
|
|
83
|
-
if ((0, node_fs.existsSync)(directPath)) return (0, node_fs.readFileSync)(directPath, encoding);
|
|
84
|
-
if (callerSubpath) {
|
|
85
|
-
const nested = (0, node_path.join)(assetsRoot, callerSubpath, relPath);
|
|
86
|
-
tried.push(nested);
|
|
87
|
-
if ((0, node_fs.existsSync)(nested)) return (0, node_fs.readFileSync)(nested, encoding);
|
|
88
|
-
}
|
|
89
|
-
const msg = [
|
|
90
|
-
"readAsset: file not found.",
|
|
91
|
-
"Searched:",
|
|
92
|
-
...tried.map((p) => `- ${p}`)
|
|
93
|
-
].join("\n");
|
|
94
|
-
throw new Error(msg);
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
//#endregion
|
|
98
|
-
exports.readAsset = readAsset;
|
|
1
|
+
require(`./_rolldown/runtime.cjs`);let e=require(`node:path`),t=require(`node:fs`),n=require(`node:url`);const r=()=>{try{return(0,e.dirname)((0,n.fileURLToPath)(require(`url`).pathToFileURL(__filename).href))}catch{return typeof __dirname<`u`?__dirname:process.cwd()}},i=t=>{let n=t;for(let t=0;t<12;t++){if((0,e.basename)(n)===`dist`)return n;let t=(0,e.resolve)(n,`..`);if(t===n)break;n=t}return null},a=e=>{if(!e)return null;try{if(e.startsWith(`file://`))return(0,n.fileURLToPath)(e)}catch{}return e},o=()=>{let t=Error.prepareStackTrace;try{Error.prepareStackTrace=(e,t)=>t;let t=Error();Error.captureStackTrace(t,o);let n=t.stack||[],r=t=>t.includes(`${e.sep}_virtual${e.sep}`)||t.includes(`/_virtual/`);for(let t of n){let n=a(typeof t.getFileName==`function`?t.getFileName():null);if(n&&!(n.includes(`node:internal`)||n.includes(`${e.sep}internal${e.sep}modules${e.sep}`))&&!r(n))return(0,e.dirname)(n)}for(let t of n){let n=a(typeof t.getFileName==`function`?t.getFileName():null);if(n)return(0,e.dirname)(n)}}catch{}finally{Error.prepareStackTrace=t}return r()},s=(n,a=`utf8`)=>{let s=r(),c=i(s)??(0,e.resolve)(s,`..`,`..`,`dist`),l=(0,e.join)(c,`assets`),u=[],d=(0,e.relative)(c,o()).split(`\\`).join(`/`).replace(/^(?:dist\/)?(?:esm|cjs)\//,``).replace(/^_virtual\//,``);if(n.startsWith(`./`)||n.startsWith(`../`)){let r=(0,e.resolve)(l,d,n);if(u.push(r),(0,t.existsSync)(r))return(0,t.readFileSync)(r,a)}let f=(0,e.join)(l,n);if(u.push(f),(0,t.existsSync)(f))return(0,t.readFileSync)(f,a);if(d){let r=(0,e.join)(l,d,n);if(u.push(r),(0,t.existsSync)(r))return(0,t.readFileSync)(r,a)}let p=[`readAsset: file not found.`,`Searched:`,...u.map(e=>`- ${e}`)].join(`
|
|
2
|
+
`);throw Error(p)};exports.readAsset=s;
|
package/dist/cjs/build.cjs
CHANGED
|
@@ -1,51 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,
|
|
2
|
-
const require_buildIntlayerDictionary_buildIntlayerDictionary = require('./buildIntlayerDictionary/buildIntlayerDictionary.cjs');
|
|
3
|
-
const require_buildIntlayerDictionary_processContentDeclaration = require('./buildIntlayerDictionary/processContentDeclaration.cjs');
|
|
4
|
-
const require_createDictionaryEntryPoint_generateDictionaryListContent = require('./createDictionaryEntryPoint/generateDictionaryListContent.cjs');
|
|
5
|
-
const require_createDictionaryEntryPoint_getBuiltDictionariesPath = require('./createDictionaryEntryPoint/getBuiltDictionariesPath.cjs');
|
|
6
|
-
const require_createDictionaryEntryPoint_getBuiltDynamicDictionariesPath = require('./createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs');
|
|
7
|
-
const require_createDictionaryEntryPoint_getBuiltFetchDictionariesPath = require('./createDictionaryEntryPoint/getBuiltFetchDictionariesPath.cjs');
|
|
8
|
-
const require_createDictionaryEntryPoint_getBuiltRemoteDictionariesPath = require('./createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs');
|
|
9
|
-
const require_createDictionaryEntryPoint_getBuiltUnmergedDictionariesPath = require('./createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs');
|
|
10
|
-
const require_createDictionaryEntryPoint_createDictionaryEntryPoint = require('./createDictionaryEntryPoint/createDictionaryEntryPoint.cjs');
|
|
11
|
-
const require_createType_createModuleAugmentation = require('./createType/createModuleAugmentation.cjs');
|
|
12
|
-
const require_createType_createType = require('./createType/createType.cjs');
|
|
13
|
-
const require_loadDictionaries_loadContentDeclaration = require('./loadDictionaries/loadContentDeclaration.cjs');
|
|
14
|
-
const require_loadDictionaries_loadRemoteDictionaries = require('./loadDictionaries/loadRemoteDictionaries.cjs');
|
|
15
|
-
const require_loadDictionaries_loadDictionaries = require('./loadDictionaries/loadDictionaries.cjs');
|
|
16
|
-
const require_loadDictionaries_loadLocalDictionaries = require('./loadDictionaries/loadLocalDictionaries.cjs');
|
|
17
|
-
const require_writeConfiguration_index = require('./writeConfiguration/index.cjs');
|
|
18
|
-
const require_prepareIntlayer = require('./prepareIntlayer.cjs');
|
|
19
|
-
const require_writeContentDeclaration_detectExportedComponentName = require('./writeContentDeclaration/detectExportedComponentName.cjs');
|
|
20
|
-
const require_writeContentDeclaration_detectFormatCommand = require('./writeContentDeclaration/detectFormatCommand.cjs');
|
|
21
|
-
const require_writeContentDeclaration_transformJSFile = require('./writeContentDeclaration/transformJSFile.cjs');
|
|
22
|
-
const require_writeContentDeclaration_writeJSFile = require('./writeContentDeclaration/writeJSFile.cjs');
|
|
23
|
-
const require_writeContentDeclaration_writeContentDeclaration = require('./writeContentDeclaration/writeContentDeclaration.cjs');
|
|
24
|
-
|
|
25
|
-
exports.buildDictionary = require_buildIntlayerDictionary_buildIntlayerDictionary.buildDictionary;
|
|
26
|
-
exports.createDictionaryEntryPoint = require_createDictionaryEntryPoint_createDictionaryEntryPoint.createDictionaryEntryPoint;
|
|
27
|
-
exports.createModuleAugmentation = require_createType_createModuleAugmentation.createModuleAugmentation;
|
|
28
|
-
exports.createTypes = require_createType_createType.createTypes;
|
|
29
|
-
exports.detectExportedComponentName = require_writeContentDeclaration_detectExportedComponentName.detectExportedComponentName;
|
|
30
|
-
exports.detectFormatCommand = require_writeContentDeclaration_detectFormatCommand.detectFormatCommand;
|
|
31
|
-
exports.formatDistantDictionaries = require_loadDictionaries_loadRemoteDictionaries.formatDistantDictionaries;
|
|
32
|
-
exports.formatLocalDictionaries = require_loadDictionaries_loadContentDeclaration.formatLocalDictionaries;
|
|
33
|
-
exports.generateDictionaryListContent = require_createDictionaryEntryPoint_generateDictionaryListContent.generateDictionaryListContent;
|
|
34
|
-
exports.generateTypeScriptType = require_createType_createType.generateTypeScriptType;
|
|
35
|
-
exports.getBuiltDictionariesPath = require_createDictionaryEntryPoint_getBuiltDictionariesPath.getBuiltDictionariesPath;
|
|
36
|
-
exports.getBuiltDynamicDictionariesPath = require_createDictionaryEntryPoint_getBuiltDynamicDictionariesPath.getBuiltDynamicDictionariesPath;
|
|
37
|
-
exports.getBuiltFetchDictionariesPath = require_createDictionaryEntryPoint_getBuiltFetchDictionariesPath.getBuiltFetchDictionariesPath;
|
|
38
|
-
exports.getBuiltRemoteDictionariesPath = require_createDictionaryEntryPoint_getBuiltRemoteDictionariesPath.getBuiltRemoteDictionariesPath;
|
|
39
|
-
exports.getBuiltUnmergedDictionariesPath = require_createDictionaryEntryPoint_getBuiltUnmergedDictionariesPath.getBuiltUnmergedDictionariesPath;
|
|
40
|
-
exports.getTypeName = require_createType_createModuleAugmentation.getTypeName;
|
|
41
|
-
exports.isCachedConfigurationUpToDate = require_writeConfiguration_index.isCachedConfigurationUpToDate;
|
|
42
|
-
exports.loadContentDeclarations = require_loadDictionaries_loadContentDeclaration.loadContentDeclarations;
|
|
43
|
-
exports.loadDictionaries = require_loadDictionaries_loadDictionaries.loadDictionaries;
|
|
44
|
-
exports.loadLocalDictionaries = require_loadDictionaries_loadLocalDictionaries.loadLocalDictionaries;
|
|
45
|
-
exports.loadRemoteDictionaries = require_loadDictionaries_loadRemoteDictionaries.loadRemoteDictionaries;
|
|
46
|
-
exports.prepareIntlayer = require_prepareIntlayer.prepareIntlayer;
|
|
47
|
-
exports.processContentDeclaration = require_buildIntlayerDictionary_processContentDeclaration.processContentDeclaration;
|
|
48
|
-
exports.transformJSFile = require_writeContentDeclaration_transformJSFile.transformJSFile;
|
|
49
|
-
exports.writeConfiguration = require_writeConfiguration_index.writeConfiguration;
|
|
50
|
-
exports.writeContentDeclaration = require_writeContentDeclaration_writeContentDeclaration.writeContentDeclaration;
|
|
51
|
-
exports.writeJSFile = require_writeContentDeclaration_writeJSFile.writeJSFile;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./buildIntlayerDictionary/buildIntlayerDictionary.cjs`),t=require(`./buildIntlayerDictionary/processContentDeclaration.cjs`),n=require(`./cleanOutputDir.cjs`),r=require(`./createDictionaryEntryPoint/generateDictionaryListContent.cjs`),i=require(`./createDictionaryEntryPoint/getBuiltDictionariesPath.cjs`),a=require(`./createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs`),o=require(`./createDictionaryEntryPoint/getBuiltFetchDictionariesPath.cjs`),s=require(`./createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs`),c=require(`./createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs`),l=require(`./createDictionaryEntryPoint/createDictionaryEntryPoint.cjs`),u=require(`./createType/createModuleAugmentation.cjs`),d=require(`./createType/createType.cjs`),f=require(`./formatDictionary.cjs`),p=require(`./loadDictionaries/loadContentDeclaration.cjs`),m=require(`./loadDictionaries/loadRemoteDictionaries.cjs`),h=require(`./loadDictionaries/loadDictionaries.cjs`),g=require(`./loadDictionaries/loadLocalDictionaries.cjs`),_=require(`./writeConfiguration/index.cjs`),v=require(`./prepareIntlayer.cjs`),y=require(`./writeContentDeclaration/detectExportedComponentName.cjs`),b=require(`./writeContentDeclaration/detectFormatCommand.cjs`),x=require(`./writeContentDeclaration/transformJSFile.cjs`),S=require(`./writeContentDeclaration/writeJSFile.cjs`),C=require(`./writeContentDeclaration/writeContentDeclaration.cjs`);exports.buildDictionary=e.buildDictionary,exports.cleanOutputDir=n.cleanOutputDir,exports.createDictionaryEntryPoint=l.createDictionaryEntryPoint,exports.createModuleAugmentation=u.createModuleAugmentation,exports.createTypes=d.createTypes,exports.detectExportedComponentName=y.detectExportedComponentName,exports.detectFormatCommand=b.detectFormatCommand,exports.formatDictionaries=f.formatDictionaries,exports.formatDictionariesOutput=f.formatDictionariesOutput,exports.formatDictionary=f.formatDictionary,exports.formatDictionaryOutput=f.formatDictionaryOutput,exports.formatDistantDictionaries=m.formatDistantDictionaries,exports.formatLocalDictionaries=p.formatLocalDictionaries,exports.generateDictionaryListContent=r.generateDictionaryListContent,exports.generateTypeScriptType=d.generateTypeScriptType,exports.getBuiltDictionariesPath=i.getBuiltDictionariesPath,exports.getBuiltDynamicDictionariesPath=a.getBuiltDynamicDictionariesPath,exports.getBuiltFetchDictionariesPath=o.getBuiltFetchDictionariesPath,exports.getBuiltRemoteDictionariesPath=s.getBuiltRemoteDictionariesPath,exports.getBuiltUnmergedDictionariesPath=c.getBuiltUnmergedDictionariesPath,exports.getTypeName=u.getTypeName,exports.isCachedConfigurationUpToDate=_.isCachedConfigurationUpToDate,exports.loadContentDeclarations=p.loadContentDeclarations,exports.loadDictionaries=h.loadDictionaries,exports.loadLocalDictionaries=g.loadLocalDictionaries,exports.loadRemoteDictionaries=m.loadRemoteDictionaries,exports.prepareIntlayer=v.prepareIntlayer,exports.processContentDeclaration=t.processContentDeclaration,exports.transformJSFile=x.transformJSFile,exports.writeConfiguration=_.writeConfiguration,exports.writeContentDeclaration=C.writeContentDeclaration,exports.writeJSFile=S.writeJSFile;
|
|
@@ -1,54 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,
|
|
2
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
-
const require_buildIntlayerDictionary_writeDynamicDictionary = require('./writeDynamicDictionary.cjs');
|
|
4
|
-
const require_buildIntlayerDictionary_writeFetchDictionary = require('./writeFetchDictionary.cjs');
|
|
5
|
-
const require_buildIntlayerDictionary_writeMergedDictionary = require('./writeMergedDictionary.cjs');
|
|
6
|
-
const require_buildIntlayerDictionary_writeUnmergedDictionary = require('./writeUnmergedDictionary.cjs');
|
|
7
|
-
let _intlayer_config = require("@intlayer/config");
|
|
8
|
-
let _intlayer_unmerged_dictionaries_entry = require("@intlayer/unmerged-dictionaries-entry");
|
|
9
|
-
|
|
10
|
-
//#region src/buildIntlayerDictionary/buildIntlayerDictionary.ts
|
|
11
|
-
/**
|
|
12
|
-
* This function transpile the bundled code to to make dictionaries as JSON files
|
|
13
|
-
*/
|
|
14
|
-
const buildDictionary = async (localDictionariesEntries, configuration = (0, _intlayer_config.getConfiguration)(), formats = ["cjs", "esm"], importOtherDictionaries = true) => {
|
|
15
|
-
const importMode = configuration.build.importMode ?? configuration.dictionary?.importMode ?? _intlayer_config.DefaultValues.Dictionary.IMPORT_MODE;
|
|
16
|
-
const unmergedDictionariesToUpdate = [...localDictionariesEntries];
|
|
17
|
-
if (importOtherDictionaries) {
|
|
18
|
-
const prevUnmergedDictionaries = (0, _intlayer_unmerged_dictionaries_entry.getUnmergedDictionaries)(configuration);
|
|
19
|
-
for (const dictionaryToWrite of localDictionariesEntries) {
|
|
20
|
-
const allPrebuiltUnmergedDictionaries = prevUnmergedDictionaries[dictionaryToWrite.key];
|
|
21
|
-
if (allPrebuiltUnmergedDictionaries?.length > 0) {
|
|
22
|
-
const otherUnmergedDictionaries = allPrebuiltUnmergedDictionaries.filter((unmergedDictionary) => unmergedDictionary.localId !== dictionaryToWrite.localId);
|
|
23
|
-
unmergedDictionariesToUpdate.push(...otherUnmergedDictionaries);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
const unmergedDictionaries = await require_buildIntlayerDictionary_writeUnmergedDictionary.writeUnmergedDictionaries(unmergedDictionariesToUpdate, configuration);
|
|
28
|
-
const mergedDictionaries = await require_buildIntlayerDictionary_writeMergedDictionary.writeMergedDictionaries(unmergedDictionaries, configuration);
|
|
29
|
-
const dictionariesToBuildDynamic = {};
|
|
30
|
-
const keysToBuildFetch = /* @__PURE__ */ new Set();
|
|
31
|
-
for (const [key, mergedResult] of Object.entries(mergedDictionaries)) {
|
|
32
|
-
const mode = mergedResult.dictionary.importMode ?? importMode;
|
|
33
|
-
if (mode === "dynamic" || mode === "fetch") dictionariesToBuildDynamic[key] = mergedResult;
|
|
34
|
-
if (mode === "fetch") keysToBuildFetch.add(key);
|
|
35
|
-
}
|
|
36
|
-
let dynamicDictionaries = null;
|
|
37
|
-
if (Object.keys(dictionariesToBuildDynamic).length > 0) dynamicDictionaries = await require_buildIntlayerDictionary_writeDynamicDictionary.writeDynamicDictionary(dictionariesToBuildDynamic, configuration, formats);
|
|
38
|
-
let fetchDictionaries = null;
|
|
39
|
-
if (dynamicDictionaries && keysToBuildFetch.size > 0) {
|
|
40
|
-
const dictionariesToBuildFetch = {};
|
|
41
|
-
for (const key of keysToBuildFetch) if (dynamicDictionaries[key]) dictionariesToBuildFetch[key] = dynamicDictionaries[key];
|
|
42
|
-
if (Object.keys(dictionariesToBuildFetch).length > 0) fetchDictionaries = await require_buildIntlayerDictionary_writeFetchDictionary.writeFetchDictionary(dictionariesToBuildFetch, configuration, formats);
|
|
43
|
-
}
|
|
44
|
-
return {
|
|
45
|
-
unmergedDictionaries,
|
|
46
|
-
mergedDictionaries,
|
|
47
|
-
dynamicDictionaries,
|
|
48
|
-
fetchDictionaries
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
//#endregion
|
|
53
|
-
exports.buildDictionary = buildDictionary;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`./writeDynamicDictionary.cjs`),t=require(`./writeFetchDictionary.cjs`),n=require(`./writeMergedDictionary.cjs`),r=require(`./writeUnmergedDictionary.cjs`);let i=require(`@intlayer/config/client`),a=require(`@intlayer/config/node`),o=require(`@intlayer/unmerged-dictionaries-entry`);const s=async(s,c=(0,a.getConfiguration)(),l=[`cjs`,`esm`],u=!0)=>{let d=c.build.importMode??c.dictionary?.importMode??i.DefaultValues.Dictionary.IMPORT_MODE,f=[...s];if(u){let e=(0,o.getUnmergedDictionaries)(c);for(let t of s){let n=e[t.key];if(n?.length>0){let e=n.filter(e=>e.localId!==t.localId);f.push(...e)}}}let p=await r.writeUnmergedDictionaries(f,c),m=await n.writeMergedDictionaries(p,c),h={},g=new Set;for(let[e,t]of Object.entries(m)){let n=t.dictionary.importMode??d;(n===`dynamic`||n===`fetch`)&&(h[e]=t),n===`fetch`&&g.add(e)}let _=null;Object.keys(h).length>0&&(_=await e.writeDynamicDictionary(h,c,l));let v=null;if(_&&g.size>0){let e={};for(let t of g)_[t]&&(e[t]=_[t]);Object.keys(e).length>0&&(v=await t.writeFetchDictionary(e,c,l))}return{unmergedDictionaries:p,mergedDictionaries:m,dynamicDictionaries:_,fetchDictionaries:v}};exports.buildDictionary=s;
|
|
54
2
|
//# sourceMappingURL=buildIntlayerDictionary.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildIntlayerDictionary.cjs","names":["DefaultValues","writeUnmergedDictionaries","writeMergedDictionaries","writeDynamicDictionary","writeFetchDictionary"],"sources":["../../../src/buildIntlayerDictionary/buildIntlayerDictionary.ts"],"sourcesContent":["import { DefaultValues
|
|
1
|
+
{"version":3,"file":"buildIntlayerDictionary.cjs","names":["DefaultValues","writeUnmergedDictionaries","writeMergedDictionaries","writeDynamicDictionary","writeFetchDictionary"],"sources":["../../../src/buildIntlayerDictionary/buildIntlayerDictionary.ts"],"sourcesContent":["import { DefaultValues } from '@intlayer/config/client';\nimport { getConfiguration } from '@intlayer/config/node';\nimport type { Dictionary } from '@intlayer/types';\nimport { getUnmergedDictionaries } from '@intlayer/unmerged-dictionaries-entry';\nimport {\n type LocalizedDictionaryOutput,\n writeDynamicDictionary,\n} from './writeDynamicDictionary';\nimport { writeFetchDictionary } from './writeFetchDictionary';\nimport { writeMergedDictionaries } from './writeMergedDictionary';\nimport { writeUnmergedDictionaries } from './writeUnmergedDictionary';\n\n/**\n * This function transpile the bundled code to to make dictionaries as JSON files\n */\nexport const buildDictionary = async (\n localDictionariesEntries: Dictionary[],\n configuration = getConfiguration(),\n formats: ('cjs' | 'esm')[] = ['cjs', 'esm'],\n importOtherDictionaries = true\n) => {\n const importMode =\n configuration.build.importMode ??\n configuration.dictionary?.importMode ??\n DefaultValues.Dictionary.IMPORT_MODE;\n\n const unmergedDictionariesToUpdate: Dictionary[] = [\n ...localDictionariesEntries,\n ];\n\n if (importOtherDictionaries) {\n const prevUnmergedDictionaries: Record<string, Dictionary[]> =\n getUnmergedDictionaries(configuration);\n\n // Reinsert other dictionaries with the same key to avoid merging errors\n for (const dictionaryToWrite of localDictionariesEntries) {\n const allPrebuiltUnmergedDictionaries =\n prevUnmergedDictionaries[dictionaryToWrite.key];\n\n if (allPrebuiltUnmergedDictionaries?.length > 0) {\n // Do not add the same dictionary again by filtering out the one with the same localId\n const otherUnmergedDictionaries =\n allPrebuiltUnmergedDictionaries.filter(\n (unmergedDictionary) =>\n unmergedDictionary.localId !== dictionaryToWrite.localId\n );\n\n unmergedDictionariesToUpdate.push(...otherUnmergedDictionaries);\n }\n }\n }\n\n const unmergedDictionaries = await writeUnmergedDictionaries(\n unmergedDictionariesToUpdate,\n configuration\n );\n\n const mergedDictionaries = await writeMergedDictionaries(\n unmergedDictionaries,\n configuration\n );\n\n const dictionariesToBuildDynamic: typeof mergedDictionaries = {};\n const keysToBuildFetch = new Set<string>();\n\n for (const [key, mergedResult] of Object.entries(mergedDictionaries)) {\n const dictionary = mergedResult.dictionary;\n const mode = dictionary.importMode ?? importMode;\n\n if (mode === 'dynamic' || mode === 'fetch') {\n dictionariesToBuildDynamic[key] = mergedResult;\n }\n\n if (mode === 'fetch') {\n keysToBuildFetch.add(key);\n }\n }\n\n let dynamicDictionaries: LocalizedDictionaryOutput | null = null;\n\n if (Object.keys(dictionariesToBuildDynamic).length > 0) {\n dynamicDictionaries = await writeDynamicDictionary(\n dictionariesToBuildDynamic,\n configuration,\n formats\n );\n }\n\n let fetchDictionaries: LocalizedDictionaryOutput | null = null;\n\n if (dynamicDictionaries && keysToBuildFetch.size > 0) {\n const dictionariesToBuildFetch: LocalizedDictionaryOutput = {};\n\n for (const key of keysToBuildFetch) {\n if (dynamicDictionaries[key]) {\n dictionariesToBuildFetch[key] = dynamicDictionaries[key];\n }\n }\n\n if (Object.keys(dictionariesToBuildFetch).length > 0) {\n fetchDictionaries = await writeFetchDictionary(\n dictionariesToBuildFetch,\n configuration,\n formats\n );\n }\n }\n\n return {\n unmergedDictionaries,\n mergedDictionaries,\n dynamicDictionaries,\n fetchDictionaries,\n };\n};\n"],"mappings":"2ZAeA,MAAa,EAAkB,MAC7B,EACA,GAAA,EAAA,EAAA,mBAAkC,CAClC,EAA6B,CAAC,MAAO,MAAM,CAC3C,EAA0B,KACvB,CACH,IAAM,EACJ,EAAc,MAAM,YACpB,EAAc,YAAY,YAC1BA,EAAAA,cAAc,WAAW,YAErB,EAA6C,CACjD,GAAG,EACJ,CAED,GAAI,EAAyB,CAC3B,IAAM,GAAA,EAAA,EAAA,yBACoB,EAAc,CAGxC,IAAK,IAAM,KAAqB,EAA0B,CACxD,IAAM,EACJ,EAAyB,EAAkB,KAE7C,GAAI,GAAiC,OAAS,EAAG,CAE/C,IAAM,EACJ,EAAgC,OAC7B,GACC,EAAmB,UAAY,EAAkB,QACpD,CAEH,EAA6B,KAAK,GAAG,EAA0B,GAKrE,IAAM,EAAuB,MAAMC,EAAAA,0BACjC,EACA,EACD,CAEK,EAAqB,MAAMC,EAAAA,wBAC/B,EACA,EACD,CAEK,EAAwD,EAAE,CAC1D,EAAmB,IAAI,IAE7B,IAAK,GAAM,CAAC,EAAK,KAAiB,OAAO,QAAQ,EAAmB,CAAE,CAEpE,IAAM,EADa,EAAa,WACR,YAAc,GAElC,IAAS,WAAa,IAAS,WACjC,EAA2B,GAAO,GAGhC,IAAS,SACX,EAAiB,IAAI,EAAI,CAI7B,IAAI,EAAwD,KAExD,OAAO,KAAK,EAA2B,CAAC,OAAS,IACnD,EAAsB,MAAMC,EAAAA,uBAC1B,EACA,EACA,EACD,EAGH,IAAI,EAAsD,KAE1D,GAAI,GAAuB,EAAiB,KAAO,EAAG,CACpD,IAAM,EAAsD,EAAE,CAE9D,IAAK,IAAM,KAAO,EACZ,EAAoB,KACtB,EAAyB,GAAO,EAAoB,IAIpD,OAAO,KAAK,EAAyB,CAAC,OAAS,IACjD,EAAoB,MAAMC,EAAAA,qBACxB,EACA,EACA,EACD,EAIL,MAAO,CACL,uBACA,qBACA,sBACA,oBACD"}
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,
|
|
2
|
-
const require_buildIntlayerDictionary_buildIntlayerDictionary = require('./buildIntlayerDictionary.cjs');
|
|
3
|
-
const require_buildIntlayerDictionary_processContentDeclaration = require('./processContentDeclaration.cjs');
|
|
4
|
-
|
|
5
|
-
exports.buildDictionary = require_buildIntlayerDictionary_buildIntlayerDictionary.buildDictionary;
|
|
6
|
-
exports.processContentDeclaration = require_buildIntlayerDictionary_processContentDeclaration.processContentDeclaration;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./buildIntlayerDictionary.cjs`),t=require(`./processContentDeclaration.cjs`);exports.buildDictionary=e.buildDictionary,exports.processContentDeclaration=t.processContentDeclaration;
|
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,
|
|
2
|
-
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
|
-
const require_utils_autoDecorateContent = require('../utils/autoDecorateContent.cjs');
|
|
4
|
-
const require_utils_resolveObjectPromises = require('../utils/resolveObjectPromises.cjs');
|
|
5
|
-
let _intlayer_config_client = require("@intlayer/config/client");
|
|
6
|
-
|
|
7
|
-
//#region src/buildIntlayerDictionary/processContentDeclaration.ts
|
|
8
|
-
/**
|
|
9
|
-
* Function to load, process the module and return the Intlayer Dictionary from the module file
|
|
10
|
-
*/
|
|
11
|
-
const processContentDeclaration = async (contentDeclaration, configuration) => {
|
|
12
|
-
try {
|
|
13
|
-
const resolvedContent = await require_utils_resolveObjectPromises.resolveObjectPromises(contentDeclaration.content);
|
|
14
|
-
const isAutoDecorateContentEnabled = contentDeclaration.contentAutoTransformation ?? configuration.dictionary?.contentAutoTransformation ?? false;
|
|
15
|
-
const decoratedContent = isAutoDecorateContentEnabled ? require_utils_autoDecorateContent.autoDecorateContent(resolvedContent, isAutoDecorateContentEnabled) : resolvedContent;
|
|
16
|
-
return {
|
|
17
|
-
...contentDeclaration,
|
|
18
|
-
content: decoratedContent
|
|
19
|
-
};
|
|
20
|
-
} catch (error) {
|
|
21
|
-
(0, _intlayer_config_client.logger)(error, { level: "error" });
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
//#endregion
|
|
26
|
-
exports.processContentDeclaration = processContentDeclaration;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`../utils/autoDecorateContent.cjs`),t=require(`../utils/resolveObjectPromises.cjs`);let n=require(`@intlayer/config/client`);const r=async(r,i)=>{try{let n=await t.resolveObjectPromises(r.content),a=r.contentAutoTransformation??i.dictionary?.contentAutoTransformation??!1,o=a?e.autoDecorateContent(n,a):n;return{...r,content:o}}catch(e){(0,n.logger)(e,{level:`error`})}};exports.processContentDeclaration=r;
|
|
27
2
|
//# sourceMappingURL=processContentDeclaration.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processContentDeclaration.cjs","names":["resolveObjectPromises","autoDecorateContent"],"sources":["../../../src/buildIntlayerDictionary/processContentDeclaration.ts"],"sourcesContent":["import { logger } from '@intlayer/config/client';\nimport type { Dictionary, IntlayerConfig } from '@intlayer/types';\nimport { autoDecorateContent } from '../utils/autoDecorateContent';\nimport { resolveObjectPromises } from '../utils/resolveObjectPromises';\n\n/**\n * Function to load, process the module and return the Intlayer Dictionary from the module file\n */\nexport const processContentDeclaration = async (\n contentDeclaration: Dictionary,\n configuration: IntlayerConfig\n): Promise<Dictionary | undefined> => {\n try {\n const resolvedContent = (await resolveObjectPromises(\n contentDeclaration.content\n )) as Dictionary['content'];\n\n const isAutoDecorateContentEnabled =\n contentDeclaration.contentAutoTransformation ??\n configuration.dictionary?.contentAutoTransformation ??\n false;\n\n const decoratedContent = isAutoDecorateContentEnabled\n ? autoDecorateContent(resolvedContent, isAutoDecorateContentEnabled)\n : resolvedContent;\n\n return {\n ...contentDeclaration,\n content: decoratedContent,\n } as Dictionary;\n } catch (error) {\n logger(error, {\n level: 'error',\n });\n }\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"processContentDeclaration.cjs","names":["resolveObjectPromises","autoDecorateContent"],"sources":["../../../src/buildIntlayerDictionary/processContentDeclaration.ts"],"sourcesContent":["import { logger } from '@intlayer/config/client';\nimport type { Dictionary, IntlayerConfig } from '@intlayer/types';\nimport { autoDecorateContent } from '../utils/autoDecorateContent';\nimport { resolveObjectPromises } from '../utils/resolveObjectPromises';\n\n/**\n * Function to load, process the module and return the Intlayer Dictionary from the module file\n */\nexport const processContentDeclaration = async (\n contentDeclaration: Dictionary,\n configuration: IntlayerConfig\n): Promise<Dictionary | undefined> => {\n try {\n const resolvedContent = (await resolveObjectPromises(\n contentDeclaration.content\n )) as Dictionary['content'];\n\n const isAutoDecorateContentEnabled =\n contentDeclaration.contentAutoTransformation ??\n configuration.dictionary?.contentAutoTransformation ??\n false;\n\n const decoratedContent = isAutoDecorateContentEnabled\n ? autoDecorateContent(resolvedContent, isAutoDecorateContentEnabled)\n : resolvedContent;\n\n return {\n ...contentDeclaration,\n content: decoratedContent,\n } as Dictionary;\n } catch (error) {\n logger(error, {\n level: 'error',\n });\n }\n};\n"],"mappings":"6PAQA,MAAa,EAA4B,MACvC,EACA,IACoC,CACpC,GAAI,CACF,IAAM,EAAmB,MAAMA,EAAAA,sBAC7B,EAAmB,QACpB,CAEK,EACJ,EAAmB,2BACnB,EAAc,YAAY,2BAC1B,GAEI,EAAmB,EACrBC,EAAAA,oBAAoB,EAAiB,EAA6B,CAClE,EAEJ,MAAO,CACL,GAAG,EACH,QAAS,EACV,OACM,EAAO,EACd,EAAA,EAAA,QAAO,EAAO,CACZ,MAAO,QACR,CAAC"}
|
|
@@ -1,79 +1,5 @@
|
|
|
1
|
-
Object.defineProperty(exports,
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const require_writeJsonIfChanged = require('../writeJsonIfChanged.cjs');
|
|
6
|
-
let _intlayer_config = require("@intlayer/config");
|
|
7
|
-
let node_fs_promises = require("node:fs/promises");
|
|
8
|
-
let node_path = require("node:path");
|
|
9
|
-
let _intlayer_core = require("@intlayer/core");
|
|
10
|
-
|
|
11
|
-
//#region src/buildIntlayerDictionary/writeDynamicDictionary.ts
|
|
12
|
-
/**
|
|
13
|
-
* This function generates the content of the dictionary list file
|
|
14
|
-
*/
|
|
15
|
-
const generateDictionaryEntryPoint = (localizedDictionariesPathsRecord, format = "esm", configuration = (0, _intlayer_config.getConfiguration)()) => {
|
|
16
|
-
const { dynamicDictionariesDir } = configuration.system;
|
|
17
|
-
let content = "";
|
|
18
|
-
const formattedDictionaryMap = Object.entries(localizedDictionariesPathsRecord).filter((entry) => Boolean(entry[1])).sort(([a], [b]) => String(a).localeCompare(String(b))).map(([locale, dictionary]) => {
|
|
19
|
-
const relativePath = (0, _intlayer_config.normalizePath)((0, node_path.relative)(dynamicDictionariesDir, dictionary.dictionaryPath));
|
|
20
|
-
if (format === "esm") return ` '${locale}': () => import('./${relativePath}', { assert: { type: 'json' }}).then(mod => mod.default)`;
|
|
21
|
-
return ` '${locale}': () => Promise.resolve(require('./${relativePath}'))`;
|
|
22
|
-
}).join(",\n");
|
|
23
|
-
content += `const content = {\n${formattedDictionaryMap}\n};\n`;
|
|
24
|
-
if (format === "esm") content += `export default content;\n`;
|
|
25
|
-
if (format === "cjs") content += `module.exports = content;\n`;
|
|
26
|
-
return content;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Write the localized dictionaries to the dictionariesDir
|
|
30
|
-
* @param mergedDictionaries - The merged dictionaries
|
|
31
|
-
* @param configuration - The configuration
|
|
32
|
-
* @returns The final dictionaries
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```ts
|
|
36
|
-
* const unmergedDictionaries = await writeUnmergedDictionaries(dictionaries);
|
|
37
|
-
* const finalDictionaries = await writeFinalDictionaries(unmergedDictionaries);
|
|
38
|
-
* console.log(finalDictionaries);
|
|
39
|
-
*
|
|
40
|
-
* // .intlayer/dynamic_dictionaries/home.json
|
|
41
|
-
* // { key: 'home', content: { ... } },
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
const writeDynamicDictionary = async (mergedDictionaries, configuration = (0, _intlayer_config.getConfiguration)(), formats = ["cjs", "esm"]) => {
|
|
45
|
-
const { locales, defaultLocale } = configuration.internationalization;
|
|
46
|
-
const { dynamicDictionariesDir } = configuration.system;
|
|
47
|
-
await (0, node_fs_promises.mkdir)((0, node_path.resolve)(dynamicDictionariesDir), { recursive: true });
|
|
48
|
-
const resultDictionariesPaths = {};
|
|
49
|
-
await require_utils_parallelize.parallelize(Object.entries(mergedDictionaries).sort(([a], [b]) => String(a).localeCompare(String(b))), async ([key, dictionaryEntry]) => {
|
|
50
|
-
if (key === "undefined") return;
|
|
51
|
-
const localizedDictionariesPathsRecord = {};
|
|
52
|
-
await require_utils_parallelize.parallelize(locales, async (locale) => {
|
|
53
|
-
const localizedDictionary = (0, _intlayer_core.getPerLocaleDictionary)(dictionaryEntry.dictionary, locale, defaultLocale);
|
|
54
|
-
const outputFileName = `${key}.${locale}.json`;
|
|
55
|
-
const resultFilePath = (0, node_path.resolve)(dynamicDictionariesDir, outputFileName);
|
|
56
|
-
await require_writeJsonIfChanged.writeJsonIfChanged(resultFilePath, localizedDictionary).catch((err) => {
|
|
57
|
-
console.error(`Error creating localized ${outputFileName}:`, err);
|
|
58
|
-
});
|
|
59
|
-
localizedDictionariesPathsRecord[locale] = {
|
|
60
|
-
dictionaryPath: resultFilePath,
|
|
61
|
-
dictionary: localizedDictionary
|
|
62
|
-
};
|
|
63
|
-
});
|
|
64
|
-
resultDictionariesPaths[key] = localizedDictionariesPathsRecord;
|
|
65
|
-
await require_utils_parallelize.parallelize(formats, async (format) => {
|
|
66
|
-
const extension = format === "cjs" ? "cjs" : "mjs";
|
|
67
|
-
const content = generateDictionaryEntryPoint(localizedDictionariesPathsRecord, format, configuration);
|
|
68
|
-
await require_writeFileIfChanged.writeFileIfChanged((0, node_path.resolve)(dynamicDictionariesDir, `${key}.${extension}`), content).catch((err) => {
|
|
69
|
-
console.error(`Error creating dynamic ${(0, _intlayer_config.colorizePath)((0, node_path.resolve)(dynamicDictionariesDir, `${key}.${extension}`))}:`, err);
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
return resultDictionariesPaths;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
//#endregion
|
|
77
|
-
exports.generateDictionaryEntryPoint = generateDictionaryEntryPoint;
|
|
78
|
-
exports.writeDynamicDictionary = writeDynamicDictionary;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`../utils/parallelize.cjs`),t=require(`../writeFileIfChanged.cjs`),n=require(`../writeJsonIfChanged.cjs`);let r=require(`@intlayer/config/node`),i=require(`node:fs/promises`),a=require(`node:path`),o=require(`@intlayer/config/logger`),s=require(`@intlayer/config/utils`),c=require(`@intlayer/core/plugins`);const l=(e,t=`esm`,n=(0,r.getConfiguration)())=>{let{dynamicDictionariesDir:i}=n.system,o=``,c=Object.entries(e).filter(e=>!!e[1]).sort(([e],[t])=>String(e).localeCompare(String(t))).map(([e,n])=>{let r=(0,s.normalizePath)((0,a.relative)(i,n.dictionaryPath));return t===`esm`?` '${e}': () => import('./${r}', { assert: { type: 'json' }}).then(mod => mod.default)`:` '${e}': () => Promise.resolve(require('./${r}'))`}).join(`,
|
|
2
|
+
`);return o+=`const content = {\n${c}\n};\n`,t===`esm`&&(o+=`export default content;
|
|
3
|
+
`),t===`cjs`&&(o+=`module.exports = content;
|
|
4
|
+
`),o},u=async(s,u=(0,r.getConfiguration)(),d=[`cjs`,`esm`])=>{let{locales:f,defaultLocale:p}=u.internationalization,{dynamicDictionariesDir:m}=u.system;await(0,i.mkdir)((0,a.resolve)(m),{recursive:!0});let h={};return await e.parallelize(Object.entries(s).sort(([e],[t])=>String(e).localeCompare(String(t))),async([r,i])=>{if(r===`undefined`)return;let s={};await e.parallelize(f,async e=>{let t=(0,c.getPerLocaleDictionary)(i.dictionary,e,p),o=`${r}.${e}.json`,l=(0,a.resolve)(m,o);await n.writeJsonIfChanged(l,t).catch(e=>{console.error(`Error creating localized ${o}:`,e)}),s[e]={dictionaryPath:l,dictionary:t}}),h[r]=s,await e.parallelize(d,async e=>{let n=e===`cjs`?`cjs`:`mjs`,i=l(s,e,u);await t.writeFileIfChanged((0,a.resolve)(m,`${r}.${n}`),i).catch(e=>{console.error(`Error creating dynamic ${(0,o.colorizePath)((0,a.resolve)(m,`${r}.${n}`))}:`,e)})})}),h};exports.generateDictionaryEntryPoint=l,exports.writeDynamicDictionary=u;
|
|
79
5
|
//# sourceMappingURL=writeDynamicDictionary.cjs.map
|