Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Promise.all(awaitDependencies).then(() => {
// Find the conversion handler for this item type
const templateType = template.type;
let itemHandler = moduleMap[templateType];
if (!itemHandler) {
console.warn(
"Unimplemented item type (package level) " +
template.type +
" for " +
template.itemId
);
resolve("");
} else {
// Handle original Story Maps with next-gen Story Maps
if (templateType === "Web Mapping Application") {
if (storyMap.isAStoryMap(template) && template.data) {
itemHandler = storyMap;
}
}
// Delegate the creation of the template to the handler
itemHandler
.createItemFromTemplate(
template,
resourceFilePaths,
storageAuthentication,
templateDictionary,
destinationAuthentication,
progressTickCallback
)
.then(
newItemId => resolve(newItemId),