@intlayer/chokidar 6.1.6 → 7.0.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{cjs → assets}/getContentDeclarationFileTemplate/cjsTemplate.txt +3 -2
- package/dist/{cjs → assets}/getContentDeclarationFileTemplate/esmTemplate.txt +2 -1
- package/dist/{cjs → assets}/getContentDeclarationFileTemplate/jsonTemplate.txt +2 -1
- package/dist/{cjs → assets}/getContentDeclarationFileTemplate/tsTemplate.txt +2 -1
- package/dist/cjs/_virtual/_utils_asset.cjs +104 -0
- package/dist/cjs/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/cjs/buildIntlayerDictionary/buildIntlayerDictionary.cjs +42 -80
- package/dist/cjs/buildIntlayerDictionary/buildIntlayerDictionary.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/index.cjs +5 -25
- package/dist/cjs/buildIntlayerDictionary/processContentDeclaration.cjs +21 -42
- package/dist/cjs/buildIntlayerDictionary/processContentDeclaration.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/writeDynamicDictionary.cjs +79 -116
- package/dist/cjs/buildIntlayerDictionary/writeDynamicDictionary.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/writeFetchDictionary.cjs +62 -86
- package/dist/cjs/buildIntlayerDictionary/writeFetchDictionary.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/writeMergedDictionary.cjs +48 -69
- package/dist/cjs/buildIntlayerDictionary/writeMergedDictionary.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/writeRemoteDictionary.cjs +42 -52
- package/dist/cjs/buildIntlayerDictionary/writeRemoteDictionary.cjs.map +1 -1
- package/dist/cjs/buildIntlayerDictionary/writeUnmergedDictionary.cjs +60 -82
- package/dist/cjs/buildIntlayerDictionary/writeUnmergedDictionary.cjs.map +1 -1
- package/dist/cjs/cleanOutputDir.cjs +20 -60
- package/dist/cjs/cleanOutputDir.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/createDictionaryEntryPoint.cjs +64 -103
- package/dist/cjs/createDictionaryEntryPoint/createDictionaryEntryPoint.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/generateDictionaryListContent.cjs +41 -73
- package/dist/cjs/createDictionaryEntryPoint/generateDictionaryListContent.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDictionariesPath.cjs +19 -49
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDictionariesPath.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs +20 -50
- package/dist/cjs/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.cjs +20 -50
- package/dist/cjs/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs +19 -49
- package/dist/cjs/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs +19 -49
- package/dist/cjs/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.cjs.map +1 -1
- package/dist/cjs/createDictionaryEntryPoint/index.cjs +15 -35
- package/dist/cjs/createType/createModuleAugmentation.cjs +56 -108
- package/dist/cjs/createType/createModuleAugmentation.cjs.map +1 -1
- package/dist/cjs/createType/createType.cjs +29 -58
- package/dist/cjs/createType/createType.cjs.map +1 -1
- package/dist/cjs/createType/index.cjs +7 -25
- package/dist/cjs/fetchDistantDictionaries.cjs +49 -77
- package/dist/cjs/fetchDistantDictionaries.cjs.map +1 -1
- package/dist/cjs/filterInvalidDictionaries.cjs +26 -59
- package/dist/cjs/filterInvalidDictionaries.cjs.map +1 -1
- package/dist/cjs/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs +32 -68
- package/dist/cjs/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.cjs.map +1 -1
- package/dist/cjs/handleAdditionalContentDeclarationFile.cjs +32 -51
- package/dist/cjs/handleAdditionalContentDeclarationFile.cjs.map +1 -1
- package/dist/cjs/handleContentDeclarationFileChange.cjs +35 -56
- package/dist/cjs/handleContentDeclarationFileChange.cjs.map +1 -1
- package/dist/cjs/handleUnlinkedContentDeclarationFile.cjs +36 -0
- package/dist/cjs/handleUnlinkedContentDeclarationFile.cjs.map +1 -0
- package/dist/cjs/index.cjs +103 -156
- package/dist/cjs/listDictionariesPath.cjs +27 -59
- package/dist/cjs/listDictionariesPath.cjs.map +1 -1
- package/dist/cjs/listGitFiles.cjs +93 -162
- package/dist/cjs/listGitFiles.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/getIntlayerBundle.cjs +70 -0
- package/dist/cjs/loadDictionaries/getIntlayerBundle.cjs.map +1 -0
- package/dist/cjs/loadDictionaries/index.cjs +11 -29
- package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs +68 -90
- package/dist/cjs/loadDictionaries/loadContentDeclaration.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/loadDictionaries.cjs +111 -166
- package/dist/cjs/loadDictionaries/loadDictionaries.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/loadLocalDictionaries.cjs +27 -53
- package/dist/cjs/loadDictionaries/loadLocalDictionaries.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs +60 -102
- package/dist/cjs/loadDictionaries/loadRemoteDictionaries.cjs.map +1 -1
- package/dist/cjs/loadDictionaries/log.cjs +107 -182
- package/dist/cjs/loadDictionaries/log.cjs.map +1 -1
- package/dist/cjs/prepareIntlayer.cjs +73 -130
- package/dist/cjs/prepareIntlayer.cjs.map +1 -1
- package/dist/cjs/reduceDictionaryContent/applyMask.cjs +27 -61
- package/dist/cjs/reduceDictionaryContent/applyMask.cjs.map +1 -1
- package/dist/cjs/reduceDictionaryContent/reduceDictionaryContent.cjs +10 -32
- package/dist/cjs/reduceDictionaryContent/reduceDictionaryContent.cjs.map +1 -1
- package/dist/cjs/utils/chunkJSON.cjs +329 -0
- package/dist/cjs/utils/chunkJSON.cjs.map +1 -0
- package/dist/cjs/utils/extractErrorMessage.cjs +92 -135
- package/dist/cjs/utils/extractErrorMessage.cjs.map +1 -1
- package/dist/cjs/utils/formatter.cjs +19 -49
- package/dist/cjs/utils/formatter.cjs.map +1 -1
- package/dist/cjs/utils/getChunk.cjs +34 -0
- package/dist/cjs/utils/getChunk.cjs.map +1 -0
- package/dist/cjs/utils/getFileHash.cjs +9 -40
- package/dist/cjs/utils/getFileHash.cjs.map +1 -1
- package/dist/cjs/utils/getFormatFromExtension.cjs +23 -54
- package/dist/cjs/utils/getFormatFromExtension.cjs.map +1 -1
- package/dist/cjs/utils/kebabCaseToCamelCase.cjs +11 -36
- package/dist/cjs/utils/kebabCaseToCamelCase.cjs.map +1 -1
- package/dist/cjs/utils/pLimit.cjs +128 -0
- package/dist/cjs/utils/pLimit.cjs.map +1 -0
- package/dist/cjs/utils/parallelize.cjs +10 -169
- package/dist/cjs/utils/parallelize.cjs.map +1 -1
- package/dist/cjs/utils/parallelizeGlobal.cjs +29 -0
- package/dist/cjs/utils/parallelizeGlobal.cjs.map +1 -0
- package/dist/cjs/utils/reduceObjectFormat.cjs +31 -0
- package/dist/cjs/utils/reduceObjectFormat.cjs.map +1 -0
- package/dist/cjs/utils/resolveObjectPromises.cjs +18 -48
- package/dist/cjs/utils/resolveObjectPromises.cjs.map +1 -1
- package/dist/cjs/utils/runOnce.cjs +80 -57
- package/dist/cjs/utils/runOnce.cjs.map +1 -1
- package/dist/cjs/utils/runParallel.cjs +163 -74
- package/dist/cjs/utils/runParallel.cjs.map +1 -1
- package/dist/cjs/utils/sortAlphabetically.cjs +5 -27
- package/dist/cjs/utils/sortAlphabetically.cjs.map +1 -1
- package/dist/cjs/utils/splitTextByLine.cjs +11 -0
- package/dist/cjs/utils/splitTextByLine.cjs.map +1 -0
- package/dist/cjs/utils/verifyIdenticObjectFormat copy.cjs +54 -0
- package/dist/cjs/utils/verifyIdenticObjectFormat copy.cjs.map +1 -0
- package/dist/cjs/utils/verifyIdenticObjectFormat.cjs +60 -0
- package/dist/cjs/utils/verifyIdenticObjectFormat.cjs.map +1 -0
- package/dist/cjs/watcher.cjs +61 -83
- package/dist/cjs/watcher.cjs.map +1 -1
- package/dist/cjs/writeConfiguration/index.cjs +15 -35
- package/dist/cjs/writeConfiguration/index.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/detectExportedComponentName.cjs +25 -51
- package/dist/cjs/writeContentDeclaration/detectExportedComponentName.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/dictionaryStatus.cjs +0 -17
- package/dist/cjs/writeContentDeclaration/index.cjs +9 -33
- package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs +77 -0
- package/dist/cjs/writeContentDeclaration/processContentDeclarationContent.cjs.map +1 -0
- package/dist/cjs/writeContentDeclaration/transformJSFile.cjs +1731 -755
- package/dist/cjs/writeContentDeclaration/transformJSFile.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs +113 -112
- package/dist/cjs/writeContentDeclaration/writeContentDeclaration.cjs.map +1 -1
- package/dist/cjs/writeContentDeclaration/writeJSFile.cjs +56 -66
- package/dist/cjs/writeContentDeclaration/writeJSFile.cjs.map +1 -1
- package/dist/cjs/writeFileIfChanged.cjs +10 -43
- package/dist/cjs/writeFileIfChanged.cjs.map +1 -1
- package/dist/cjs/writeJsonIfChanged.cjs +14 -31
- package/dist/cjs/writeJsonIfChanged.cjs.map +1 -1
- package/dist/esm/_virtual/_utils_asset.mjs +100 -0
- package/dist/esm/_virtual/rolldown_runtime.mjs +8 -0
- package/dist/esm/buildIntlayerDictionary/buildIntlayerDictionary.mjs +35 -54
- package/dist/esm/buildIntlayerDictionary/buildIntlayerDictionary.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/index.mjs +4 -3
- package/dist/esm/buildIntlayerDictionary/processContentDeclaration.mjs +18 -17
- package/dist/esm/buildIntlayerDictionary/processContentDeclaration.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/writeDynamicDictionary.mjs +69 -91
- package/dist/esm/buildIntlayerDictionary/writeDynamicDictionary.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/writeFetchDictionary.mjs +53 -61
- package/dist/esm/buildIntlayerDictionary/writeFetchDictionary.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/writeMergedDictionary.mjs +40 -42
- package/dist/esm/buildIntlayerDictionary/writeMergedDictionary.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/writeRemoteDictionary.mjs +35 -25
- package/dist/esm/buildIntlayerDictionary/writeRemoteDictionary.mjs.map +1 -1
- package/dist/esm/buildIntlayerDictionary/writeUnmergedDictionary.mjs +53 -56
- package/dist/esm/buildIntlayerDictionary/writeUnmergedDictionary.mjs.map +1 -1
- package/dist/esm/cleanOutputDir.mjs +17 -36
- package/dist/esm/cleanOutputDir.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/createDictionaryEntryPoint.mjs +51 -70
- package/dist/esm/createDictionaryEntryPoint/createDictionaryEntryPoint.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/generateDictionaryListContent.mjs +36 -47
- package/dist/esm/createDictionaryEntryPoint/generateDictionaryListContent.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltDictionariesPath.mjs +14 -14
- package/dist/esm/createDictionaryEntryPoint/getBuiltDictionariesPath.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.mjs +15 -15
- package/dist/esm/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.mjs +15 -15
- package/dist/esm/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.mjs +14 -14
- package/dist/esm/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.mjs +14 -14
- package/dist/esm/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.mjs.map +1 -1
- package/dist/esm/createDictionaryEntryPoint/index.mjs +9 -8
- package/dist/esm/createType/createModuleAugmentation.mjs +48 -71
- package/dist/esm/createType/createModuleAugmentation.mjs.map +1 -1
- package/dist/esm/createType/createType.mjs +24 -35
- package/dist/esm/createType/createType.mjs.map +1 -1
- package/dist/esm/createType/index.mjs +4 -3
- package/dist/esm/fetchDistantDictionaries.mjs +45 -52
- package/dist/esm/fetchDistantDictionaries.mjs.map +1 -1
- package/dist/esm/filterInvalidDictionaries.mjs +22 -37
- package/dist/esm/filterInvalidDictionaries.mjs.map +1 -1
- package/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs +31 -42
- package/dist/esm/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.mjs.map +1 -1
- package/dist/esm/handleAdditionalContentDeclarationFile.mjs +27 -24
- package/dist/esm/handleAdditionalContentDeclarationFile.mjs.map +1 -1
- package/dist/esm/handleContentDeclarationFileChange.mjs +30 -29
- package/dist/esm/handleContentDeclarationFileChange.mjs.map +1 -1
- package/dist/esm/handleUnlinkedContentDeclarationFile.mjs +34 -0
- package/dist/esm/handleUnlinkedContentDeclarationFile.mjs.map +1 -0
- package/dist/esm/index.mjs +39 -99
- package/dist/esm/listDictionariesPath.mjs +24 -24
- package/dist/esm/listDictionariesPath.mjs.map +1 -1
- package/dist/esm/listGitFiles.mjs +83 -124
- package/dist/esm/listGitFiles.mjs.map +1 -1
- package/dist/esm/loadDictionaries/getIntlayerBundle.mjs +66 -0
- package/dist/esm/loadDictionaries/getIntlayerBundle.mjs.map +1 -0
- package/dist/esm/loadDictionaries/index.mjs +6 -5
- package/dist/esm/loadDictionaries/loadContentDeclaration.mjs +61 -70
- package/dist/esm/loadDictionaries/loadContentDeclaration.mjs.map +1 -1
- package/dist/esm/loadDictionaries/loadDictionaries.mjs +105 -146
- package/dist/esm/loadDictionaries/loadDictionaries.mjs.map +1 -1
- package/dist/esm/loadDictionaries/loadLocalDictionaries.mjs +23 -31
- package/dist/esm/loadDictionaries/loadLocalDictionaries.mjs.map +1 -1
- package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs +52 -74
- package/dist/esm/loadDictionaries/loadRemoteDictionaries.mjs.map +1 -1
- package/dist/esm/loadDictionaries/log.mjs +105 -165
- package/dist/esm/loadDictionaries/log.mjs.map +1 -1
- package/dist/esm/prepareIntlayer.mjs +64 -97
- package/dist/esm/prepareIntlayer.mjs.map +1 -1
- package/dist/esm/reduceDictionaryContent/applyMask.mjs +26 -37
- package/dist/esm/reduceDictionaryContent/applyMask.mjs.map +1 -1
- package/dist/esm/reduceDictionaryContent/reduceDictionaryContent.mjs +7 -7
- package/dist/esm/reduceDictionaryContent/reduceDictionaryContent.mjs.map +1 -1
- package/dist/esm/utils/chunkJSON.mjs +327 -0
- package/dist/esm/utils/chunkJSON.mjs.map +1 -0
- package/dist/esm/utils/extractErrorMessage.mjs +91 -111
- package/dist/esm/utils/extractErrorMessage.mjs.map +1 -1
- package/dist/esm/utils/formatter.mjs +10 -12
- package/dist/esm/utils/formatter.mjs.map +1 -1
- package/dist/esm/utils/getChunk.mjs +34 -0
- package/dist/esm/utils/getChunk.mjs.map +1 -0
- package/dist/esm/utils/getFileHash.mjs +6 -5
- package/dist/esm/utils/getFileHash.mjs.map +1 -1
- package/dist/esm/utils/getFormatFromExtension.mjs +21 -29
- package/dist/esm/utils/getFormatFromExtension.mjs.map +1 -1
- package/dist/esm/utils/kebabCaseToCamelCase.mjs +10 -12
- package/dist/esm/utils/kebabCaseToCamelCase.mjs.map +1 -1
- package/dist/esm/utils/pLimit.mjs +126 -0
- package/dist/esm/utils/pLimit.mjs.map +1 -0
- package/dist/esm/utils/parallelize.mjs +10 -144
- package/dist/esm/utils/parallelize.mjs.map +1 -1
- package/dist/esm/utils/parallelizeGlobal.mjs +27 -0
- package/dist/esm/utils/parallelizeGlobal.mjs.map +1 -0
- package/dist/esm/utils/reduceObjectFormat.mjs +30 -0
- package/dist/esm/utils/reduceObjectFormat.mjs.map +1 -0
- package/dist/esm/utils/resolveObjectPromises.mjs +17 -24
- package/dist/esm/utils/resolveObjectPromises.mjs.map +1 -1
- package/dist/esm/utils/runOnce.mjs +76 -33
- package/dist/esm/utils/runOnce.mjs.map +1 -1
- package/dist/esm/utils/runParallel.mjs +160 -40
- package/dist/esm/utils/runParallel.mjs.map +1 -1
- package/dist/esm/utils/sortAlphabetically.mjs +4 -3
- package/dist/esm/utils/sortAlphabetically.mjs.map +1 -1
- package/dist/esm/utils/splitTextByLine.mjs +10 -0
- package/dist/esm/utils/splitTextByLine.mjs.map +1 -0
- package/dist/esm/utils/verifyIdenticObjectFormat copy.mjs +53 -0
- package/dist/esm/utils/verifyIdenticObjectFormat copy.mjs.map +1 -0
- package/dist/esm/utils/verifyIdenticObjectFormat.mjs +59 -0
- package/dist/esm/utils/verifyIdenticObjectFormat.mjs.map +1 -0
- package/dist/esm/watcher.mjs +53 -58
- package/dist/esm/watcher.mjs.map +1 -1
- package/dist/esm/writeConfiguration/index.mjs +11 -10
- package/dist/esm/writeConfiguration/index.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/detectExportedComponentName.mjs +24 -27
- package/dist/esm/writeContentDeclaration/detectExportedComponentName.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/dictionaryStatus.mjs +0 -1
- package/dist/esm/writeContentDeclaration/index.mjs +6 -7
- package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs +71 -0
- package/dist/esm/writeContentDeclaration/processContentDeclarationContent.mjs.map +1 -0
- package/dist/esm/writeContentDeclaration/transformJSFile.mjs +1726 -735
- package/dist/esm/writeContentDeclaration/transformJSFile.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs +105 -76
- package/dist/esm/writeContentDeclaration/writeContentDeclaration.mjs.map +1 -1
- package/dist/esm/writeContentDeclaration/writeJSFile.mjs +48 -46
- package/dist/esm/writeContentDeclaration/writeJSFile.mjs.map +1 -1
- package/dist/esm/writeFileIfChanged.mjs +7 -18
- package/dist/esm/writeFileIfChanged.mjs.map +1 -1
- package/dist/esm/writeJsonIfChanged.mjs +14 -7
- package/dist/esm/writeJsonIfChanged.mjs.map +1 -1
- package/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts +14 -7
- package/dist/types/buildIntlayerDictionary/buildIntlayerDictionary.d.ts.map +1 -1
- package/dist/types/buildIntlayerDictionary/index.d.ts +3 -3
- package/dist/types/buildIntlayerDictionary/processContentDeclaration.d.ts +7 -2
- package/dist/types/buildIntlayerDictionary/processContentDeclaration.d.ts.map +1 -1
- package/dist/types/buildIntlayerDictionary/writeDynamicDictionary.d.ts +14 -10
- package/dist/types/buildIntlayerDictionary/writeDynamicDictionary.d.ts.map +1 -1
- package/dist/types/buildIntlayerDictionary/writeFetchDictionary.d.ts +8 -3
- package/dist/types/buildIntlayerDictionary/writeFetchDictionary.d.ts.map +1 -1
- package/dist/types/buildIntlayerDictionary/writeMergedDictionary.d.ts +12 -7
- package/dist/types/buildIntlayerDictionary/writeMergedDictionary.d.ts.map +1 -1
- package/dist/types/buildIntlayerDictionary/writeRemoteDictionary.d.ts +8 -2
- package/dist/types/buildIntlayerDictionary/writeRemoteDictionary.d.ts.map +1 -1
- package/dist/types/buildIntlayerDictionary/writeUnmergedDictionary.d.ts +10 -6
- package/dist/types/buildIntlayerDictionary/writeUnmergedDictionary.d.ts.map +1 -1
- package/dist/types/cleanOutputDir.d.ts +6 -1
- package/dist/types/cleanOutputDir.d.ts.map +1 -1
- package/dist/types/createDictionaryEntryPoint/createDictionaryEntryPoint.d.ts +6 -1
- package/dist/types/createDictionaryEntryPoint/createDictionaryEntryPoint.d.ts.map +1 -1
- package/dist/types/createDictionaryEntryPoint/generateDictionaryListContent.d.ts +6 -1
- package/dist/types/createDictionaryEntryPoint/generateDictionaryListContent.d.ts.map +1 -1
- package/dist/types/createDictionaryEntryPoint/getBuiltDictionariesPath.d.ts +7 -1
- package/dist/types/createDictionaryEntryPoint/getBuiltDictionariesPath.d.ts.map +1 -1
- package/dist/types/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.d.ts +7 -1
- package/dist/types/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.d.ts.map +1 -1
- package/dist/types/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.d.ts +7 -1
- package/dist/types/createDictionaryEntryPoint/getBuiltFetchDictionariesPath.d.ts.map +1 -1
- package/dist/types/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.d.ts +7 -1
- package/dist/types/createDictionaryEntryPoint/getBuiltRemoteDictionariesPath.d.ts.map +1 -1
- package/dist/types/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.d.ts +7 -1
- package/dist/types/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.d.ts.map +1 -1
- package/dist/types/createDictionaryEntryPoint/index.d.ts +8 -8
- package/dist/types/createType/createModuleAugmentation.d.ts +8 -5
- package/dist/types/createType/createModuleAugmentation.d.ts.map +1 -1
- package/dist/types/createType/createType.d.ts +7 -4
- package/dist/types/createType/createType.d.ts.map +1 -1
- package/dist/types/createType/index.d.ts +3 -3
- package/dist/types/fetchDistantDictionaries.d.ts +10 -7
- package/dist/types/fetchDistantDictionaries.d.ts.map +1 -1
- package/dist/types/filterInvalidDictionaries.d.ts +7 -4
- package/dist/types/filterInvalidDictionaries.d.ts.map +1 -1
- package/dist/types/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.d.ts +6 -2
- package/dist/types/getContentDeclarationFileTemplate/getContentDeclarationFileTemplate.d.ts.map +1 -1
- package/dist/types/handleAdditionalContentDeclarationFile.d.ts +6 -2
- package/dist/types/handleAdditionalContentDeclarationFile.d.ts.map +1 -1
- package/dist/types/handleContentDeclarationFileChange.d.ts +6 -2
- package/dist/types/handleContentDeclarationFileChange.d.ts.map +1 -1
- package/dist/types/handleUnlinkedContentDeclarationFile.d.ts +7 -0
- package/dist/types/handleUnlinkedContentDeclarationFile.d.ts.map +1 -0
- package/dist/types/index.d.ts +49 -33
- package/dist/types/listDictionariesPath.d.ts +7 -2
- package/dist/types/listDictionariesPath.d.ts.map +1 -1
- package/dist/types/listGitFiles.d.ts +24 -12
- package/dist/types/listGitFiles.d.ts.map +1 -1
- package/dist/types/loadDictionaries/getIntlayerBundle.d.ts +11 -0
- package/dist/types/loadDictionaries/getIntlayerBundle.d.ts.map +1 -0
- package/dist/types/loadDictionaries/index.d.ts +5 -5
- package/dist/types/loadDictionaries/loadContentDeclaration.d.ts +8 -5
- package/dist/types/loadDictionaries/loadContentDeclaration.d.ts.map +1 -1
- package/dist/types/loadDictionaries/loadDictionaries.d.ts +18 -14
- package/dist/types/loadDictionaries/loadDictionaries.d.ts.map +1 -1
- package/dist/types/loadDictionaries/loadLocalDictionaries.d.ts +6 -3
- package/dist/types/loadDictionaries/loadLocalDictionaries.d.ts.map +1 -1
- package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts +13 -8
- package/dist/types/loadDictionaries/loadRemoteDictionaries.d.ts.map +1 -1
- package/dist/types/loadDictionaries/log.d.ts +28 -24
- package/dist/types/loadDictionaries/log.d.ts.map +1 -1
- package/dist/types/prepareIntlayer.d.ts +12 -2
- package/dist/types/prepareIntlayer.d.ts.map +1 -1
- package/dist/types/reduceDictionaryContent/applyMask.d.ts +6 -2
- package/dist/types/reduceDictionaryContent/applyMask.d.ts.map +1 -1
- package/dist/types/reduceDictionaryContent/reduceDictionaryContent.d.ts +6 -2
- package/dist/types/reduceDictionaryContent/reduceDictionaryContent.d.ts.map +1 -1
- package/dist/types/utils/chunkJSON.d.ts +56 -0
- package/dist/types/utils/chunkJSON.d.ts.map +1 -0
- package/dist/types/utils/extractErrorMessage.d.ts +4 -1
- package/dist/types/utils/extractErrorMessage.d.ts.map +1 -1
- package/dist/types/utils/formatter.d.ts +8 -3
- package/dist/types/utils/formatter.d.ts.map +1 -1
- package/dist/types/utils/getChunk.d.ts +11 -0
- package/dist/types/utils/getChunk.d.ts.map +1 -0
- package/dist/types/utils/getFileHash.d.ts +4 -1
- package/dist/types/utils/getFileHash.d.ts.map +1 -1
- package/dist/types/utils/getFormatFromExtension.d.ts +7 -4
- package/dist/types/utils/getFormatFromExtension.d.ts.map +1 -1
- package/dist/types/utils/kebabCaseToCamelCase.d.ts +4 -1
- package/dist/types/utils/kebabCaseToCamelCase.d.ts.map +1 -1
- package/dist/types/utils/pLimit.d.ts +16 -0
- package/dist/types/utils/pLimit.d.ts.map +1 -0
- package/dist/types/utils/parallelize.d.ts +4 -13
- package/dist/types/utils/parallelize.d.ts.map +1 -1
- package/dist/types/utils/parallelizeGlobal.d.ts +22 -0
- package/dist/types/utils/parallelizeGlobal.d.ts.map +1 -0
- package/dist/types/utils/reduceObjectFormat.d.ts +17 -0
- package/dist/types/utils/reduceObjectFormat.d.ts.map +1 -0
- package/dist/types/utils/resolveObjectPromises.d.ts +4 -1
- package/dist/types/utils/resolveObjectPromises.d.ts.map +1 -1
- package/dist/types/utils/runOnce.d.ts +23 -2
- package/dist/types/utils/runOnce.d.ts.map +1 -1
- package/dist/types/utils/runParallel.d.ts +9 -6
- package/dist/types/utils/runParallel.d.ts.map +1 -1
- package/dist/types/utils/sortAlphabetically.d.ts +4 -1
- package/dist/types/utils/sortAlphabetically.d.ts.map +1 -1
- package/dist/types/utils/splitTextByLine.d.ts +5 -0
- package/dist/types/utils/splitTextByLine.d.ts.map +1 -0
- package/dist/types/utils/verifyIdenticObjectFormat copy.d.ts +23 -0
- package/dist/types/utils/verifyIdenticObjectFormat copy.d.ts.map +1 -0
- package/dist/types/utils/verifyIdenticObjectFormat.d.ts +23 -0
- package/dist/types/utils/verifyIdenticObjectFormat.d.ts.map +1 -0
- package/dist/types/watcher.d.ts +13 -9
- package/dist/types/watcher.d.ts.map +1 -1
- package/dist/types/writeConfiguration/index.d.ts +6 -2
- package/dist/types/writeConfiguration/index.d.ts.map +1 -1
- package/dist/types/writeContentDeclaration/detectExportedComponentName.d.ts +4 -1
- package/dist/types/writeContentDeclaration/detectExportedComponentName.d.ts.map +1 -1
- package/dist/types/writeContentDeclaration/dictionaryStatus.d.ts +4 -1
- package/dist/types/writeContentDeclaration/dictionaryStatus.d.ts.map +1 -1
- package/dist/types/writeContentDeclaration/index.d.ts +6 -7
- package/dist/types/writeContentDeclaration/processContentDeclarationContent.d.ts +7 -0
- package/dist/types/writeContentDeclaration/processContentDeclarationContent.d.ts.map +1 -0
- package/dist/types/writeContentDeclaration/transformJSFile.d.ts +33 -6
- package/dist/types/writeContentDeclaration/transformJSFile.d.ts.map +1 -1
- package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts +14 -6
- package/dist/types/writeContentDeclaration/writeContentDeclaration.d.ts.map +1 -1
- package/dist/types/writeContentDeclaration/writeJSFile.d.ts +7 -3
- package/dist/types/writeContentDeclaration/writeJSFile.d.ts.map +1 -1
- package/dist/types/writeFileIfChanged.d.ts +7 -2
- package/dist/types/writeFileIfChanged.d.ts.map +1 -1
- package/dist/types/writeJsonIfChanged.d.ts +7 -2
- package/dist/types/writeJsonIfChanged.d.ts.map +1 -1
- package/package.json +48 -54
- package/LICENSE +0 -202
- package/dist/cjs/buildIntlayerDictionary/index.cjs.map +0 -1
- package/dist/cjs/createDictionaryEntryPoint/index.cjs.map +0 -1
- package/dist/cjs/createType/index.cjs.map +0 -1
- package/dist/cjs/handleUnlikedContentDeclarationFile.cjs +0 -57
- package/dist/cjs/handleUnlikedContentDeclarationFile.cjs.map +0 -1
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/cjs/loadDictionaries/index.cjs.map +0 -1
- package/dist/cjs/mergeDictionaries.cjs +0 -143
- package/dist/cjs/mergeDictionaries.cjs.map +0 -1
- package/dist/cjs/orderDictionaries.cjs +0 -71
- package/dist/cjs/orderDictionaries.cjs.map +0 -1
- package/dist/cjs/prepareContentDeclaration.cjs +0 -93
- package/dist/cjs/prepareContentDeclaration.cjs.map +0 -1
- package/dist/cjs/processPerLocaleDictionary.cjs +0 -49
- package/dist/cjs/processPerLocaleDictionary.cjs.map +0 -1
- package/dist/cjs/utils/getExtention.cjs +0 -37
- package/dist/cjs/utils/getExtention.cjs.map +0 -1
- package/dist/cjs/writeContentDeclaration/dictionaryStatus.cjs.map +0 -1
- package/dist/cjs/writeContentDeclaration/formatCode.cjs +0 -78
- package/dist/cjs/writeContentDeclaration/formatCode.cjs.map +0 -1
- package/dist/cjs/writeContentDeclaration/index.cjs.map +0 -1
- package/dist/esm/buildIntlayerDictionary/index.mjs.map +0 -1
- package/dist/esm/createDictionaryEntryPoint/index.mjs.map +0 -1
- package/dist/esm/createType/index.mjs.map +0 -1
- package/dist/esm/getContentDeclarationFileTemplate/cjsTemplate.txt +0 -9
- package/dist/esm/getContentDeclarationFileTemplate/esmTemplate.txt +0 -9
- package/dist/esm/getContentDeclarationFileTemplate/jsonTemplate.txt +0 -5
- package/dist/esm/getContentDeclarationFileTemplate/tsTemplate.txt +0 -8
- package/dist/esm/handleUnlikedContentDeclarationFile.mjs +0 -33
- package/dist/esm/handleUnlikedContentDeclarationFile.mjs.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/loadDictionaries/index.mjs.map +0 -1
- package/dist/esm/mergeDictionaries.mjs +0 -109
- package/dist/esm/mergeDictionaries.mjs.map +0 -1
- package/dist/esm/orderDictionaries.mjs +0 -37
- package/dist/esm/orderDictionaries.mjs.map +0 -1
- package/dist/esm/prepareContentDeclaration.mjs +0 -72
- package/dist/esm/prepareContentDeclaration.mjs.map +0 -1
- package/dist/esm/processPerLocaleDictionary.mjs +0 -25
- package/dist/esm/processPerLocaleDictionary.mjs.map +0 -1
- package/dist/esm/utils/getExtention.mjs +0 -13
- package/dist/esm/utils/getExtention.mjs.map +0 -1
- package/dist/esm/writeContentDeclaration/dictionaryStatus.mjs.map +0 -1
- package/dist/esm/writeContentDeclaration/formatCode.mjs +0 -44
- package/dist/esm/writeContentDeclaration/formatCode.mjs.map +0 -1
- package/dist/esm/writeContentDeclaration/index.mjs.map +0 -1
- package/dist/types/buildIntlayerDictionary/index.d.ts.map +0 -1
- package/dist/types/createDictionaryEntryPoint/index.d.ts.map +0 -1
- package/dist/types/createType/index.d.ts.map +0 -1
- package/dist/types/handleUnlikedContentDeclarationFile.d.ts +0 -3
- package/dist/types/handleUnlikedContentDeclarationFile.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/loadDictionaries/index.d.ts.map +0 -1
- package/dist/types/mergeDictionaries.d.ts +0 -3
- package/dist/types/mergeDictionaries.d.ts.map +0 -1
- package/dist/types/orderDictionaries.d.ts +0 -10
- package/dist/types/orderDictionaries.d.ts.map +0 -1
- package/dist/types/prepareContentDeclaration.d.ts +0 -3
- package/dist/types/prepareContentDeclaration.d.ts.map +0 -1
- package/dist/types/processPerLocaleDictionary.d.ts +0 -32
- package/dist/types/processPerLocaleDictionary.d.ts.map +0 -1
- package/dist/types/utils/getExtention.d.ts +0 -3
- package/dist/types/utils/getExtention.d.ts.map +0 -1
- package/dist/types/writeContentDeclaration/formatCode.d.ts +0 -2
- package/dist/types/writeContentDeclaration/formatCode.d.ts.map +0 -1
- package/dist/types/writeContentDeclaration/index.d.ts.map +0 -1
|
@@ -1,10 +1,29 @@
|
|
|
1
|
+
//#region src/utils/runOnce.d.ts
|
|
2
|
+
type RunOnceOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* The function to execute when the sentinel is not found or is older than the cache timeout.
|
|
5
|
+
*/
|
|
6
|
+
onIsCached?: () => void | Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* The time window in milliseconds during which the sentinel is considered valid.
|
|
9
|
+
*
|
|
10
|
+
* @default 60000 = 1 minute
|
|
11
|
+
*/
|
|
12
|
+
cacheTimeoutMs?: number;
|
|
13
|
+
/**
|
|
14
|
+
* If true, the callback will always run. If undefined, the callback will run only if the sentinel is older than the cache timeout.
|
|
15
|
+
*
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
forceRun?: boolean;
|
|
19
|
+
};
|
|
1
20
|
/**
|
|
2
21
|
* Ensures a callback function runs only once within a specified time window across multiple processes.
|
|
3
22
|
* Uses a sentinel file to coordinate execution and prevent duplicate work.
|
|
4
23
|
*
|
|
5
24
|
* @param sentinelFilePath - Path to the sentinel file used for coordination
|
|
6
25
|
* @param callback - The function to execute (should be async)
|
|
7
|
-
* @param
|
|
26
|
+
* @param options - The options for the runOnce function
|
|
8
27
|
*
|
|
9
28
|
* @example
|
|
10
29
|
* ```typescript
|
|
@@ -20,5 +39,7 @@
|
|
|
20
39
|
*
|
|
21
40
|
* @throws {Error} When there are unexpected filesystem errors
|
|
22
41
|
*/
|
|
23
|
-
|
|
42
|
+
declare const runOnce: (sentinelFilePath: string, callback: () => void | Promise<void>, options?: RunOnceOptions) => Promise<void>;
|
|
43
|
+
//#endregion
|
|
44
|
+
export { runOnce };
|
|
24
45
|
//# sourceMappingURL=runOnce.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runOnce.d.ts","
|
|
1
|
+
{"version":3,"file":"runOnce.d.ts","names":[],"sources":["../../../src/utils/runOnce.ts"],"sourcesContent":[],"mappings":";KAIK,cAAA;EAAA;AAkDL;;EAGY,UAAA,CAAA,EAAA,GAAA,GAAA,IAAA,GAjDgB,OAiDhB,CAAA,IAAA,CAAA;EAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAHb,2DAEY,yBACb,mBAAc"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
//#region src/utils/runParallel.d.ts
|
|
2
|
+
type ParallelHandle = {
|
|
3
|
+
kill: () => void;
|
|
4
|
+
result: Promise<any>;
|
|
5
|
+
commandText: string;
|
|
5
6
|
};
|
|
6
7
|
/**
|
|
7
|
-
* Start a cross-platform parallel process
|
|
8
|
+
* Start a cross-platform parallel process without external deps.
|
|
8
9
|
* Accepts either a single string (e.g., 'next start') or an array of tokens (e.g., ['next', 'start']).
|
|
9
10
|
*/
|
|
10
|
-
|
|
11
|
+
declare const runParallel: (proc?: string | string[]) => ParallelHandle;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { ParallelHandle, runParallel };
|
|
11
14
|
//# sourceMappingURL=runParallel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runParallel.d.ts","
|
|
1
|
+
{"version":3,"file":"runParallel.d.ts","names":[],"sources":["../../../src/utils/runParallel.ts"],"sourcesContent":[],"mappings":";KAGY,cAAA;EAAA,IAAA,EAAA,GAAA,GAAA,IAAA;EAUC,MAAA,EARH,OAoKT,CAAA,GAAA,CAAA;;;;;;;cA5JY,2CAA0C"}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/utils/sortAlphabetically.d.ts
|
|
2
|
+
declare const sortAlphabetically: (a: string, b: string) => number;
|
|
3
|
+
//#endregion
|
|
4
|
+
export { sortAlphabetically };
|
|
2
5
|
//# sourceMappingURL=sortAlphabetically.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sortAlphabetically.d.ts","
|
|
1
|
+
{"version":3,"file":"sortAlphabetically.d.ts","names":[],"sources":["../../../src/utils/sortAlphabetically.ts"],"sourcesContent":[],"mappings":";cAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitTextByLine.d.ts","names":[],"sources":["../../../src/utils/splitTextByLine.ts"],"sourcesContent":[],"mappings":";cAAa"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/utils/verifyIdenticObjectFormat copy.d.ts
|
|
2
|
+
type FlatType = string | number | boolean | object | null | undefined;
|
|
3
|
+
type RecursiveType = FlatType | {
|
|
4
|
+
[key: string]: RecursiveType;
|
|
5
|
+
} | Array<RecursiveType>;
|
|
6
|
+
type VerifyIdenticObjectFormatResult = {
|
|
7
|
+
isIdentic: boolean;
|
|
8
|
+
error?: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Verifies that two objects have identical structure (same keys, array lengths, and types)
|
|
12
|
+
* but not necessarily the same values.
|
|
13
|
+
* Useful for validating translations maintain the same format as the original.
|
|
14
|
+
*
|
|
15
|
+
* @param object - The object to verify
|
|
16
|
+
* @param expectedFormat - The expected format to compare against
|
|
17
|
+
* @param path - Current path in the object tree (for error messages)
|
|
18
|
+
* @returns true if structures match, throws error with details if they don't
|
|
19
|
+
*/
|
|
20
|
+
declare const verifyIdenticObjectFormat: (object: RecursiveType, expectedFormat: RecursiveType, path?: string) => VerifyIdenticObjectFormatResult;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { verifyIdenticObjectFormat };
|
|
23
|
+
//# sourceMappingURL=verifyIdenticObjectFormat copy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyIdenticObjectFormat copy.d.ts","names":[],"sources":["../../../src/utils/verifyIdenticObjectFormat copy.ts"],"sourcesContent":[],"mappings":";KAAK,QAAA;KAEA,aAAA,GACD,QAHS,GAAA;EAER,CAAA,GAAA,EAAA,MAAA,CAAA,EAEgB,aAFH;CACd,GAEA,KAFA,CAEM,aAFN,CAAA;KAIC,+BAAA,GAHgB;EACX,SAAA,EAAA,OAAA;EAAN,KAAA,CAAA,EAAA,MAAA;CAAK;AAAA;AAiBT;;;;;;;;;cAAa,oCACH,+BACQ,iCAEf"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/utils/verifyIdenticObjectFormat.d.ts
|
|
2
|
+
type FlatType = string | number | boolean | object | null | undefined;
|
|
3
|
+
type RecursiveType = FlatType | {
|
|
4
|
+
[key: string]: RecursiveType;
|
|
5
|
+
} | Array<RecursiveType>;
|
|
6
|
+
type VerifyIdenticObjectFormatResult = {
|
|
7
|
+
isIdentic: boolean;
|
|
8
|
+
error?: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Verifies that two objects have identical structure (same keys, array lengths, and types)
|
|
12
|
+
* but not necessarily the same values.
|
|
13
|
+
* Useful for validating translations maintain the same format as the original.
|
|
14
|
+
*
|
|
15
|
+
* @param object - The object to verify
|
|
16
|
+
* @param expectedFormat - The expected format to compare against
|
|
17
|
+
* @param path - Current path in the object tree (for error messages)
|
|
18
|
+
* @returns true if structures match, throws error with details if they don't
|
|
19
|
+
*/
|
|
20
|
+
declare const verifyIdenticObjectFormat: (object: RecursiveType, expectedFormat: RecursiveType, path?: string) => VerifyIdenticObjectFormatResult;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { verifyIdenticObjectFormat };
|
|
23
|
+
//# sourceMappingURL=verifyIdenticObjectFormat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyIdenticObjectFormat.d.ts","names":[],"sources":["../../../src/utils/verifyIdenticObjectFormat.ts"],"sourcesContent":[],"mappings":";KAAK,QAAA;KAEA,aAAA,GACD,QAHS,GAAA;EAER,CAAA,GAAA,EAAA,MAAA,CAAA,EAEgB,aAFH;CACd,GAEA,KAFA,CAEM,aAFN,CAAA;KAIC,+BAAA,GAHgB;EACX,SAAA,EAAA,OAAA;EAAN,KAAA,CAAA,EAAA,MAAA;CAAK;AAAA;AAiBT;;;;;;;;;cAAa,oCACH,+BACQ,iCAEf"}
|
package/dist/types/watcher.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import
|
|
1
|
+
import { IntlayerConfig } from "@intlayer/types";
|
|
2
|
+
import { GetConfigurationOptions } from "@intlayer/config";
|
|
3
|
+
import * as chokidar0 from "chokidar";
|
|
4
|
+
import { ChokidarOptions } from "chokidar";
|
|
5
|
+
|
|
6
|
+
//#region src/watcher.d.ts
|
|
4
7
|
type WatchOptions = ChokidarOptions & {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
configuration?: IntlayerConfig;
|
|
9
|
+
configOptions?: GetConfigurationOptions;
|
|
10
|
+
skipPrepare?: boolean;
|
|
8
11
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
declare const watch: (options?: WatchOptions) => chokidar0.FSWatcher;
|
|
13
|
+
declare const buildAndWatchIntlayer: (options?: WatchOptions) => Promise<void>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { buildAndWatchIntlayer, watch };
|
|
12
16
|
//# sourceMappingURL=watcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watcher.d.ts","
|
|
1
|
+
{"version":3,"file":"watcher.d.ts","names":[],"sources":["../../src/watcher.ts"],"sourcesContent":[],"mappings":";;;;;;KAgBK,YAAA,GAAe;kBACF;EADb,aAAA,CAAA,EAEa,uBAFD;EAAG,WAAA,CAAA,EAAA,OAAA;CACF;AACA,cAKL,KALK,EAAA,CAAA,OAAA,CAAA,EAKc,YALd,EAAA,GAK0B,SAAA,CAAA,SAL1B;AAAuB,cAiE5B,qBAjE4B,EAAA,CAAA,OAAA,CAAA,EAiEa,YAjEb,EAAA,GAiEyB,OAjEzB,CAAA,IAAA,CAAA"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { IntlayerConfig } from "@intlayer/types";
|
|
2
|
+
|
|
3
|
+
//#region src/writeConfiguration/index.d.ts
|
|
4
|
+
declare const writeConfiguration: (configuration: IntlayerConfig) => Promise<void>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { writeConfiguration };
|
|
3
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/writeConfiguration/index.ts"],"sourcesContent":[],"mappings":";;;cAKa,oCAA2C,mBAAc"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/writeContentDeclaration/detectExportedComponentName.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Attempt to detect an exported React component name in the file text.
|
|
3
4
|
* Looks for patterns like:
|
|
@@ -5,5 +6,7 @@
|
|
|
5
6
|
* - export function MyComponent(...)
|
|
6
7
|
* - export default function MyComponent(...)
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
|
+
declare const detectExportedComponentName: (fileText: string) => string | null;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { detectExportedComponentName };
|
|
9
12
|
//# sourceMappingURL=detectExportedComponentName.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detectExportedComponentName.d.ts","
|
|
1
|
+
{"version":3,"file":"detectExportedComponentName.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/detectExportedComponentName.ts"],"sourcesContent":[],"mappings":";;AAOA;;;;;;cAAa"}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/writeContentDeclaration/dictionaryStatus.d.ts
|
|
2
|
+
type DictionaryStatus = 'pending' | 'fetching' | 'up-to-date' | 'replaced' | 'updated' | 'fetched' | 'unknown' | 'error' | 'imported' | 'reimported in JSON' | 'new content file' | 'created';
|
|
3
|
+
//#endregion
|
|
4
|
+
export { DictionaryStatus };
|
|
2
5
|
//# sourceMappingURL=dictionaryStatus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionaryStatus.d.ts","
|
|
1
|
+
{"version":3,"file":"dictionaryStatus.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/dictionaryStatus.ts"],"sourcesContent":[],"mappings":";KAAY,gBAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
import { detectExportedComponentName } from "./detectExportedComponentName.js";
|
|
2
|
+
import { DictionaryStatus } from "./dictionaryStatus.js";
|
|
3
|
+
import { transformJSFile } from "./transformJSFile.js";
|
|
4
|
+
import { writeContentDeclaration } from "./writeContentDeclaration.js";
|
|
5
|
+
import { writeJSFile } from "./writeJSFile.js";
|
|
6
|
+
export { DictionaryStatus, detectExportedComponentName, transformJSFile, writeContentDeclaration, writeJSFile };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Dictionary } from "@intlayer/types";
|
|
2
|
+
|
|
3
|
+
//#region src/writeContentDeclaration/processContentDeclarationContent.d.ts
|
|
4
|
+
declare const processContentDeclarationContent: (dictionary: Dictionary) => Promise<any>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { processContentDeclarationContent };
|
|
7
|
+
//# sourceMappingURL=processContentDeclarationContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processContentDeclarationContent.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/processContentDeclarationContent.ts"],"sourcesContent":[],"mappings":";;;cAmGa,+CACC,eAAU"}
|
|
@@ -1,9 +1,36 @@
|
|
|
1
|
-
import { Dictionary } from
|
|
1
|
+
import { Dictionary, Locale } from "@intlayer/types";
|
|
2
|
+
|
|
3
|
+
//#region src/writeContentDeclaration/transformJSFile.d.ts
|
|
4
|
+
|
|
2
5
|
/**
|
|
3
|
-
* Updates a JavaScript/TypeScript file based on the provided
|
|
4
|
-
* It targets a specific dictionary object within the file
|
|
5
|
-
*
|
|
6
|
-
*
|
|
6
|
+
* Updates a JavaScript/TypeScript file based on the provided dictionary.
|
|
7
|
+
* It targets a specific dictionary object within the file and updates its
|
|
8
|
+
* metadata (title, description, tags) and content entries.
|
|
9
|
+
*
|
|
10
|
+
* This function now supports inserting translation keys into nested objects
|
|
11
|
+
* within arrays. For example, if you have:
|
|
12
|
+
* ```
|
|
13
|
+
* content: [
|
|
14
|
+
* { question: t({ en: '...', fr: '...' }) }
|
|
15
|
+
* ]
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* You can add a new locale (e.g., 'pl') by providing a dictionary with:
|
|
19
|
+
* ```
|
|
20
|
+
* {
|
|
21
|
+
* content: [
|
|
22
|
+
* { question: { [NodeType.Translation]: { en: '...', fr: '...', pl: '...' } } }
|
|
23
|
+
* ]
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* The function will:
|
|
28
|
+
* 1. Detect the existing array structure
|
|
29
|
+
* 2. Navigate into each array element (if it's an object)
|
|
30
|
+
* 3. Recursively process nested properties
|
|
31
|
+
* 4. Update translation maps while preserving existing locales
|
|
7
32
|
*/
|
|
8
|
-
|
|
33
|
+
declare const transformJSFile: (fileContent: string, dictionary: Dictionary, fallbackLocale?: Locale) => Promise<string>;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { transformJSFile };
|
|
9
36
|
//# sourceMappingURL=transformJSFile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformJSFile.d.ts","
|
|
1
|
+
{"version":3,"file":"transformJSFile.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/transformJSFile.ts"],"sourcesContent":[],"mappings":";;;;;;AAq5GA;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,mDAEC,6BACK,WAChB"}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { DictionaryStatus } from "./dictionaryStatus.js";
|
|
2
|
+
import { Dictionary, IntlayerConfig, Locale, LocalesValues } from "@intlayer/types";
|
|
3
|
+
|
|
4
|
+
//#region src/writeContentDeclaration/writeContentDeclaration.d.ts
|
|
5
|
+
type WriteContentDeclarationOptions = {
|
|
6
|
+
newDictionariesPath?: string;
|
|
7
|
+
localeList?: LocalesValues[];
|
|
8
|
+
fallbackLocale?: Locale;
|
|
9
|
+
};
|
|
10
|
+
declare const writeContentDeclaration: (dictionary: Dictionary, configuration: IntlayerConfig, options?: WriteContentDeclarationOptions) => Promise<{
|
|
11
|
+
status: DictionaryStatus;
|
|
12
|
+
path: string;
|
|
7
13
|
}>;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { writeContentDeclaration };
|
|
8
16
|
//# sourceMappingURL=writeContentDeclaration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeContentDeclaration.d.ts","
|
|
1
|
+
{"version":3,"file":"writeContentDeclaration.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/writeContentDeclaration.ts"],"sourcesContent":[],"mappings":";;;;KAgHK,8BAAA;;EAAA,UAAA,CAAA,EAEU,aAFV,EAAA;EAUQ,cAAA,CAAA,EAPM,MAON;CACC;AACG,cAFJ,uBAEI,EAAA,CAAA,UAAA,EADH,UACG,EAAA,aAAA,EAAA,cAAA,EAAA,OAAA,CAAA,EACL,8BADK,EAAA,GAEd,OAFc,CAAA;EACL,MAAA,EACS,gBADT;EACS,IAAA,EAAA,MAAA;CAAlB,CAAA"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { IntlayerConfig } from
|
|
2
|
-
|
|
1
|
+
import { Dictionary, IntlayerConfig } from "@intlayer/types";
|
|
2
|
+
|
|
3
|
+
//#region src/writeContentDeclaration/writeJSFile.d.ts
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* Updates a JavaScript/TypeScript file based on the provided JSON instructions.
|
|
5
7
|
* It targets a specific dictionary object within the file (identified by its 'key' property)
|
|
6
8
|
* and updates its 'content' entries. Currently, it focuses on modifying arguments
|
|
7
9
|
* of 't' (translation) function calls.
|
|
8
10
|
*/
|
|
9
|
-
|
|
11
|
+
declare const writeJSFile: (filePath: string, dictionary: Dictionary, configuration: IntlayerConfig) => Promise<void>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { writeJSFile };
|
|
10
14
|
//# sourceMappingURL=writeJSFile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeJSFile.d.ts","
|
|
1
|
+
{"version":3,"file":"writeJSFile.d.ts","names":[],"sources":["../../../src/writeContentDeclaration/writeJSFile.ts"],"sourcesContent":[],"mappings":";;;;;;AAmBA;;;;AAIU,cAJG,WAIH,EAAA,CAAA,QAAA,EAAA,MAAA,EAAA,UAAA,EAFI,UAEJ,EAAA,aAAA,EADO,cACP,EAAA,GAAP,OAAO,CAAA,IAAA,CAAA"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/writeFileIfChanged.d.ts
|
|
2
|
+
declare const writeFileIfChanged: (path: string, dataOrStream: string, {
|
|
3
|
+
encoding
|
|
4
|
+
}?: {
|
|
5
|
+
encoding?: BufferEncoding;
|
|
3
6
|
}) => Promise<boolean>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { writeFileIfChanged };
|
|
4
9
|
//# sourceMappingURL=writeFileIfChanged.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeFileIfChanged.d.ts","
|
|
1
|
+
{"version":3,"file":"writeFileIfChanged.d.ts","names":[],"sources":["../../src/writeFileIfChanged.ts"],"sourcesContent":[],"mappings":";cAqBa;;CAGX;EAHW,QAAA,CAAA,EAGyB,cA+CrC;CA/CC,EAAA,GACC,OADD,CAAA,OAAA,CAAA"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/writeJsonIfChanged.d.ts
|
|
2
|
+
declare const writeJsonIfChanged: <T>(path: string, data: T, {
|
|
3
|
+
pretty
|
|
4
|
+
}?: {
|
|
5
|
+
pretty?: boolean;
|
|
3
6
|
}) => Promise<boolean>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { writeJsonIfChanged };
|
|
4
9
|
//# sourceMappingURL=writeJsonIfChanged.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeJsonIfChanged.d.ts","
|
|
1
|
+
{"version":3,"file":"writeJsonIfChanged.d.ts","names":[],"sources":["../../src/writeJsonIfChanged.ts"],"sourcesContent":[],"mappings":";cAEa,4CAEL;;CAAA;EAFK,MAAA,CAAA,EAAA,OAAA;CAEL,EAAA,GAEL,OAFK,CAAA,OAAA,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/chokidar",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-canary.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Uses chokidar to scan and build Intlayer declaration files into dictionaries based on Intlayer configuration.",
|
|
6
6
|
"keywords": [
|
|
@@ -56,68 +56,62 @@
|
|
|
56
56
|
"./dist",
|
|
57
57
|
"./package.json"
|
|
58
58
|
],
|
|
59
|
+
"scripts": {
|
|
60
|
+
"build": "tsdown --config tsdown.config.ts",
|
|
61
|
+
"build:ci": "tsdown --config tsdown.config.ts",
|
|
62
|
+
"clean": "rimraf ./dist .turbo",
|
|
63
|
+
"dev": "tsdown --config tsdown.config.ts --watch",
|
|
64
|
+
"format": "biome format . --check",
|
|
65
|
+
"format:fix": "biome format --write .",
|
|
66
|
+
"lint": "biome lint .",
|
|
67
|
+
"lint:fix": "biome lint --write .",
|
|
68
|
+
"prepublish": "cp -f ../../../README.md ./README.md",
|
|
69
|
+
"test": "vitest run",
|
|
70
|
+
"test:watch": "vitest",
|
|
71
|
+
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
72
|
+
},
|
|
59
73
|
"dependencies": {
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
+
"@intlayer/api": "workspace:*",
|
|
75
|
+
"@intlayer/config": "workspace:*",
|
|
76
|
+
"@intlayer/core": "workspace:*",
|
|
77
|
+
"@intlayer/dictionaries-entry": "workspace:*",
|
|
78
|
+
"@intlayer/remote-dictionaries-entry": "workspace:*",
|
|
79
|
+
"@intlayer/types": "workspace:*",
|
|
80
|
+
"@intlayer/unmerged-dictionaries-entry": "workspace:*",
|
|
81
|
+
"chokidar": "3.6.0",
|
|
82
|
+
"crypto-js": "4.2.0",
|
|
83
|
+
"deep-equal": "2.2.3",
|
|
84
|
+
"deepmerge": "4.3.1",
|
|
85
|
+
"fast-glob": "3.3.3",
|
|
86
|
+
"simple-git": "3.28.0",
|
|
87
|
+
"ts-morph": "27.0.0"
|
|
74
88
|
},
|
|
75
89
|
"devDependencies": {
|
|
76
|
-
"@
|
|
77
|
-
"@types/
|
|
78
|
-
"@types/
|
|
79
|
-
"@
|
|
80
|
-
"@
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"typescript": "^5.9.2",
|
|
87
|
-
"vitest": "^3.2.4",
|
|
88
|
-
"@utils/eslint-config": "1.0.4",
|
|
89
|
-
"@utils/ts-config": "1.0.4",
|
|
90
|
-
"@utils/ts-config-types": "1.0.4",
|
|
91
|
-
"@utils/tsup-config": "1.0.4"
|
|
90
|
+
"@types/crypto-js": "4.2.2",
|
|
91
|
+
"@types/deep-equal": "1.0.4",
|
|
92
|
+
"@types/node": "24.9.1",
|
|
93
|
+
"@utils/ts-config": "workspace:*",
|
|
94
|
+
"@utils/ts-config-types": "workspace:*",
|
|
95
|
+
"@utils/tsdown-config": "workspace:*",
|
|
96
|
+
"rimraf": "6.0.1",
|
|
97
|
+
"tsdown": "0.15.9",
|
|
98
|
+
"typescript": "5.9.3",
|
|
99
|
+
"vitest": "4.0.3"
|
|
92
100
|
},
|
|
93
101
|
"peerDependencies": {
|
|
94
|
-
"
|
|
95
|
-
"@intlayer/
|
|
96
|
-
"@intlayer/
|
|
97
|
-
"@intlayer/dictionaries-entry": "
|
|
98
|
-
"@intlayer/
|
|
99
|
-
"@intlayer/
|
|
100
|
-
"@intlayer/
|
|
102
|
+
"@intlayer/api": "workspace:*",
|
|
103
|
+
"@intlayer/config": "workspace:*",
|
|
104
|
+
"@intlayer/core": "workspace:*",
|
|
105
|
+
"@intlayer/dictionaries-entry": "workspace:*",
|
|
106
|
+
"@intlayer/remote-dictionaries-entry": "workspace:*",
|
|
107
|
+
"@intlayer/types": "workspace:*",
|
|
108
|
+
"@intlayer/unmerged-dictionaries-entry": "workspace:*",
|
|
109
|
+
"fast-glob": "3.3.3"
|
|
101
110
|
},
|
|
102
111
|
"engines": {
|
|
103
112
|
"node": ">=14.18"
|
|
104
113
|
},
|
|
105
114
|
"bug": {
|
|
106
115
|
"url": "https://github.com/aymericzip/intlayer/issues"
|
|
107
|
-
},
|
|
108
|
-
"scripts": {
|
|
109
|
-
"build": "pnpm clean & pnpm build:ci",
|
|
110
|
-
"build:ci": "pnpm build:package & pnpm build:types",
|
|
111
|
-
"build:package": "tsup",
|
|
112
|
-
"build:types": "tsc --project ./tsconfig.types.json && tsc-alias --project ./tsconfig.types.json",
|
|
113
|
-
"clean": "rimraf ./dist",
|
|
114
|
-
"dev": "concurrently --prefix none \"tsup --watch\" \"tsc --project ./tsconfig.types.json --watch\" \"tsc-alias --project ./tsconfig.types.json --watch\"",
|
|
115
|
-
"lint": "eslint . --cache",
|
|
116
|
-
"lint:fix": "eslint . --cache --fix",
|
|
117
|
-
"prettier": "prettier . --check",
|
|
118
|
-
"prettier:fix": "prettier --write src/**/*",
|
|
119
|
-
"prepublish": "cp -f ../../../README.md ./README.md",
|
|
120
|
-
"test": "vitest run",
|
|
121
|
-
"test:watch": "vitest"
|
|
122
116
|
}
|
|
123
|
-
}
|
|
117
|
+
}
|