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

Function updateMkDocsConfig

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

* @returns {Promise }

()

Source from the content-addressed store, hash-verified

287 * @returns {Promise<void>}
288 */
289async function updateMkDocsConfig() {
290 const configFileName = ORIGINAL_MKDOCS_CONFIG(DEFAULT_LANGUAGE);
291 const matchedFilePath = path.join(RESOURCES_ROOT, configFileName);
292 if (!(await fs.exists(matchedFilePath))) {
293 throw new Error(`Did not find the MkDocs config at '${matchedFilePath}'`);
294 }
295 const storageData = await addStorage(encodeURIComponent(CROWIN_MKDOCS_CONFIG), matchedFilePath, MKDOCS_CONTENT_TYPE);
296 const storageMapping = {[matchedFilePath]: storageData.id};
297 const existingFilesData = await listFiles();
298 const filesMapping = await ensureFileStructure(storageMapping, {}, existingFilesData);
299 await updateFiles(filesMapping, storageMapping);
300}
301
302async function main() {
303 log.info('Updating documents');

Callers 1

mainFunction · 0.85

Calls 6

ORIGINAL_MKDOCS_CONFIGFunction · 0.90
addStorageFunction · 0.85
listFilesFunction · 0.85
ensureFileStructureFunction · 0.85
updateFilesFunction · 0.85
existsMethod · 0.80

Tested by

no test coverage detected