Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const updateResources = async (languages, resourcesPath) => {
const SourceContentUpdater = new sourceContentUpdater();
const localResourceList = updateResourcesHelpers.getLocalResourceList(resourcesPath);
await SourceContentUpdater.getLatestResources(localResourceList)
.then(async () => {
await SourceContentUpdater.downloadResources(languages, resourcesPath)
.then(resources => {
resources.forEach(resource => {
console.log("Updated resource '" + resource.resourceId + "' for language '" + resource.languageId + "' to v" + resource.version);
});
})
.catch(err => {
console.error(err);
});
});
};