MCPcopy Create free account
hub / github.com/appium/appium / updateDocuments

Function updateDocuments

scripts/crowdin-update-docs-resources.mjs:270–284  ·  view source on GitHub ↗

* @returns {Promise }

()

Source from the content-addressed store, hash-verified

268 * @returns {Promise<void>}
269 */
270async function updateDocuments() {
271 const matchedFiles = await walk(LANGUAGE_ROOT, DOCUMENTS_EXT);
272 if (matchedFiles.length === 0) {
273 throw new Error(`Did not find any files matching the '*${DOCUMENTS_EXT}' extension in '${LANGUAGE_ROOT}'`);
274 }
275 log.info(`Matched ${matchedFiles.length} files from '${LANGUAGE_ROOT}' for upload...`);
276
277 const [storageMapping, directoriesMapping] = await Promise.all([
278 uploadDocumentsToStorage(matchedFiles),
279 ensureDirectoryStructure(matchedFiles),
280 ]);
281 const existingFilesData = await listFiles();
282 const filesMapping = await ensureFileStructure(storageMapping, directoriesMapping, existingFilesData);
283 await updateFiles(filesMapping, storageMapping);
284}
285
286/**
287 * @returns {Promise<void>}

Callers 1

mainFunction · 0.85

Calls 8

walkFunction · 0.90
uploadDocumentsToStorageFunction · 0.85
ensureDirectoryStructureFunction · 0.85
listFilesFunction · 0.85
ensureFileStructureFunction · 0.85
updateFilesFunction · 0.85
allMethod · 0.80
infoMethod · 0.65

Tested by

no test coverage detected