Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private scrutinizableResourceChanges(scrutinyTypes: cfnspec.schema.ResourceScrutinyType[]): ResourceChange[] {
const ret = new Array();
const scrutinizableTypes = new Set(cfnspec.scrutinizableResourceTypes(scrutinyTypes));
for (const [resourceLogicalId, resourceChange] of Object.entries(this.resources.changes)) {
if (!resourceChange) { continue; }
const commonProps = {
oldProperties: resourceChange.oldProperties,
newProperties: resourceChange.newProperties,
resourceLogicalId
};
// Even though it's not physically possible in CFN, let's pretend to handle a change of 'Type'.
if (resourceChange.resourceTypeChanged) {
// Treat as DELETE+ADD
if (scrutinizableTypes.has(resourceChange.oldResourceType!)) {
ret.push({
...commonProps,