How to use the @aws-cdk/cx-api.PATH_METADATA_KEY function in @aws-cdk/cx-api

To help you get started, we’ve selected a few @aws-cdk/cx-api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws / aws-cdk / packages / @aws-cdk / cloudformation-diff / lib / format.ts View on Github external
public readConstructPathsFrom(templateDiff: TemplateDiff) {
    for (const [logicalId, resourceDiff] of Object.entries(templateDiff.resources)) {
      if (!resourceDiff) { continue; }

      const oldPathMetadata = resourceDiff.oldValue && resourceDiff.oldValue.Metadata && resourceDiff.oldValue.Metadata[cxapi.PATH_METADATA_KEY];
      if (oldPathMetadata && !(logicalId in this.logicalToPathMap)) {
        this.logicalToPathMap[logicalId] = oldPathMetadata;
      }

      const newPathMetadata = resourceDiff.newValue && resourceDiff.newValue.Metadata && resourceDiff.newValue.Metadata[cxapi.PATH_METADATA_KEY];
      if (newPathMetadata && !(logicalId in this.logicalToPathMap)) {
        this.logicalToPathMap[logicalId] = newPathMetadata;
      }
    }
  }
github aws / aws-cdk / packages / @aws-cdk / cloudformation-diff / lib / format.ts View on Github external
public readConstructPathsFrom(templateDiff: TemplateDiff) {
    for (const [logicalId, resourceDiff] of Object.entries(templateDiff.resources)) {
      if (!resourceDiff) { continue; }

      const oldPathMetadata = resourceDiff.oldValue && resourceDiff.oldValue.Metadata && resourceDiff.oldValue.Metadata[cxapi.PATH_METADATA_KEY];
      if (oldPathMetadata && !(logicalId in this.logicalToPathMap)) {
        this.logicalToPathMap[logicalId] = oldPathMetadata;
      }

      const newPathMetadata = resourceDiff.newValue && resourceDiff.newValue.Metadata && resourceDiff.newValue.Metadata[cxapi.PATH_METADATA_KEY];
      if (newPathMetadata && !(logicalId in this.logicalToPathMap)) {
        this.logicalToPathMap[logicalId] = newPathMetadata;
      }
    }
  }