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

Function updateFiles

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

* @param {Record } filesMapping * @param {Record } storageMapping * @returns {Promise }

(filesMapping, storageMapping)

Source from the content-addressed store, hash-verified

252 * @returns {Promise<void>}
253 */
254async function updateFiles(filesMapping, storageMapping) {
255 let count = 0;
256 for (const [fullPath, fileId] of Object.entries(filesMapping)) {
257 log.info(`Updating '${toCrowdinPath(fullPath)}' (${++count} of ${Object.keys(filesMapping).length})`);
258 await performApiRequest(`/files/${fileId}`, {
259 method: 'PUT',
260 payload: {
261 storageId: storageMapping[fullPath],
262 },
263 });
264 }
265}
266
267/**
268 * @returns {Promise<void>}

Callers 2

updateDocumentsFunction · 0.85
updateMkDocsConfigFunction · 0.85

Calls 3

performApiRequestFunction · 0.90
toCrowdinPathFunction · 0.85
infoMethod · 0.65

Tested by

no test coverage detected