Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.filter(e => e.type === cxapi.LOGICAL_ID_METADATA_KEY)
.find(e => e.data === logicalId);
function buildLogicalToPathMap(stack: cxapi.CloudFormationStackArtifact) {
const map: { [id: string]: string } = {};
for (const md of stack.findMetadataByType(cxapi.LOGICAL_ID_METADATA_KEY)) {
map[md.data] = md.path;
}
return map;
}