@aws-cdk/integ-runner 2.179.0-alpha.0 → 2.180.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1778,8 +1778,8 @@ var require_helpers = __commonJS({
1778
1778
  var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema, path11, name, argument) {
1779
1779
  if (Array.isArray(path11)) {
1780
1780
  this.path = path11;
1781
- this.property = path11.reduce(function(sum2, item) {
1782
- return sum2 + makeSuffix(item);
1781
+ this.property = path11.reduce(function(sum, item) {
1782
+ return sum + makeSuffix(item);
1783
1783
  }, "instance");
1784
1784
  } else if (path11 !== void 0) {
1785
1785
  this.property = path11;
@@ -1878,8 +1878,8 @@ var require_helpers = __commonJS({
1878
1878
  this.options = options;
1879
1879
  if (Array.isArray(path11)) {
1880
1880
  this.path = path11;
1881
- this.propertyPath = path11.reduce(function(sum2, item) {
1882
- return sum2 + makeSuffix(item);
1881
+ this.propertyPath = path11.reduce(function(sum, item) {
1882
+ return sum + makeSuffix(item);
1883
1883
  }, "instance");
1884
1884
  } else {
1885
1885
  this.propertyPath = path11;
@@ -1956,16 +1956,16 @@ var require_helpers = __commonJS({
1956
1956
  FORMAT_REGEXPS.regexp = FORMAT_REGEXPS.regex;
1957
1957
  FORMAT_REGEXPS.pattern = FORMAT_REGEXPS.regex;
1958
1958
  FORMAT_REGEXPS.ipv4 = FORMAT_REGEXPS["ip-address"];
1959
- exports2.isFormat = function isFormat(input, format4, validator) {
1960
- if (typeof input === "string" && FORMAT_REGEXPS[format4] !== void 0) {
1961
- if (FORMAT_REGEXPS[format4] instanceof RegExp) {
1962
- return FORMAT_REGEXPS[format4].test(input);
1959
+ exports2.isFormat = function isFormat(input, format3, validator) {
1960
+ if (typeof input === "string" && FORMAT_REGEXPS[format3] !== void 0) {
1961
+ if (FORMAT_REGEXPS[format3] instanceof RegExp) {
1962
+ return FORMAT_REGEXPS[format3].test(input);
1963
1963
  }
1964
- if (typeof FORMAT_REGEXPS[format4] === "function") {
1965
- return FORMAT_REGEXPS[format4](input);
1964
+ if (typeof FORMAT_REGEXPS[format3] === "function") {
1965
+ return FORMAT_REGEXPS[format3](input);
1966
1966
  }
1967
- } else if (validator && validator.customFormats && typeof validator.customFormats[format4] === "function") {
1968
- return validator.customFormats[format4](input);
1967
+ } else if (validator && validator.customFormats && typeof validator.customFormats[format3] === "function") {
1968
+ return validator.customFormats[format3](input);
1969
1969
  }
1970
1970
  return true;
1971
1971
  };
@@ -3632,16 +3632,16 @@ var require_prerelease = __commonJS({
3632
3632
  var require_compare = __commonJS({
3633
3633
  "../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/compare.js"(exports2, module2) {
3634
3634
  var SemVer = require_semver();
3635
- var compare2 = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
3636
- module2.exports = compare2;
3635
+ var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
3636
+ module2.exports = compare;
3637
3637
  }
3638
3638
  });
3639
3639
 
3640
3640
  // ../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/rcompare.js
3641
3641
  var require_rcompare = __commonJS({
3642
3642
  "../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/rcompare.js"(exports2, module2) {
3643
- var compare2 = require_compare();
3644
- var rcompare = (a, b, loose) => compare2(b, a, loose);
3643
+ var compare = require_compare();
3644
+ var rcompare = (a, b, loose) => compare(b, a, loose);
3645
3645
  module2.exports = rcompare;
3646
3646
  }
3647
3647
  });
@@ -3649,8 +3649,8 @@ var require_rcompare = __commonJS({
3649
3649
  // ../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/compare-loose.js
3650
3650
  var require_compare_loose = __commonJS({
3651
3651
  "../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/compare-loose.js"(exports2, module2) {
3652
- var compare2 = require_compare();
3653
- var compareLoose = (a, b) => compare2(a, b, true);
3652
+ var compare = require_compare();
3653
+ var compareLoose = (a, b) => compare(a, b, true);
3654
3654
  module2.exports = compareLoose;
3655
3655
  }
3656
3656
  });
@@ -3689,8 +3689,8 @@ var require_rsort = __commonJS({
3689
3689
  // ../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/gt.js
3690
3690
  var require_gt = __commonJS({
3691
3691
  "../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/gt.js"(exports2, module2) {
3692
- var compare2 = require_compare();
3693
- var gt = (a, b, loose) => compare2(a, b, loose) > 0;
3692
+ var compare = require_compare();
3693
+ var gt = (a, b, loose) => compare(a, b, loose) > 0;
3694
3694
  module2.exports = gt;
3695
3695
  }
3696
3696
  });
@@ -3698,8 +3698,8 @@ var require_gt = __commonJS({
3698
3698
  // ../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/lt.js
3699
3699
  var require_lt = __commonJS({
3700
3700
  "../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/lt.js"(exports2, module2) {
3701
- var compare2 = require_compare();
3702
- var lt = (a, b, loose) => compare2(a, b, loose) < 0;
3701
+ var compare = require_compare();
3702
+ var lt = (a, b, loose) => compare(a, b, loose) < 0;
3703
3703
  module2.exports = lt;
3704
3704
  }
3705
3705
  });
@@ -3707,8 +3707,8 @@ var require_lt = __commonJS({
3707
3707
  // ../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/eq.js
3708
3708
  var require_eq = __commonJS({
3709
3709
  "../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/eq.js"(exports2, module2) {
3710
- var compare2 = require_compare();
3711
- var eq = (a, b, loose) => compare2(a, b, loose) === 0;
3710
+ var compare = require_compare();
3711
+ var eq = (a, b, loose) => compare(a, b, loose) === 0;
3712
3712
  module2.exports = eq;
3713
3713
  }
3714
3714
  });
@@ -3716,8 +3716,8 @@ var require_eq = __commonJS({
3716
3716
  // ../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/neq.js
3717
3717
  var require_neq = __commonJS({
3718
3718
  "../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/neq.js"(exports2, module2) {
3719
- var compare2 = require_compare();
3720
- var neq = (a, b, loose) => compare2(a, b, loose) !== 0;
3719
+ var compare = require_compare();
3720
+ var neq = (a, b, loose) => compare(a, b, loose) !== 0;
3721
3721
  module2.exports = neq;
3722
3722
  }
3723
3723
  });
@@ -3725,8 +3725,8 @@ var require_neq = __commonJS({
3725
3725
  // ../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/gte.js
3726
3726
  var require_gte = __commonJS({
3727
3727
  "../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/gte.js"(exports2, module2) {
3728
- var compare2 = require_compare();
3729
- var gte = (a, b, loose) => compare2(a, b, loose) >= 0;
3728
+ var compare = require_compare();
3729
+ var gte = (a, b, loose) => compare(a, b, loose) >= 0;
3730
3730
  module2.exports = gte;
3731
3731
  }
3732
3732
  });
@@ -3734,8 +3734,8 @@ var require_gte = __commonJS({
3734
3734
  // ../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/lte.js
3735
3735
  var require_lte = __commonJS({
3736
3736
  "../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/lte.js"(exports2, module2) {
3737
- var compare2 = require_compare();
3738
- var lte = (a, b, loose) => compare2(a, b, loose) <= 0;
3737
+ var compare = require_compare();
3738
+ var lte = (a, b, loose) => compare(a, b, loose) <= 0;
3739
3739
  module2.exports = lte;
3740
3740
  }
3741
3741
  });
@@ -4615,12 +4615,12 @@ var require_intersects = __commonJS({
4615
4615
  var require_simplify = __commonJS({
4616
4616
  "../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/ranges/simplify.js"(exports2, module2) {
4617
4617
  var satisfies = require_satisfies();
4618
- var compare2 = require_compare();
4618
+ var compare = require_compare();
4619
4619
  module2.exports = (versions, range, options) => {
4620
4620
  const set = [];
4621
4621
  let first = null;
4622
4622
  let prev = null;
4623
- const v = versions.sort((a, b) => compare2(a, b, options));
4623
+ const v = versions.sort((a, b) => compare(a, b, options));
4624
4624
  for (const version of v) {
4625
4625
  const included = satisfies(version, range, options);
4626
4626
  if (included) {
@@ -4667,7 +4667,7 @@ var require_subset = __commonJS({
4667
4667
  var Comparator = require_comparator();
4668
4668
  var { ANY } = Comparator;
4669
4669
  var satisfies = require_satisfies();
4670
- var compare2 = require_compare();
4670
+ var compare = require_compare();
4671
4671
  var subset = (sub, dom, options = {}) => {
4672
4672
  if (sub === dom) {
4673
4673
  return true;
@@ -4727,7 +4727,7 @@ var require_subset = __commonJS({
4727
4727
  }
4728
4728
  let gtltComp;
4729
4729
  if (gt && lt) {
4730
- gtltComp = compare2(gt.semver, lt.semver, options);
4730
+ gtltComp = compare(gt.semver, lt.semver, options);
4731
4731
  if (gtltComp > 0) {
4732
4732
  return null;
4733
4733
  } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
@@ -4807,14 +4807,14 @@ var require_subset = __commonJS({
4807
4807
  if (!a) {
4808
4808
  return b;
4809
4809
  }
4810
- const comp = compare2(a.semver, b.semver, options);
4810
+ const comp = compare(a.semver, b.semver, options);
4811
4811
  return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
4812
4812
  };
4813
4813
  var lowerLT = (a, b, options) => {
4814
4814
  if (!a) {
4815
4815
  return b;
4816
4816
  }
4817
- const comp = compare2(a.semver, b.semver, options);
4817
+ const comp = compare(a.semver, b.semver, options);
4818
4818
  return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
4819
4819
  };
4820
4820
  module2.exports = subset;
@@ -4837,7 +4837,7 @@ var require_semver2 = __commonJS({
4837
4837
  var minor = require_minor();
4838
4838
  var patch = require_patch();
4839
4839
  var prerelease = require_prerelease();
4840
- var compare2 = require_compare();
4840
+ var compare = require_compare();
4841
4841
  var rcompare = require_rcompare();
4842
4842
  var compareLoose = require_compare_loose();
4843
4843
  var compareBuild = require_compare_build();
@@ -4875,7 +4875,7 @@ var require_semver2 = __commonJS({
4875
4875
  minor,
4876
4876
  patch,
4877
4877
  prerelease,
4878
- compare: compare2,
4878
+ compare,
4879
4879
  rcompare,
4880
4880
  compareLoose,
4881
4881
  compareBuild,
@@ -8059,6 +8059,7 @@ __export(features_exports, {
8059
8059
  KMS_ALIAS_NAME_REF: () => KMS_ALIAS_NAME_REF,
8060
8060
  KMS_DEFAULT_KEY_POLICIES: () => KMS_DEFAULT_KEY_POLICIES,
8061
8061
  KMS_REDUCE_CROSS_ACCOUNT_REGION_POLICY_SCOPE: () => KMS_REDUCE_CROSS_ACCOUNT_REGION_POLICY_SCOPE,
8062
+ LAMBDA_CREATE_NEW_POLICIES_WITH_ADDTOROLEPOLICY: () => LAMBDA_CREATE_NEW_POLICIES_WITH_ADDTOROLEPOLICY,
8062
8063
  LAMBDA_NODEJS_SDK_V3_EXCLUDE_SMITHY_PACKAGES: () => LAMBDA_NODEJS_SDK_V3_EXCLUDE_SMITHY_PACKAGES,
8063
8064
  LAMBDA_NODEJS_USE_LATEST_RUNTIME: () => LAMBDA_NODEJS_USE_LATEST_RUNTIME,
8064
8065
  LAMBDA_PERMISSION_LOGICAL_ID_FOR_LAMBDA_ACTION: () => LAMBDA_PERMISSION_LOGICAL_ID_FOR_LAMBDA_ACTION,
@@ -8096,7 +8097,7 @@ function futureFlagDefault(flag) {
8096
8097
  }
8097
8098
  return value;
8098
8099
  }
8099
- var ENABLE_STACK_NAME_DUPLICATES_CONTEXT, ENABLE_DIFF_NO_FAIL_CONTEXT, ENABLE_DIFF_NO_FAIL, NEW_STYLE_STACK_SYNTHESIS_CONTEXT, STACK_RELATIVE_EXPORTS_CONTEXT, DOCKER_IGNORE_SUPPORT, SECRETS_MANAGER_PARSE_OWNED_SECRET_NAME, KMS_DEFAULT_KEY_POLICIES, S3_GRANT_WRITE_WITHOUT_ACL, ECS_REMOVE_DEFAULT_DESIRED_COUNT, RDS_LOWERCASE_DB_IDENTIFIER, APIGATEWAY_USAGEPLANKEY_ORDERINSENSITIVE_ID, EFS_DEFAULT_ENCRYPTION_AT_REST, LAMBDA_RECOGNIZE_VERSION_PROPS, LAMBDA_RECOGNIZE_LAYER_VERSION, CLOUDFRONT_DEFAULT_SECURITY_POLICY_TLS_V1_2_2021, CHECK_SECRET_USAGE, TARGET_PARTITIONS, ECS_SERVICE_EXTENSIONS_ENABLE_DEFAULT_LOG_DRIVER, EC2_UNIQUE_IMDSV2_LAUNCH_TEMPLATE_NAME, ECS_ARN_FORMAT_INCLUDES_CLUSTER_NAME, IAM_MINIMIZE_POLICIES, IAM_IMPORTED_ROLE_STACK_SAFE_DEFAULT_POLICY_NAME, VALIDATE_SNAPSHOT_REMOVAL_POLICY, CODEPIPELINE_CROSS_ACCOUNT_KEY_ALIAS_STACK_SAFE_RESOURCE_NAME, S3_CREATE_DEFAULT_LOGGING_POLICY, SNS_SUBSCRIPTIONS_SQS_DECRYPTION_POLICY, APIGATEWAY_DISABLE_CLOUDWATCH_ROLE, ENABLE_PARTITION_LITERALS, EVENTS_TARGET_QUEUE_SAME_ACCOUNT, ECS_DISABLE_EXPLICIT_DEPLOYMENT_CONTROLLER_FOR_CIRCUIT_BREAKER, S3_SERVER_ACCESS_LOGS_USE_BUCKET_POLICY, ROUTE53_PATTERNS_USE_CERTIFICATE, AWS_CUSTOM_RESOURCE_LATEST_SDK_DEFAULT, DATABASE_PROXY_UNIQUE_RESOURCE_NAME, CODEDEPLOY_REMOVE_ALARMS_FROM_DEPLOYMENT_GROUP, APIGATEWAY_AUTHORIZER_CHANGE_DEPLOYMENT_LOGICAL_ID, EC2_LAUNCH_TEMPLATE_DEFAULT_USER_DATA, SECRETS_MANAGER_TARGET_ATTACHMENT_RESOURCE_POLICY, REDSHIFT_COLUMN_ID, ENABLE_EMR_SERVICE_POLICY_V2, EC2_RESTRICT_DEFAULT_SECURITY_GROUP, APIGATEWAY_REQUEST_VALIDATOR_UNIQUE_ID, INCLUDE_PREFIX_IN_UNIQUE_NAME_GENERATION, KMS_ALIAS_NAME_REF, EFS_DENY_ANONYMOUS_ACCESS, EFS_MOUNTTARGET_ORDERINSENSITIVE_LOGICAL_ID, AUTOSCALING_GENERATE_LAUNCH_TEMPLATE, ENABLE_OPENSEARCH_MULTIAZ_WITH_STANDBY, LAMBDA_NODEJS_USE_LATEST_RUNTIME, RDS_PREVENT_RENDERING_DEPRECATED_CREDENTIALS, AURORA_CLUSTER_CHANGE_SCOPE_OF_INSTANCE_PARAMETER_GROUP_WITH_EACH_PARAMETERS, APPSYNC_ENABLE_USE_ARN_IDENTIFIER_SOURCE_API_ASSOCIATION, CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME, LAMBDA_PERMISSION_LOGICAL_ID_FOR_LAMBDA_ACTION, CODEPIPELINE_CROSS_ACCOUNT_KEYS_DEFAULT_VALUE_TO_FALSE, CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2, KMS_REDUCE_CROSS_ACCOUNT_REGION_POLICY_SCOPE, PIPELINE_REDUCE_ASSET_ROLE_TRUST_SCOPE, EKS_NODEGROUP_NAME, EBS_DEFAULT_GP3, ECS_REMOVE_DEFAULT_DEPLOYMENT_ALARM, LOG_API_RESPONSE_DATA_PROPERTY_TRUE_DEFAULT, S3_KEEP_NOTIFICATION_IN_IMPORTED_BUCKET, USE_NEW_S3URI_PARAMETERS_FOR_BEDROCK_INVOKE_MODEL_TASK, REDUCE_EC2_FARGATE_CLOUDWATCH_PERMISSIONS, DYNAMODB_TABLEV2_RESOURCE_POLICY_PER_REPLICA, EC2_SUM_TIMEOUT_ENABLED, APPSYNC_GRAPHQLAPI_SCOPE_LAMBDA_FUNCTION_PERMISSION, USE_CORRECT_VALUE_FOR_INSTANCE_RESOURCE_ID_PROPERTY, CFN_INCLUDE_REJECT_COMPLEX_RESOURCE_UPDATE_CREATE_POLICY_INTRINSICS, LAMBDA_NODEJS_SDK_V3_EXCLUDE_SMITHY_PACKAGES, STEPFUNCTIONS_TASKS_FIX_RUN_ECS_TASK_POLICY, BASTION_HOST_USE_AMAZON_LINUX_2023_BY_DEFAULT, ASPECT_STABILIZATION, USER_POOL_DOMAIN_NAME_METHOD_WITHOUT_CUSTOM_RESOURCE, Enable_IMDS_Blocking_Deprecated_Feature, Disable_ECS_IMDS_Blocking, ALB_DUALSTACK_WITHOUT_PUBLIC_IPV4_SECURITY_GROUP_RULES_DEFAULT, IAM_OIDC_REJECT_UNAUTHORIZED_CONNECTIONS, ENABLE_ADDITIONAL_METADATA_COLLECTION, FLAGS, CURRENT_MV, CURRENT_VERSION_EXPIRED_FLAGS, CURRENTLY_RECOMMENDED_FLAGS, CURRENT_VERSION_FLAG_DEFAULTS, FUTURE_FLAGS_EXPIRED, FUTURE_FLAGS, NEW_PROJECT_DEFAULT_CONTEXT;
8100
+ var ENABLE_STACK_NAME_DUPLICATES_CONTEXT, ENABLE_DIFF_NO_FAIL_CONTEXT, ENABLE_DIFF_NO_FAIL, NEW_STYLE_STACK_SYNTHESIS_CONTEXT, STACK_RELATIVE_EXPORTS_CONTEXT, DOCKER_IGNORE_SUPPORT, SECRETS_MANAGER_PARSE_OWNED_SECRET_NAME, KMS_DEFAULT_KEY_POLICIES, S3_GRANT_WRITE_WITHOUT_ACL, ECS_REMOVE_DEFAULT_DESIRED_COUNT, RDS_LOWERCASE_DB_IDENTIFIER, APIGATEWAY_USAGEPLANKEY_ORDERINSENSITIVE_ID, EFS_DEFAULT_ENCRYPTION_AT_REST, LAMBDA_RECOGNIZE_VERSION_PROPS, LAMBDA_RECOGNIZE_LAYER_VERSION, CLOUDFRONT_DEFAULT_SECURITY_POLICY_TLS_V1_2_2021, CHECK_SECRET_USAGE, TARGET_PARTITIONS, ECS_SERVICE_EXTENSIONS_ENABLE_DEFAULT_LOG_DRIVER, EC2_UNIQUE_IMDSV2_LAUNCH_TEMPLATE_NAME, ECS_ARN_FORMAT_INCLUDES_CLUSTER_NAME, IAM_MINIMIZE_POLICIES, IAM_IMPORTED_ROLE_STACK_SAFE_DEFAULT_POLICY_NAME, VALIDATE_SNAPSHOT_REMOVAL_POLICY, CODEPIPELINE_CROSS_ACCOUNT_KEY_ALIAS_STACK_SAFE_RESOURCE_NAME, S3_CREATE_DEFAULT_LOGGING_POLICY, SNS_SUBSCRIPTIONS_SQS_DECRYPTION_POLICY, APIGATEWAY_DISABLE_CLOUDWATCH_ROLE, ENABLE_PARTITION_LITERALS, EVENTS_TARGET_QUEUE_SAME_ACCOUNT, ECS_DISABLE_EXPLICIT_DEPLOYMENT_CONTROLLER_FOR_CIRCUIT_BREAKER, S3_SERVER_ACCESS_LOGS_USE_BUCKET_POLICY, ROUTE53_PATTERNS_USE_CERTIFICATE, AWS_CUSTOM_RESOURCE_LATEST_SDK_DEFAULT, DATABASE_PROXY_UNIQUE_RESOURCE_NAME, CODEDEPLOY_REMOVE_ALARMS_FROM_DEPLOYMENT_GROUP, APIGATEWAY_AUTHORIZER_CHANGE_DEPLOYMENT_LOGICAL_ID, EC2_LAUNCH_TEMPLATE_DEFAULT_USER_DATA, SECRETS_MANAGER_TARGET_ATTACHMENT_RESOURCE_POLICY, REDSHIFT_COLUMN_ID, ENABLE_EMR_SERVICE_POLICY_V2, EC2_RESTRICT_DEFAULT_SECURITY_GROUP, APIGATEWAY_REQUEST_VALIDATOR_UNIQUE_ID, INCLUDE_PREFIX_IN_UNIQUE_NAME_GENERATION, KMS_ALIAS_NAME_REF, EFS_DENY_ANONYMOUS_ACCESS, EFS_MOUNTTARGET_ORDERINSENSITIVE_LOGICAL_ID, AUTOSCALING_GENERATE_LAUNCH_TEMPLATE, ENABLE_OPENSEARCH_MULTIAZ_WITH_STANDBY, LAMBDA_NODEJS_USE_LATEST_RUNTIME, RDS_PREVENT_RENDERING_DEPRECATED_CREDENTIALS, AURORA_CLUSTER_CHANGE_SCOPE_OF_INSTANCE_PARAMETER_GROUP_WITH_EACH_PARAMETERS, APPSYNC_ENABLE_USE_ARN_IDENTIFIER_SOURCE_API_ASSOCIATION, CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME, LAMBDA_PERMISSION_LOGICAL_ID_FOR_LAMBDA_ACTION, CODEPIPELINE_CROSS_ACCOUNT_KEYS_DEFAULT_VALUE_TO_FALSE, CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2, KMS_REDUCE_CROSS_ACCOUNT_REGION_POLICY_SCOPE, PIPELINE_REDUCE_ASSET_ROLE_TRUST_SCOPE, EKS_NODEGROUP_NAME, EBS_DEFAULT_GP3, ECS_REMOVE_DEFAULT_DEPLOYMENT_ALARM, LOG_API_RESPONSE_DATA_PROPERTY_TRUE_DEFAULT, S3_KEEP_NOTIFICATION_IN_IMPORTED_BUCKET, USE_NEW_S3URI_PARAMETERS_FOR_BEDROCK_INVOKE_MODEL_TASK, REDUCE_EC2_FARGATE_CLOUDWATCH_PERMISSIONS, DYNAMODB_TABLEV2_RESOURCE_POLICY_PER_REPLICA, EC2_SUM_TIMEOUT_ENABLED, APPSYNC_GRAPHQLAPI_SCOPE_LAMBDA_FUNCTION_PERMISSION, USE_CORRECT_VALUE_FOR_INSTANCE_RESOURCE_ID_PROPERTY, CFN_INCLUDE_REJECT_COMPLEX_RESOURCE_UPDATE_CREATE_POLICY_INTRINSICS, LAMBDA_NODEJS_SDK_V3_EXCLUDE_SMITHY_PACKAGES, STEPFUNCTIONS_TASKS_FIX_RUN_ECS_TASK_POLICY, BASTION_HOST_USE_AMAZON_LINUX_2023_BY_DEFAULT, ASPECT_STABILIZATION, USER_POOL_DOMAIN_NAME_METHOD_WITHOUT_CUSTOM_RESOURCE, Enable_IMDS_Blocking_Deprecated_Feature, Disable_ECS_IMDS_Blocking, ALB_DUALSTACK_WITHOUT_PUBLIC_IPV4_SECURITY_GROUP_RULES_DEFAULT, IAM_OIDC_REJECT_UNAUTHORIZED_CONNECTIONS, ENABLE_ADDITIONAL_METADATA_COLLECTION, LAMBDA_CREATE_NEW_POLICIES_WITH_ADDTOROLEPOLICY, FLAGS, CURRENT_MV, CURRENT_VERSION_EXPIRED_FLAGS, CURRENTLY_RECOMMENDED_FLAGS, CURRENT_VERSION_FLAG_DEFAULTS, FUTURE_FLAGS_EXPIRED, FUTURE_FLAGS, NEW_PROJECT_DEFAULT_CONTEXT;
8100
8101
  var init_features = __esm({
8101
8102
  "../cx-api/lib/features.ts"() {
8102
8103
  "use strict";
@@ -8182,6 +8183,7 @@ var init_features = __esm({
8182
8183
  ALB_DUALSTACK_WITHOUT_PUBLIC_IPV4_SECURITY_GROUP_RULES_DEFAULT = "@aws-cdk/aws-elasticloadbalancingV2:albDualstackWithoutPublicIpv4SecurityGroupRulesDefault";
8183
8184
  IAM_OIDC_REJECT_UNAUTHORIZED_CONNECTIONS = "@aws-cdk/aws-iam:oidcRejectUnauthorizedConnections";
8184
8185
  ENABLE_ADDITIONAL_METADATA_COLLECTION = "@aws-cdk/core:enableAdditionalMetadataCollection";
8186
+ LAMBDA_CREATE_NEW_POLICIES_WITH_ADDTOROLEPOLICY = "@aws-cdk/aws-lambda:createNewPoliciesWithAddToRolePolicy";
8185
8187
  FLAGS = {
8186
8188
  //////////////////////////////////////////////////////////////////////
8187
8189
  [ENABLE_STACK_NAME_DUPLICATES_CONTEXT]: {
@@ -9359,6 +9361,18 @@ var init_features = __esm({
9359
9361
  `,
9360
9362
  introducedIn: { v2: "2.178.0" },
9361
9363
  recommendedValue: true
9364
+ },
9365
+ //////////////////////////////////////////////////////////////////////
9366
+ [LAMBDA_CREATE_NEW_POLICIES_WITH_ADDTOROLEPOLICY]: {
9367
+ type: 1 /* BugFix */,
9368
+ summary: "When enabled, Lambda will create new inline policies with AddToRolePolicy instead of adding to the Default Policy Statement",
9369
+ detailsMd: `
9370
+ When this feature flag is enabled, Lambda will create new inline policies with AddToRolePolicy.
9371
+ The purpose of this is to prevent lambda from creating a dependency on the Default Policy Statement.
9372
+ This solves an issue where a circular dependency could occur if adding lambda to something like a Cognito Trigger, then adding the User Pool to the lambda execution role permissions.
9373
+ `,
9374
+ introducedIn: { v2: "2.180.0" },
9375
+ recommendedValue: true
9362
9376
  }
9363
9377
  };
9364
9378
  CURRENT_MV = "v2";
@@ -12352,6 +12366,7 @@ __export(recommended_feature_flags_exports, {
12352
12366
  "@aws-cdk/aws-kms:reduceCrossAccountRegionPolicyScope": () => _aws_cdk_aws_kms_reduceCrossAccountRegionPolicyScope,
12353
12367
  "@aws-cdk/aws-lambda-nodejs:sdkV3ExcludeSmithyPackages": () => _aws_cdk_aws_lambda_nodejs_sdkV3ExcludeSmithyPackages,
12354
12368
  "@aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion": () => _aws_cdk_aws_lambda_nodejs_useLatestRuntimeVersion,
12369
+ "@aws-cdk/aws-lambda:createNewPoliciesWithAddToRolePolicy": () => _aws_cdk_aws_lambda_createNewPoliciesWithAddToRolePolicy,
12355
12370
  "@aws-cdk/aws-lambda:recognizeLayerVersion": () => _aws_cdk_aws_lambda_recognizeLayerVersion,
12356
12371
  "@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": () => _aws_cdk_aws_opensearchservice_enableOpensearchMultiAzWithStandby,
12357
12372
  "@aws-cdk/aws-rds:auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters": () => _aws_cdk_aws_rds_auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters,
@@ -12379,7 +12394,7 @@ __export(recommended_feature_flags_exports, {
12379
12394
  "@aws-cdk/customresources:installLatestAwsSdkDefault": () => _aws_cdk_customresources_installLatestAwsSdkDefault,
12380
12395
  default: () => recommended_feature_flags_default
12381
12396
  });
12382
- var _aws_cdk_aws_lambda_recognizeLayerVersion, _aws_cdk_core_checkSecretUsage, _aws_cdk_core_target_partitions, _aws_cdk_containers_ecs_service_extensions_enableDefaultLogDriver, _aws_cdk_aws_ec2_uniqueImdsv2TemplateName, _aws_cdk_aws_ecs_arnFormatIncludesClusterName, _aws_cdk_aws_iam_minimizePolicies, _aws_cdk_core_validateSnapshotRemovalPolicy, _aws_cdk_aws_codepipeline_crossAccountKeyAliasStackSafeResourceName, _aws_cdk_aws_s3_createDefaultLoggingPolicy, _aws_cdk_aws_sns_subscriptions_restrictSqsDescryption, _aws_cdk_aws_apigateway_disableCloudWatchRole, _aws_cdk_core_enablePartitionLiterals, _aws_cdk_aws_events_eventsTargetQueueSameAccount, _aws_cdk_aws_ecs_disableExplicitDeploymentControllerForCircuitBreaker, _aws_cdk_aws_iam_importedRoleStackSafeDefaultPolicyName, _aws_cdk_aws_s3_serverAccessLogsUseBucketPolicy, _aws_cdk_aws_route53_patters_useCertificate, _aws_cdk_customresources_installLatestAwsSdkDefault, _aws_cdk_aws_rds_databaseProxyUniqueResourceName, _aws_cdk_aws_codedeploy_removeAlarmsFromDeploymentGroup, _aws_cdk_aws_apigateway_authorizerChangeDeploymentLogicalId, _aws_cdk_aws_ec2_launchTemplateDefaultUserData, _aws_cdk_aws_secretsmanager_useAttachedSecretResourcePolicyForSecretTargetAttachments, _aws_cdk_aws_redshift_columnId, _aws_cdk_aws_stepfunctions_tasks_enableEmrServicePolicyV2, _aws_cdk_aws_ec2_restrictDefaultSecurityGroup, _aws_cdk_aws_apigateway_requestValidatorUniqueId, _aws_cdk_aws_kms_aliasNameRef, _aws_cdk_aws_autoscaling_generateLaunchTemplateInsteadOfLaunchConfig, _aws_cdk_core_includePrefixInUniqueNameGeneration, _aws_cdk_aws_efs_denyAnonymousAccess, _aws_cdk_aws_opensearchservice_enableOpensearchMultiAzWithStandby, _aws_cdk_aws_lambda_nodejs_useLatestRuntimeVersion, _aws_cdk_aws_efs_mountTargetOrderInsensitiveLogicalId, _aws_cdk_aws_rds_auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters, _aws_cdk_aws_appsync_useArnForSourceApiAssociationIdentifier, _aws_cdk_aws_rds_preventRenderingDeprecatedCredentials, _aws_cdk_aws_codepipeline_actions_useNewDefaultBranchForCodeCommitSource, _aws_cdk_aws_cloudwatch_actions_changeLambdaPermissionLogicalIdForLambdaAction, _aws_cdk_aws_codepipeline_crossAccountKeysDefaultValueToFalse, _aws_cdk_aws_codepipeline_defaultPipelineTypeToV2, _aws_cdk_aws_kms_reduceCrossAccountRegionPolicyScope, _aws_cdk_aws_eks_nodegroupNameAttribute, _aws_cdk_aws_ec2_ebsDefaultGp3Volume, _aws_cdk_aws_ecs_removeDefaultDeploymentAlarm, _aws_cdk_custom_resources_logApiResponseDataPropertyTrueDefault, _aws_cdk_aws_s3_keepNotificationInImportedBucket, _aws_cdk_aws_ecs_enableImdsBlockingDeprecatedFeature, _aws_cdk_aws_ecs_disableEcsImdsBlocking, _aws_cdk_aws_ecs_reduceEc2FargateCloudWatchPermissions, _aws_cdk_aws_dynamodb_resourcePolicyPerReplica, _aws_cdk_aws_ec2_ec2SumTImeoutEnabled, _aws_cdk_aws_appsync_appSyncGraphQLAPIScopeLambdaPermission, _aws_cdk_aws_rds_setCorrectValueForDatabaseInstanceReadReplicaInstanceResourceId, _aws_cdk_core_cfnIncludeRejectComplexResourceUpdateCreatePolicyIntrinsics, _aws_cdk_aws_lambda_nodejs_sdkV3ExcludeSmithyPackages, _aws_cdk_aws_stepfunctions_tasks_fixRunEcsTaskPolicy, _aws_cdk_aws_ec2_bastionHostUseAmazonLinux2023ByDefault, _aws_cdk_aws_route53_targets_userPoolDomainNameMethodWithoutCustomResource, _aws_cdk_aws_elasticloadbalancingV2_albDualstackWithoutPublicIpv4SecurityGroupRulesDefault, _aws_cdk_aws_iam_oidcRejectUnauthorizedConnections, _aws_cdk_core_enableAdditionalMetadataCollection, recommended_feature_flags_default;
12397
+ var _aws_cdk_aws_lambda_recognizeLayerVersion, _aws_cdk_core_checkSecretUsage, _aws_cdk_core_target_partitions, _aws_cdk_containers_ecs_service_extensions_enableDefaultLogDriver, _aws_cdk_aws_ec2_uniqueImdsv2TemplateName, _aws_cdk_aws_ecs_arnFormatIncludesClusterName, _aws_cdk_aws_iam_minimizePolicies, _aws_cdk_core_validateSnapshotRemovalPolicy, _aws_cdk_aws_codepipeline_crossAccountKeyAliasStackSafeResourceName, _aws_cdk_aws_s3_createDefaultLoggingPolicy, _aws_cdk_aws_sns_subscriptions_restrictSqsDescryption, _aws_cdk_aws_apigateway_disableCloudWatchRole, _aws_cdk_core_enablePartitionLiterals, _aws_cdk_aws_events_eventsTargetQueueSameAccount, _aws_cdk_aws_ecs_disableExplicitDeploymentControllerForCircuitBreaker, _aws_cdk_aws_iam_importedRoleStackSafeDefaultPolicyName, _aws_cdk_aws_s3_serverAccessLogsUseBucketPolicy, _aws_cdk_aws_route53_patters_useCertificate, _aws_cdk_customresources_installLatestAwsSdkDefault, _aws_cdk_aws_rds_databaseProxyUniqueResourceName, _aws_cdk_aws_codedeploy_removeAlarmsFromDeploymentGroup, _aws_cdk_aws_apigateway_authorizerChangeDeploymentLogicalId, _aws_cdk_aws_ec2_launchTemplateDefaultUserData, _aws_cdk_aws_secretsmanager_useAttachedSecretResourcePolicyForSecretTargetAttachments, _aws_cdk_aws_redshift_columnId, _aws_cdk_aws_stepfunctions_tasks_enableEmrServicePolicyV2, _aws_cdk_aws_ec2_restrictDefaultSecurityGroup, _aws_cdk_aws_apigateway_requestValidatorUniqueId, _aws_cdk_aws_kms_aliasNameRef, _aws_cdk_aws_autoscaling_generateLaunchTemplateInsteadOfLaunchConfig, _aws_cdk_core_includePrefixInUniqueNameGeneration, _aws_cdk_aws_efs_denyAnonymousAccess, _aws_cdk_aws_opensearchservice_enableOpensearchMultiAzWithStandby, _aws_cdk_aws_lambda_nodejs_useLatestRuntimeVersion, _aws_cdk_aws_efs_mountTargetOrderInsensitiveLogicalId, _aws_cdk_aws_rds_auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters, _aws_cdk_aws_appsync_useArnForSourceApiAssociationIdentifier, _aws_cdk_aws_rds_preventRenderingDeprecatedCredentials, _aws_cdk_aws_codepipeline_actions_useNewDefaultBranchForCodeCommitSource, _aws_cdk_aws_cloudwatch_actions_changeLambdaPermissionLogicalIdForLambdaAction, _aws_cdk_aws_codepipeline_crossAccountKeysDefaultValueToFalse, _aws_cdk_aws_codepipeline_defaultPipelineTypeToV2, _aws_cdk_aws_kms_reduceCrossAccountRegionPolicyScope, _aws_cdk_aws_eks_nodegroupNameAttribute, _aws_cdk_aws_ec2_ebsDefaultGp3Volume, _aws_cdk_aws_ecs_removeDefaultDeploymentAlarm, _aws_cdk_custom_resources_logApiResponseDataPropertyTrueDefault, _aws_cdk_aws_s3_keepNotificationInImportedBucket, _aws_cdk_aws_ecs_enableImdsBlockingDeprecatedFeature, _aws_cdk_aws_ecs_disableEcsImdsBlocking, _aws_cdk_aws_ecs_reduceEc2FargateCloudWatchPermissions, _aws_cdk_aws_dynamodb_resourcePolicyPerReplica, _aws_cdk_aws_ec2_ec2SumTImeoutEnabled, _aws_cdk_aws_appsync_appSyncGraphQLAPIScopeLambdaPermission, _aws_cdk_aws_rds_setCorrectValueForDatabaseInstanceReadReplicaInstanceResourceId, _aws_cdk_core_cfnIncludeRejectComplexResourceUpdateCreatePolicyIntrinsics, _aws_cdk_aws_lambda_nodejs_sdkV3ExcludeSmithyPackages, _aws_cdk_aws_stepfunctions_tasks_fixRunEcsTaskPolicy, _aws_cdk_aws_ec2_bastionHostUseAmazonLinux2023ByDefault, _aws_cdk_aws_route53_targets_userPoolDomainNameMethodWithoutCustomResource, _aws_cdk_aws_elasticloadbalancingV2_albDualstackWithoutPublicIpv4SecurityGroupRulesDefault, _aws_cdk_aws_iam_oidcRejectUnauthorizedConnections, _aws_cdk_core_enableAdditionalMetadataCollection, _aws_cdk_aws_lambda_createNewPoliciesWithAddToRolePolicy, recommended_feature_flags_default;
12383
12398
  var init_recommended_feature_flags = __esm({
12384
12399
  "lib/recommended-feature-flags.json"() {
12385
12400
  _aws_cdk_aws_lambda_recognizeLayerVersion = true;
@@ -12448,6 +12463,7 @@ var init_recommended_feature_flags = __esm({
12448
12463
  _aws_cdk_aws_elasticloadbalancingV2_albDualstackWithoutPublicIpv4SecurityGroupRulesDefault = true;
12449
12464
  _aws_cdk_aws_iam_oidcRejectUnauthorizedConnections = true;
12450
12465
  _aws_cdk_core_enableAdditionalMetadataCollection = true;
12466
+ _aws_cdk_aws_lambda_createNewPoliciesWithAddToRolePolicy = true;
12451
12467
  recommended_feature_flags_default = {
12452
12468
  "@aws-cdk/aws-lambda:recognizeLayerVersion": _aws_cdk_aws_lambda_recognizeLayerVersion,
12453
12469
  "@aws-cdk/core:checkSecretUsage": _aws_cdk_core_checkSecretUsage,
@@ -12511,7 +12527,8 @@ var init_recommended_feature_flags = __esm({
12511
12527
  "@aws-cdk/aws-route53-targets:userPoolDomainNameMethodWithoutCustomResource": _aws_cdk_aws_route53_targets_userPoolDomainNameMethodWithoutCustomResource,
12512
12528
  "@aws-cdk/aws-elasticloadbalancingV2:albDualstackWithoutPublicIpv4SecurityGroupRulesDefault": _aws_cdk_aws_elasticloadbalancingV2_albDualstackWithoutPublicIpv4SecurityGroupRulesDefault,
12513
12529
  "@aws-cdk/aws-iam:oidcRejectUnauthorizedConnections": _aws_cdk_aws_iam_oidcRejectUnauthorizedConnections,
12514
- "@aws-cdk/core:enableAdditionalMetadataCollection": _aws_cdk_core_enableAdditionalMetadataCollection
12530
+ "@aws-cdk/core:enableAdditionalMetadataCollection": _aws_cdk_core_enableAdditionalMetadataCollection,
12531
+ "@aws-cdk/aws-lambda:createNewPoliciesWithAddToRolePolicy": _aws_cdk_aws_lambda_createNewPoliciesWithAddToRolePolicy
12515
12532
  };
12516
12533
  }
12517
12534
  });
@@ -12745,8 +12762,8 @@ var require_helpers2 = __commonJS({
12745
12762
  var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema, path11, name, argument) {
12746
12763
  if (Array.isArray(path11)) {
12747
12764
  this.path = path11;
12748
- this.property = path11.reduce(function(sum2, item) {
12749
- return sum2 + makeSuffix(item);
12765
+ this.property = path11.reduce(function(sum, item) {
12766
+ return sum + makeSuffix(item);
12750
12767
  }, "instance");
12751
12768
  } else if (path11 !== void 0) {
12752
12769
  this.property = path11;
@@ -12845,8 +12862,8 @@ var require_helpers2 = __commonJS({
12845
12862
  this.options = options;
12846
12863
  if (Array.isArray(path11)) {
12847
12864
  this.path = path11;
12848
- this.propertyPath = path11.reduce(function(sum2, item) {
12849
- return sum2 + makeSuffix(item);
12865
+ this.propertyPath = path11.reduce(function(sum, item) {
12866
+ return sum + makeSuffix(item);
12850
12867
  }, "instance");
12851
12868
  } else {
12852
12869
  this.propertyPath = path11;
@@ -12923,16 +12940,16 @@ var require_helpers2 = __commonJS({
12923
12940
  FORMAT_REGEXPS.regexp = FORMAT_REGEXPS.regex;
12924
12941
  FORMAT_REGEXPS.pattern = FORMAT_REGEXPS.regex;
12925
12942
  FORMAT_REGEXPS.ipv4 = FORMAT_REGEXPS["ip-address"];
12926
- exports2.isFormat = function isFormat(input, format4, validator) {
12927
- if (typeof input === "string" && FORMAT_REGEXPS[format4] !== void 0) {
12928
- if (FORMAT_REGEXPS[format4] instanceof RegExp) {
12929
- return FORMAT_REGEXPS[format4].test(input);
12943
+ exports2.isFormat = function isFormat(input, format3, validator) {
12944
+ if (typeof input === "string" && FORMAT_REGEXPS[format3] !== void 0) {
12945
+ if (FORMAT_REGEXPS[format3] instanceof RegExp) {
12946
+ return FORMAT_REGEXPS[format3].test(input);
12930
12947
  }
12931
- if (typeof FORMAT_REGEXPS[format4] === "function") {
12932
- return FORMAT_REGEXPS[format4](input);
12948
+ if (typeof FORMAT_REGEXPS[format3] === "function") {
12949
+ return FORMAT_REGEXPS[format3](input);
12933
12950
  }
12934
- } else if (validator && validator.customFormats && typeof validator.customFormats[format4] === "function") {
12935
- return validator.customFormats[format4](input);
12951
+ } else if (validator && validator.customFormats && typeof validator.customFormats[format3] === "function") {
12952
+ return validator.customFormats[format3](input);
12936
12953
  }
12937
12954
  return true;
12938
12955
  };
@@ -14615,16 +14632,16 @@ var require_prerelease2 = __commonJS({
14615
14632
  var require_compare2 = __commonJS({
14616
14633
  "../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/compare.js"(exports2, module2) {
14617
14634
  var SemVer = require_semver3();
14618
- var compare2 = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
14619
- module2.exports = compare2;
14635
+ var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
14636
+ module2.exports = compare;
14620
14637
  }
14621
14638
  });
14622
14639
 
14623
14640
  // ../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/rcompare.js
14624
14641
  var require_rcompare2 = __commonJS({
14625
14642
  "../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/rcompare.js"(exports2, module2) {
14626
- var compare2 = require_compare2();
14627
- var rcompare = (a, b, loose) => compare2(b, a, loose);
14643
+ var compare = require_compare2();
14644
+ var rcompare = (a, b, loose) => compare(b, a, loose);
14628
14645
  module2.exports = rcompare;
14629
14646
  }
14630
14647
  });
@@ -14632,8 +14649,8 @@ var require_rcompare2 = __commonJS({
14632
14649
  // ../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/compare-loose.js
14633
14650
  var require_compare_loose2 = __commonJS({
14634
14651
  "../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/compare-loose.js"(exports2, module2) {
14635
- var compare2 = require_compare2();
14636
- var compareLoose = (a, b) => compare2(a, b, true);
14652
+ var compare = require_compare2();
14653
+ var compareLoose = (a, b) => compare(a, b, true);
14637
14654
  module2.exports = compareLoose;
14638
14655
  }
14639
14656
  });
@@ -14672,8 +14689,8 @@ var require_rsort2 = __commonJS({
14672
14689
  // ../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/gt.js
14673
14690
  var require_gt2 = __commonJS({
14674
14691
  "../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/gt.js"(exports2, module2) {
14675
- var compare2 = require_compare2();
14676
- var gt = (a, b, loose) => compare2(a, b, loose) > 0;
14692
+ var compare = require_compare2();
14693
+ var gt = (a, b, loose) => compare(a, b, loose) > 0;
14677
14694
  module2.exports = gt;
14678
14695
  }
14679
14696
  });
@@ -14681,8 +14698,8 @@ var require_gt2 = __commonJS({
14681
14698
  // ../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/lt.js
14682
14699
  var require_lt2 = __commonJS({
14683
14700
  "../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/lt.js"(exports2, module2) {
14684
- var compare2 = require_compare2();
14685
- var lt = (a, b, loose) => compare2(a, b, loose) < 0;
14701
+ var compare = require_compare2();
14702
+ var lt = (a, b, loose) => compare(a, b, loose) < 0;
14686
14703
  module2.exports = lt;
14687
14704
  }
14688
14705
  });
@@ -14690,8 +14707,8 @@ var require_lt2 = __commonJS({
14690
14707
  // ../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/eq.js
14691
14708
  var require_eq2 = __commonJS({
14692
14709
  "../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/eq.js"(exports2, module2) {
14693
- var compare2 = require_compare2();
14694
- var eq = (a, b, loose) => compare2(a, b, loose) === 0;
14710
+ var compare = require_compare2();
14711
+ var eq = (a, b, loose) => compare(a, b, loose) === 0;
14695
14712
  module2.exports = eq;
14696
14713
  }
14697
14714
  });
@@ -14699,8 +14716,8 @@ var require_eq2 = __commonJS({
14699
14716
  // ../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/neq.js
14700
14717
  var require_neq2 = __commonJS({
14701
14718
  "../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/neq.js"(exports2, module2) {
14702
- var compare2 = require_compare2();
14703
- var neq = (a, b, loose) => compare2(a, b, loose) !== 0;
14719
+ var compare = require_compare2();
14720
+ var neq = (a, b, loose) => compare(a, b, loose) !== 0;
14704
14721
  module2.exports = neq;
14705
14722
  }
14706
14723
  });
@@ -14708,8 +14725,8 @@ var require_neq2 = __commonJS({
14708
14725
  // ../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/gte.js
14709
14726
  var require_gte2 = __commonJS({
14710
14727
  "../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/gte.js"(exports2, module2) {
14711
- var compare2 = require_compare2();
14712
- var gte = (a, b, loose) => compare2(a, b, loose) >= 0;
14728
+ var compare = require_compare2();
14729
+ var gte = (a, b, loose) => compare(a, b, loose) >= 0;
14713
14730
  module2.exports = gte;
14714
14731
  }
14715
14732
  });
@@ -14717,8 +14734,8 @@ var require_gte2 = __commonJS({
14717
14734
  // ../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/lte.js
14718
14735
  var require_lte2 = __commonJS({
14719
14736
  "../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/lte.js"(exports2, module2) {
14720
- var compare2 = require_compare2();
14721
- var lte = (a, b, loose) => compare2(a, b, loose) <= 0;
14737
+ var compare = require_compare2();
14738
+ var lte = (a, b, loose) => compare(a, b, loose) <= 0;
14722
14739
  module2.exports = lte;
14723
14740
  }
14724
14741
  });
@@ -15598,12 +15615,12 @@ var require_intersects2 = __commonJS({
15598
15615
  var require_simplify2 = __commonJS({
15599
15616
  "../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/ranges/simplify.js"(exports2, module2) {
15600
15617
  var satisfies = require_satisfies2();
15601
- var compare2 = require_compare2();
15618
+ var compare = require_compare2();
15602
15619
  module2.exports = (versions, range, options) => {
15603
15620
  const set = [];
15604
15621
  let first = null;
15605
15622
  let prev = null;
15606
- const v = versions.sort((a, b) => compare2(a, b, options));
15623
+ const v = versions.sort((a, b) => compare(a, b, options));
15607
15624
  for (const version of v) {
15608
15625
  const included = satisfies(version, range, options);
15609
15626
  if (included) {
@@ -15650,7 +15667,7 @@ var require_subset2 = __commonJS({
15650
15667
  var Comparator = require_comparator2();
15651
15668
  var { ANY } = Comparator;
15652
15669
  var satisfies = require_satisfies2();
15653
- var compare2 = require_compare2();
15670
+ var compare = require_compare2();
15654
15671
  var subset = (sub, dom, options = {}) => {
15655
15672
  if (sub === dom) {
15656
15673
  return true;
@@ -15710,7 +15727,7 @@ var require_subset2 = __commonJS({
15710
15727
  }
15711
15728
  let gtltComp;
15712
15729
  if (gt && lt) {
15713
- gtltComp = compare2(gt.semver, lt.semver, options);
15730
+ gtltComp = compare(gt.semver, lt.semver, options);
15714
15731
  if (gtltComp > 0) {
15715
15732
  return null;
15716
15733
  } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
@@ -15790,14 +15807,14 @@ var require_subset2 = __commonJS({
15790
15807
  if (!a) {
15791
15808
  return b;
15792
15809
  }
15793
- const comp = compare2(a.semver, b.semver, options);
15810
+ const comp = compare(a.semver, b.semver, options);
15794
15811
  return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
15795
15812
  };
15796
15813
  var lowerLT = (a, b, options) => {
15797
15814
  if (!a) {
15798
15815
  return b;
15799
15816
  }
15800
- const comp = compare2(a.semver, b.semver, options);
15817
+ const comp = compare(a.semver, b.semver, options);
15801
15818
  return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
15802
15819
  };
15803
15820
  module2.exports = subset;
@@ -15820,7 +15837,7 @@ var require_semver4 = __commonJS({
15820
15837
  var minor = require_minor2();
15821
15838
  var patch = require_patch2();
15822
15839
  var prerelease = require_prerelease2();
15823
- var compare2 = require_compare2();
15840
+ var compare = require_compare2();
15824
15841
  var rcompare = require_rcompare2();
15825
15842
  var compareLoose = require_compare_loose2();
15826
15843
  var compareBuild = require_compare_build2();
@@ -15858,7 +15875,7 @@ var require_semver4 = __commonJS({
15858
15875
  minor,
15859
15876
  patch,
15860
15877
  prerelease,
15861
- compare: compare2,
15878
+ compare,
15862
15879
  rcompare,
15863
15880
  compareLoose,
15864
15881
  compareBuild,
@@ -20296,11 +20313,11 @@ var require_picomatch = __commonJS({
20296
20313
  return { isMatch: false, output: "" };
20297
20314
  }
20298
20315
  const opts = options || {};
20299
- const format4 = opts.format || (posix ? utils.toPosixSlashes : null);
20316
+ const format3 = opts.format || (posix ? utils.toPosixSlashes : null);
20300
20317
  let match = input === glob;
20301
- let output = match && format4 ? format4(input) : input;
20318
+ let output = match && format3 ? format3(input) : input;
20302
20319
  if (match === false) {
20303
- output = format4 ? format4(input) : input;
20320
+ output = format3 ? format3(input) : input;
20304
20321
  match = output === glob;
20305
20322
  }
20306
20323
  if (match === false || opts.capture === true) {
@@ -21094,7 +21111,7 @@ var require_to_regex_range = __commonJS({
21094
21111
  stop = countZeros(max + 1, zeros) - 1;
21095
21112
  }
21096
21113
  stops = [...stops];
21097
- stops.sort(compare2);
21114
+ stops.sort(compare);
21098
21115
  return stops;
21099
21116
  }
21100
21117
  function rangeToPattern(start, stop, options) {
@@ -21152,10 +21169,10 @@ var require_to_regex_range = __commonJS({
21152
21169
  let result = [];
21153
21170
  for (let ele of arr) {
21154
21171
  let { string } = ele;
21155
- if (!intersection && !contains2(comparison, "string", string)) {
21172
+ if (!intersection && !contains(comparison, "string", string)) {
21156
21173
  result.push(prefix + string);
21157
21174
  }
21158
- if (intersection && contains2(comparison, "string", string)) {
21175
+ if (intersection && contains(comparison, "string", string)) {
21159
21176
  result.push(prefix + string);
21160
21177
  }
21161
21178
  }
@@ -21166,10 +21183,10 @@ var require_to_regex_range = __commonJS({
21166
21183
  for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
21167
21184
  return arr;
21168
21185
  }
21169
- function compare2(a, b) {
21186
+ function compare(a, b) {
21170
21187
  return a > b ? 1 : b > a ? -1 : 0;
21171
21188
  }
21172
- function contains2(arr, key, val) {
21189
+ function contains(arr, key, val) {
21173
21190
  return arr.some((ele) => ele[key] === val);
21174
21191
  }
21175
21192
  function countNines(min, len) {
@@ -21333,7 +21350,7 @@ var require_fill_range = __commonJS({
21333
21350
  let padded = zeros(startString) || zeros(endString) || zeros(stepString);
21334
21351
  let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
21335
21352
  let toNumber = padded === false && stringify(start, end, options) === false;
21336
- let format4 = options.transform || transform(toNumber);
21353
+ let format3 = options.transform || transform(toNumber);
21337
21354
  if (options.toRegex && step === 1) {
21338
21355
  return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
21339
21356
  }
@@ -21345,7 +21362,7 @@ var require_fill_range = __commonJS({
21345
21362
  if (options.toRegex === true && step > 1) {
21346
21363
  push(a);
21347
21364
  } else {
21348
- range.push(pad(format4(a, index), maxLen, toNumber));
21365
+ range.push(pad(format3(a, index), maxLen, toNumber));
21349
21366
  }
21350
21367
  a = descending ? a - step : a + step;
21351
21368
  index++;
@@ -21359,7 +21376,7 @@ var require_fill_range = __commonJS({
21359
21376
  if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
21360
21377
  return invalidRange(start, end, options);
21361
21378
  }
21362
- let format4 = options.transform || ((val) => String.fromCharCode(val));
21379
+ let format3 = options.transform || ((val) => String.fromCharCode(val));
21363
21380
  let a = `${start}`.charCodeAt(0);
21364
21381
  let b = `${end}`.charCodeAt(0);
21365
21382
  let descending = a > b;
@@ -21371,7 +21388,7 @@ var require_fill_range = __commonJS({
21371
21388
  let range = [];
21372
21389
  let index = 0;
21373
21390
  while (descending ? a >= b : a <= b) {
21374
- range.push(format4(a, index));
21391
+ range.push(format3(a, index));
21375
21392
  a = descending ? a - step : a + step;
21376
21393
  index++;
21377
21394
  }
@@ -24746,17 +24763,17 @@ var require_conversions = __commonJS({
24746
24763
  return [0, 0, args[0]];
24747
24764
  };
24748
24765
  convert.gray.hsv = convert.gray.hsl;
24749
- convert.gray.hwb = function(gray4) {
24750
- return [0, 100, gray4[0]];
24766
+ convert.gray.hwb = function(gray2) {
24767
+ return [0, 100, gray2[0]];
24751
24768
  };
24752
- convert.gray.cmyk = function(gray4) {
24753
- return [0, 0, 0, gray4[0]];
24769
+ convert.gray.cmyk = function(gray2) {
24770
+ return [0, 0, 0, gray2[0]];
24754
24771
  };
24755
- convert.gray.lab = function(gray4) {
24756
- return [gray4[0], 0, 0];
24772
+ convert.gray.lab = function(gray2) {
24773
+ return [gray2[0], 0, 0];
24757
24774
  };
24758
- convert.gray.hex = function(gray4) {
24759
- const val = Math.round(gray4[0] / 100 * 255) & 255;
24775
+ convert.gray.hex = function(gray2) {
24776
+ const val = Math.round(gray2[0] / 100 * 255) & 255;
24760
24777
  const integer = (val << 16) + (val << 8) + val;
24761
24778
  const string = integer.toString(16).toUpperCase();
24762
24779
  return "000000".substring(string.length) + string;
@@ -25257,14 +25274,14 @@ var require_templates = __commonJS({
25257
25274
  }
25258
25275
  return results;
25259
25276
  }
25260
- function buildStyle(chalk7, styles) {
25277
+ function buildStyle(chalk3, styles) {
25261
25278
  const enabled = {};
25262
25279
  for (const layer of styles) {
25263
25280
  for (const style of layer.styles) {
25264
25281
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
25265
25282
  }
25266
25283
  }
25267
- let current = chalk7;
25284
+ let current = chalk3;
25268
25285
  for (const [styleName, styles2] of Object.entries(enabled)) {
25269
25286
  if (!Array.isArray(styles2)) {
25270
25287
  continue;
@@ -25276,7 +25293,7 @@ var require_templates = __commonJS({
25276
25293
  }
25277
25294
  return current;
25278
25295
  }
25279
- module2.exports = (chalk7, temporary) => {
25296
+ module2.exports = (chalk3, temporary) => {
25280
25297
  const styles = [];
25281
25298
  const chunks2 = [];
25282
25299
  let chunk = [];
@@ -25286,13 +25303,13 @@ var require_templates = __commonJS({
25286
25303
  } else if (style) {
25287
25304
  const string = chunk.join("");
25288
25305
  chunk = [];
25289
- chunks2.push(styles.length === 0 ? string : buildStyle(chalk7, styles)(string));
25306
+ chunks2.push(styles.length === 0 ? string : buildStyle(chalk3, styles)(string));
25290
25307
  styles.push({ inverse, styles: parseStyle(style) });
25291
25308
  } else if (close) {
25292
25309
  if (styles.length === 0) {
25293
25310
  throw new Error("Found extraneous } in Chalk template literal");
25294
25311
  }
25295
- chunks2.push(buildStyle(chalk7, styles)(chunk.join("")));
25312
+ chunks2.push(buildStyle(chalk3, styles)(chunk.join("")));
25296
25313
  chunk = [];
25297
25314
  styles.pop();
25298
25315
  } else {
@@ -25340,16 +25357,16 @@ var require_source = __commonJS({
25340
25357
  }
25341
25358
  };
25342
25359
  var chalkFactory = (options) => {
25343
- const chalk8 = {};
25344
- applyOptions(chalk8, options);
25345
- chalk8.template = (...arguments_) => chalkTag(chalk8.template, ...arguments_);
25346
- Object.setPrototypeOf(chalk8, Chalk.prototype);
25347
- Object.setPrototypeOf(chalk8.template, chalk8);
25348
- chalk8.template.constructor = () => {
25360
+ const chalk4 = {};
25361
+ applyOptions(chalk4, options);
25362
+ chalk4.template = (...arguments_) => chalkTag(chalk4.template, ...arguments_);
25363
+ Object.setPrototypeOf(chalk4, Chalk.prototype);
25364
+ Object.setPrototypeOf(chalk4.template, chalk4);
25365
+ chalk4.template.constructor = () => {
25349
25366
  throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
25350
25367
  };
25351
- chalk8.template.Instance = ChalkClass;
25352
- return chalk8.template;
25368
+ chalk4.template.Instance = ChalkClass;
25369
+ return chalk4.template;
25353
25370
  };
25354
25371
  function Chalk(options) {
25355
25372
  return chalkFactory(options);
@@ -25460,7 +25477,7 @@ var require_source = __commonJS({
25460
25477
  return openAll + string + closeAll;
25461
25478
  };
25462
25479
  var template;
25463
- var chalkTag = (chalk8, ...strings) => {
25480
+ var chalkTag = (chalk4, ...strings) => {
25464
25481
  const [firstString] = strings;
25465
25482
  if (!isArray(firstString) || !isArray(firstString.raw)) {
25466
25483
  return strings.join(" ");
@@ -25476,14 +25493,14 @@ var require_source = __commonJS({
25476
25493
  if (template === void 0) {
25477
25494
  template = require_templates();
25478
25495
  }
25479
- return template(chalk8, parts.join(""));
25496
+ return template(chalk4, parts.join(""));
25480
25497
  };
25481
25498
  Object.defineProperties(Chalk.prototype, styles);
25482
- var chalk7 = Chalk();
25483
- chalk7.supportsColor = stdoutColor;
25484
- chalk7.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
25485
- chalk7.stderr.supportsColor = stderrColor;
25486
- module2.exports = chalk7;
25499
+ var chalk3 = Chalk();
25500
+ chalk3.supportsColor = stdoutColor;
25501
+ chalk3.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
25502
+ chalk3.stderr.supportsColor = stderrColor;
25503
+ module2.exports = chalk3;
25487
25504
  }
25488
25505
  });
25489
25506
 
@@ -26724,27 +26741,27 @@ var require_resource = __commonJS({
26724
26741
  return x.type === "array" || x.type === "map";
26725
26742
  }
26726
26743
  exports2.isCollectionType = isCollectionType;
26727
- var ResourceScrutinyType3;
26728
- (function(ResourceScrutinyType4) {
26729
- ResourceScrutinyType4["None"] = "None";
26730
- ResourceScrutinyType4["ResourcePolicyResource"] = "ResourcePolicyResource";
26731
- ResourceScrutinyType4["IdentityPolicyResource"] = "IdentityPolicyResource";
26732
- ResourceScrutinyType4["LambdaPermission"] = "LambdaPermission";
26733
- ResourceScrutinyType4["IngressRuleResource"] = "IngressRuleResource";
26734
- ResourceScrutinyType4["EgressRuleResource"] = "EgressRuleResource";
26735
- ResourceScrutinyType4["SsoAssignmentResource"] = "SsoAssignmentResource";
26736
- ResourceScrutinyType4["SsoInstanceACAConfigResource"] = "SsoInstanceACAConfigResource";
26737
- ResourceScrutinyType4["SsoPermissionSet"] = "SsoPermissionSet";
26738
- })(ResourceScrutinyType3 = exports2.ResourceScrutinyType || (exports2.ResourceScrutinyType = {}));
26739
- var PropertyScrutinyType3;
26740
- (function(PropertyScrutinyType4) {
26741
- PropertyScrutinyType4["None"] = "None";
26742
- PropertyScrutinyType4["InlineResourcePolicy"] = "InlineResourcePolicy";
26743
- PropertyScrutinyType4["InlineIdentityPolicies"] = "InlineIdentityPolicies";
26744
- PropertyScrutinyType4["ManagedPolicies"] = "ManagedPolicies";
26745
- PropertyScrutinyType4["IngressRules"] = "IngressRules";
26746
- PropertyScrutinyType4["EgressRules"] = "EgressRules";
26747
- })(PropertyScrutinyType3 = exports2.PropertyScrutinyType || (exports2.PropertyScrutinyType = {}));
26744
+ var ResourceScrutinyType;
26745
+ (function(ResourceScrutinyType2) {
26746
+ ResourceScrutinyType2["None"] = "None";
26747
+ ResourceScrutinyType2["ResourcePolicyResource"] = "ResourcePolicyResource";
26748
+ ResourceScrutinyType2["IdentityPolicyResource"] = "IdentityPolicyResource";
26749
+ ResourceScrutinyType2["LambdaPermission"] = "LambdaPermission";
26750
+ ResourceScrutinyType2["IngressRuleResource"] = "IngressRuleResource";
26751
+ ResourceScrutinyType2["EgressRuleResource"] = "EgressRuleResource";
26752
+ ResourceScrutinyType2["SsoAssignmentResource"] = "SsoAssignmentResource";
26753
+ ResourceScrutinyType2["SsoInstanceACAConfigResource"] = "SsoInstanceACAConfigResource";
26754
+ ResourceScrutinyType2["SsoPermissionSet"] = "SsoPermissionSet";
26755
+ })(ResourceScrutinyType = exports2.ResourceScrutinyType || (exports2.ResourceScrutinyType = {}));
26756
+ var PropertyScrutinyType;
26757
+ (function(PropertyScrutinyType2) {
26758
+ PropertyScrutinyType2["None"] = "None";
26759
+ PropertyScrutinyType2["InlineResourcePolicy"] = "InlineResourcePolicy";
26760
+ PropertyScrutinyType2["InlineIdentityPolicies"] = "InlineIdentityPolicies";
26761
+ PropertyScrutinyType2["ManagedPolicies"] = "ManagedPolicies";
26762
+ PropertyScrutinyType2["IngressRules"] = "IngressRules";
26763
+ PropertyScrutinyType2["EgressRules"] = "EgressRules";
26764
+ })(PropertyScrutinyType = exports2.PropertyScrutinyType || (exports2.PropertyScrutinyType = {}));
26748
26765
  var RichPropertyType = class _RichPropertyType {
26749
26766
  constructor(type) {
26750
26767
  this.type = type;
@@ -26940,132 +26957,130 @@ var require_lib9 = __commonJS({
26940
26957
  }
26941
26958
  });
26942
26959
 
26943
- // ../cloudformation-diff/lib/diff/util.ts
26944
- var util_exports = {};
26945
- __export(util_exports, {
26946
- deepEqual: () => deepEqual,
26947
- diffKeyedEntities: () => diffKeyedEntities,
26948
- loadResourceModel: () => loadResourceModel,
26949
- mangleLikeCloudFormation: () => mangleLikeCloudFormation,
26950
- unionOf: () => unionOf
26951
- });
26952
- function deepEqual(lvalue, rvalue) {
26953
- if (lvalue === rvalue) {
26954
- return true;
26955
- }
26956
- if ((typeof lvalue === "string" && typeof rvalue === "boolean" || typeof lvalue === "boolean" && typeof rvalue === "string") && lvalue.toString() === rvalue.toString()) {
26957
- return true;
26958
- }
26959
- if ((typeof lvalue === "string" || typeof rvalue === "string") && safeParseFloat(lvalue) === safeParseFloat(rvalue)) {
26960
- return true;
26961
- }
26962
- if (typeof lvalue !== typeof rvalue) {
26963
- return false;
26964
- }
26965
- if (Array.isArray(lvalue) !== Array.isArray(rvalue)) {
26966
- return false;
26967
- }
26968
- if (Array.isArray(lvalue)) {
26969
- if (lvalue.length !== rvalue.length) {
26970
- return false;
26971
- }
26972
- for (let i = 0; i < lvalue.length; i++) {
26973
- if (!deepEqual(lvalue[i], rvalue[i])) {
26960
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/util.js
26961
+ var require_util2 = __commonJS({
26962
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/util.js"(exports2) {
26963
+ "use strict";
26964
+ Object.defineProperty(exports2, "__esModule", { value: true });
26965
+ exports2.deepEqual = deepEqual;
26966
+ exports2.diffKeyedEntities = diffKeyedEntities;
26967
+ exports2.unionOf = unionOf;
26968
+ exports2.mangleLikeCloudFormation = mangleLikeCloudFormation;
26969
+ exports2.loadResourceModel = loadResourceModel;
26970
+ var aws_service_spec_1 = require("@aws-cdk/aws-service-spec");
26971
+ function deepEqual(lvalue, rvalue) {
26972
+ if (lvalue === rvalue) {
26973
+ return true;
26974
+ }
26975
+ if ((typeof lvalue === "string" && typeof rvalue === "boolean" || typeof lvalue === "boolean" && typeof rvalue === "string") && lvalue.toString() === rvalue.toString()) {
26976
+ return true;
26977
+ }
26978
+ if ((typeof lvalue === "string" || typeof rvalue === "string") && safeParseFloat(lvalue) === safeParseFloat(rvalue)) {
26979
+ return true;
26980
+ }
26981
+ if (typeof lvalue !== typeof rvalue) {
26974
26982
  return false;
26975
26983
  }
26976
- }
26977
- return true;
26978
- }
26979
- if (typeof lvalue === "object") {
26980
- if (lvalue === null || rvalue === null) {
26981
- return false;
26982
- }
26983
- const keys = Object.keys(lvalue);
26984
- if (keys.length !== Object.keys(rvalue).length) {
26984
+ if (Array.isArray(lvalue) !== Array.isArray(rvalue)) {
26985
+ return false;
26986
+ }
26987
+ if (Array.isArray(lvalue)) {
26988
+ if (lvalue.length !== rvalue.length) {
26989
+ return false;
26990
+ }
26991
+ for (let i = 0; i < lvalue.length; i++) {
26992
+ if (!deepEqual(lvalue[i], rvalue[i])) {
26993
+ return false;
26994
+ }
26995
+ }
26996
+ return true;
26997
+ }
26998
+ if (typeof lvalue === "object") {
26999
+ if (lvalue === null || rvalue === null) {
27000
+ return false;
27001
+ }
27002
+ const keys = Object.keys(lvalue);
27003
+ if (keys.length !== Object.keys(rvalue).length) {
27004
+ return false;
27005
+ }
27006
+ for (const key of keys) {
27007
+ if (!rvalue.hasOwnProperty(key)) {
27008
+ return false;
27009
+ }
27010
+ if (key === "DependsOn") {
27011
+ if (!dependsOnEqual(lvalue[key], rvalue[key])) {
27012
+ return false;
27013
+ }
27014
+ continue;
27015
+ }
27016
+ if (!deepEqual(lvalue[key], rvalue[key])) {
27017
+ return false;
27018
+ }
27019
+ }
27020
+ return true;
27021
+ }
26985
27022
  return false;
26986
27023
  }
26987
- for (const key of keys) {
26988
- if (!rvalue.hasOwnProperty(key)) {
27024
+ function dependsOnEqual(lvalue, rvalue) {
27025
+ if (Array.isArray(lvalue) !== Array.isArray(rvalue)) {
27026
+ const array = Array.isArray(lvalue) ? lvalue : rvalue;
27027
+ const nonArray = Array.isArray(lvalue) ? rvalue : lvalue;
27028
+ if (array.length === 1 && deepEqual(array[0], nonArray)) {
27029
+ return true;
27030
+ }
26989
27031
  return false;
26990
27032
  }
26991
- if (key === "DependsOn") {
26992
- if (!dependsOnEqual(lvalue[key], rvalue[key])) {
27033
+ if (Array.isArray(lvalue) && Array.isArray(rvalue)) {
27034
+ if (lvalue.length !== rvalue.length) {
26993
27035
  return false;
26994
27036
  }
26995
- continue;
27037
+ for (let i = 0; i < lvalue.length; i++) {
27038
+ for (let j = 0; j < lvalue.length; j++) {
27039
+ if (!deepEqual(lvalue[i], rvalue[j]) && j === lvalue.length - 1) {
27040
+ return false;
27041
+ }
27042
+ break;
27043
+ }
27044
+ }
27045
+ return true;
26996
27046
  }
26997
- if (!deepEqual(lvalue[key], rvalue[key])) {
26998
- return false;
27047
+ return false;
27048
+ }
27049
+ function diffKeyedEntities(oldValue, newValue, elementDiff) {
27050
+ const result = {};
27051
+ for (const logicalId of unionOf(Object.keys(oldValue || {}), Object.keys(newValue || {}))) {
27052
+ const oldElement = oldValue && oldValue[logicalId];
27053
+ const newElement = newValue && newValue[logicalId];
27054
+ if (oldElement === void 0 && newElement === void 0) {
27055
+ continue;
27056
+ }
27057
+ result[logicalId] = elementDiff(oldElement, newElement, logicalId);
26999
27058
  }
27059
+ return result;
27000
27060
  }
27001
- return true;
27002
- }
27003
- return false;
27004
- }
27005
- function dependsOnEqual(lvalue, rvalue) {
27006
- if (Array.isArray(lvalue) !== Array.isArray(rvalue)) {
27007
- const array = Array.isArray(lvalue) ? lvalue : rvalue;
27008
- const nonArray = Array.isArray(lvalue) ? rvalue : lvalue;
27009
- if (array.length === 1 && deepEqual(array[0], nonArray)) {
27010
- return true;
27061
+ function unionOf(lv, rv) {
27062
+ const result = new Set(lv);
27063
+ for (const v of rv) {
27064
+ result.add(v);
27065
+ }
27066
+ return new Array(...result);
27011
27067
  }
27012
- return false;
27013
- }
27014
- if (Array.isArray(lvalue) && Array.isArray(rvalue)) {
27015
- if (lvalue.length !== rvalue.length) {
27016
- return false;
27068
+ function mangleLikeCloudFormation(payload) {
27069
+ return payload.replace(/[\u{80}-\u{10ffff}]/gu, "?");
27017
27070
  }
27018
- for (let i = 0; i < lvalue.length; i++) {
27019
- for (let j = 0; j < lvalue.length; j++) {
27020
- if (!deepEqual(lvalue[i], rvalue[j]) && j === lvalue.length - 1) {
27021
- return false;
27022
- }
27023
- break;
27071
+ function safeParseFloat(str) {
27072
+ return Number(str);
27073
+ }
27074
+ var DATABASE;
27075
+ function database() {
27076
+ if (!DATABASE) {
27077
+ DATABASE = (0, aws_service_spec_1.loadAwsServiceSpecSync)();
27024
27078
  }
27079
+ return DATABASE;
27025
27080
  }
27026
- return true;
27027
- }
27028
- return false;
27029
- }
27030
- function diffKeyedEntities(oldValue, newValue, elementDiff) {
27031
- const result = {};
27032
- for (const logicalId of unionOf(Object.keys(oldValue || {}), Object.keys(newValue || {}))) {
27033
- const oldElement = oldValue && oldValue[logicalId];
27034
- const newElement = newValue && newValue[logicalId];
27035
- if (oldElement === void 0 && newElement === void 0) {
27036
- continue;
27081
+ function loadResourceModel(type) {
27082
+ return database().lookup("resource", "cloudFormationType", "equals", type)[0];
27037
27083
  }
27038
- result[logicalId] = elementDiff(oldElement, newElement, logicalId);
27039
- }
27040
- return result;
27041
- }
27042
- function unionOf(lv, rv) {
27043
- const result = new Set(lv);
27044
- for (const v of rv) {
27045
- result.add(v);
27046
- }
27047
- return new Array(...result);
27048
- }
27049
- function mangleLikeCloudFormation(payload) {
27050
- return payload.replace(/[\u{80}-\u{10ffff}]/gu, "?");
27051
- }
27052
- function safeParseFloat(str) {
27053
- return Number(str);
27054
- }
27055
- function database() {
27056
- if (!DATABASE) {
27057
- DATABASE = (0, import_aws_service_spec.loadAwsServiceSpecSync)();
27058
- }
27059
- return DATABASE;
27060
- }
27061
- function loadResourceModel(type) {
27062
- return database().lookup("resource", "cloudFormationType", "equals", type)[0];
27063
- }
27064
- var import_aws_service_spec, DATABASE;
27065
- var init_util = __esm({
27066
- "../cloudformation-diff/lib/diff/util.ts"() {
27067
- "use strict";
27068
- import_aws_service_spec = require("@aws-cdk/aws-service-spec");
27069
27084
  }
27070
27085
  });
27071
27086
 
@@ -27104,13 +27119,14 @@ var require_fast_deep_equal = __commonJS({
27104
27119
  }
27105
27120
  });
27106
27121
 
27107
- // ../cloudformation-diff/lib/iam/iam-identity-center.ts
27108
- var deepEqual2, SsoPermissionSet, SsoAssignment, SsoInstanceACAConfig;
27109
- var init_iam_identity_center = __esm({
27110
- "../cloudformation-diff/lib/iam/iam-identity-center.ts"() {
27122
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/iam/iam-identity-center.js
27123
+ var require_iam_identity_center = __commonJS({
27124
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/iam/iam-identity-center.js"(exports2) {
27111
27125
  "use strict";
27112
- deepEqual2 = require_fast_deep_equal();
27113
- SsoPermissionSet = class {
27126
+ Object.defineProperty(exports2, "__esModule", { value: true });
27127
+ exports2.SsoInstanceACAConfig = exports2.SsoAssignment = exports2.SsoPermissionSet = void 0;
27128
+ var deepEqual = require_fast_deep_equal();
27129
+ var SsoPermissionSet = class {
27114
27130
  constructor(props) {
27115
27131
  this.cfnLogicalId = props.cfnLogicalId;
27116
27132
  this.name = props.name;
@@ -27119,10 +27135,11 @@ var init_iam_identity_center = __esm({
27119
27135
  this.ssoCustomerManagedPolicyReferences = props.ssoCustomerManagedPolicyReferences;
27120
27136
  }
27121
27137
  equal(other) {
27122
- return deepEqual2(this, other);
27138
+ return deepEqual(this, other);
27123
27139
  }
27124
27140
  };
27125
- SsoAssignment = class {
27141
+ exports2.SsoPermissionSet = SsoPermissionSet;
27142
+ var SsoAssignment = class {
27126
27143
  constructor(props) {
27127
27144
  this.cfnLogicalId = props.cfnLogicalId;
27128
27145
  this.ssoInstanceArn = props.ssoInstanceArn;
@@ -27133,52 +27150,58 @@ var init_iam_identity_center = __esm({
27133
27150
  this.targetType = props.targetType;
27134
27151
  }
27135
27152
  equal(other) {
27136
- return deepEqual2(this, other);
27153
+ return deepEqual(this, other);
27137
27154
  }
27138
27155
  };
27139
- SsoInstanceACAConfig = class {
27156
+ exports2.SsoAssignment = SsoAssignment;
27157
+ var SsoInstanceACAConfig = class {
27140
27158
  constructor(props) {
27141
27159
  this.cfnLogicalId = props.cfnLogicalId;
27142
27160
  this.ssoInstanceArn = props.ssoInstanceArn;
27143
27161
  this.accessControlAttributes = props.accessControlAttributes;
27144
27162
  }
27145
27163
  equal(other) {
27146
- return deepEqual2(this, other);
27164
+ return deepEqual(this, other);
27147
27165
  }
27148
27166
  };
27167
+ exports2.SsoInstanceACAConfig = SsoInstanceACAConfig;
27149
27168
  }
27150
27169
  });
27151
27170
 
27152
- // ../cloudformation-diff/lib/diff/maybe-parsed.ts
27153
- function mkParsed(value) {
27154
- return { type: "parsed", value };
27155
- }
27156
- function mkUnparseable(value) {
27157
- return {
27158
- type: "unparseable",
27159
- repr: typeof value === "string" ? value : JSON.stringify(value)
27160
- };
27161
- }
27162
- var init_maybe_parsed = __esm({
27163
- "../cloudformation-diff/lib/diff/maybe-parsed.ts"() {
27171
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/maybe-parsed.js
27172
+ var require_maybe_parsed = __commonJS({
27173
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/maybe-parsed.js"(exports2) {
27164
27174
  "use strict";
27175
+ Object.defineProperty(exports2, "__esModule", { value: true });
27176
+ exports2.mkParsed = mkParsed;
27177
+ exports2.mkUnparseable = mkUnparseable;
27178
+ function mkParsed(value) {
27179
+ return { type: "parsed", value };
27180
+ }
27181
+ function mkUnparseable(value) {
27182
+ return {
27183
+ type: "unparseable",
27184
+ repr: typeof value === "string" ? value : JSON.stringify(value)
27185
+ };
27186
+ }
27165
27187
  }
27166
27188
  });
27167
27189
 
27168
- // ../cloudformation-diff/lib/iam/managed-policy.ts
27169
- var ManagedPolicyAttachment;
27170
- var init_managed_policy = __esm({
27171
- "../cloudformation-diff/lib/iam/managed-policy.ts"() {
27190
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/iam/managed-policy.js
27191
+ var require_managed_policy = __commonJS({
27192
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/iam/managed-policy.js"(exports2) {
27172
27193
  "use strict";
27173
- init_maybe_parsed();
27174
- ManagedPolicyAttachment = class _ManagedPolicyAttachment {
27194
+ Object.defineProperty(exports2, "__esModule", { value: true });
27195
+ exports2.ManagedPolicyAttachment = void 0;
27196
+ var maybe_parsed_1 = require_maybe_parsed();
27197
+ var ManagedPolicyAttachment = class _ManagedPolicyAttachment {
27198
+ static parseManagedPolicies(identityArn, arns) {
27199
+ return typeof arns === "string" ? [new _ManagedPolicyAttachment(identityArn, arns)] : arns.map((arn) => new _ManagedPolicyAttachment(identityArn, arn));
27200
+ }
27175
27201
  constructor(identityArn, managedPolicyArn) {
27176
27202
  this.identityArn = identityArn;
27177
27203
  this.managedPolicyArn = managedPolicyArn;
27178
27204
  }
27179
- static parseManagedPolicies(identityArn, arns) {
27180
- return typeof arns === "string" ? [new _ManagedPolicyAttachment(identityArn, arns)] : arns.map((arn) => new _ManagedPolicyAttachment(identityArn, arn));
27181
- }
27182
27205
  equal(other) {
27183
27206
  return this.identityArn === other.identityArn && this.managedPolicyArn === other.managedPolicyArn;
27184
27207
  }
@@ -27189,166 +27212,96 @@ var init_managed_policy = __esm({
27189
27212
  * @internal
27190
27213
  */
27191
27214
  _toJson() {
27192
- return mkParsed({
27215
+ return (0, maybe_parsed_1.mkParsed)({
27193
27216
  identityArn: this.identityArn,
27194
27217
  managedPolicyArn: this.managedPolicyArn
27195
27218
  });
27196
27219
  }
27197
27220
  };
27221
+ exports2.ManagedPolicyAttachment = ManagedPolicyAttachment;
27198
27222
  }
27199
27223
  });
27200
27224
 
27201
- // ../cloudformation-diff/lib/util.ts
27202
- function makeComparator(keyFn) {
27203
- return (a, b) => {
27204
- const keyA = keyFn(a);
27205
- const keyB = keyFn(b);
27206
- const len = Math.min(keyA.length, keyB.length);
27207
- for (let i = 0; i < len; i++) {
27208
- const c = compare(keyA[i], keyB[i]);
27209
- if (c !== 0) {
27210
- return c;
27211
- }
27212
- }
27213
- return keyA.length - keyB.length;
27214
- };
27215
- }
27216
- function compare(a, b) {
27217
- if (a < b) {
27218
- return -1;
27219
- }
27220
- if (b < a) {
27221
- return 1;
27222
- }
27223
- return 0;
27224
- }
27225
- function dropIfEmpty(xs) {
27226
- return xs.length > 0 ? xs : void 0;
27227
- }
27228
- function deepRemoveUndefined(x) {
27229
- if (typeof x === void 0 || x === null) {
27230
- return x;
27231
- }
27232
- if (Array.isArray(x)) {
27233
- return x.map(deepRemoveUndefined);
27234
- }
27235
- if (typeof x === "object") {
27236
- for (const [key, value] of Object.entries(x)) {
27237
- x[key] = deepRemoveUndefined(value);
27238
- if (x[key] === void 0) {
27239
- delete x[key];
27240
- }
27241
- }
27242
- return x;
27243
- }
27244
- return x;
27245
- }
27246
- function flatMap(xs, f) {
27247
- const ret = new Array();
27248
- for (const x of xs) {
27249
- ret.push(...f(x));
27250
- }
27251
- return ret;
27252
- }
27253
- var init_util2 = __esm({
27254
- "../cloudformation-diff/lib/util.ts"() {
27225
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/util.js
27226
+ var require_util3 = __commonJS({
27227
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/util.js"(exports2) {
27255
27228
  "use strict";
27256
- }
27257
- });
27258
-
27259
- // ../cloudformation-diff/lib/iam/statement.ts
27260
- function parseStatements(x) {
27261
- if (x === void 0) {
27262
- x = [];
27263
- }
27264
- if (!Array.isArray(x)) {
27265
- x = [x];
27266
- }
27267
- return x.map((s) => new Statement(s));
27268
- }
27269
- function parseLambdaPermission(x) {
27270
- const statement = {
27271
- Effect: "Allow",
27272
- Action: x.Action,
27273
- Resource: x.FunctionName
27274
- };
27275
- if (x.Principal !== void 0) {
27276
- if (x.Principal === "*") {
27277
- statement.Principal = "*";
27278
- } else if (/^\d{12}$/.test(x.Principal)) {
27279
- statement.Principal = { AWS: `arn:aws:iam::${x.Principal}:root` };
27280
- } else {
27281
- statement.Principal = { Service: x.Principal };
27229
+ Object.defineProperty(exports2, "__esModule", { value: true });
27230
+ exports2.makeComparator = makeComparator;
27231
+ exports2.dropIfEmpty = dropIfEmpty;
27232
+ exports2.deepRemoveUndefined = deepRemoveUndefined;
27233
+ exports2.flatMap = flatMap;
27234
+ function makeComparator(keyFn) {
27235
+ return (a, b) => {
27236
+ const keyA = keyFn(a);
27237
+ const keyB = keyFn(b);
27238
+ const len = Math.min(keyA.length, keyB.length);
27239
+ for (let i = 0; i < len; i++) {
27240
+ const c = compare(keyA[i], keyB[i]);
27241
+ if (c !== 0) {
27242
+ return c;
27243
+ }
27244
+ }
27245
+ return keyA.length - keyB.length;
27246
+ };
27282
27247
  }
27283
- }
27284
- if (x.SourceArn !== void 0) {
27285
- if (statement.Condition === void 0) {
27286
- statement.Condition = {};
27248
+ function compare(a, b) {
27249
+ if (a < b) {
27250
+ return -1;
27251
+ }
27252
+ if (b < a) {
27253
+ return 1;
27254
+ }
27255
+ return 0;
27287
27256
  }
27288
- statement.Condition.ArnLike = { "AWS:SourceArn": x.SourceArn };
27289
- }
27290
- if (x.SourceAccount !== void 0) {
27291
- if (statement.Condition === void 0) {
27292
- statement.Condition = {};
27257
+ function dropIfEmpty(xs) {
27258
+ return xs.length > 0 ? xs : void 0;
27293
27259
  }
27294
- statement.Condition.StringEquals = { "AWS:SourceAccount": x.SourceAccount };
27295
- }
27296
- if (x.EventSourceToken !== void 0) {
27297
- if (statement.Condition === void 0) {
27298
- statement.Condition = {};
27260
+ function deepRemoveUndefined(x) {
27261
+ if (typeof x === void 0 || x === null) {
27262
+ return x;
27263
+ }
27264
+ if (Array.isArray(x)) {
27265
+ return x.map(deepRemoveUndefined);
27266
+ }
27267
+ if (typeof x === "object") {
27268
+ for (const [key, value] of Object.entries(x)) {
27269
+ x[key] = deepRemoveUndefined(value);
27270
+ if (x[key] === void 0) {
27271
+ delete x[key];
27272
+ }
27273
+ }
27274
+ return x;
27275
+ }
27276
+ return x;
27299
27277
  }
27300
- statement.Condition.StringEquals = { "lambda:EventSourceToken": x.EventSourceToken };
27301
- }
27302
- return new Statement(statement);
27303
- }
27304
- function expectString(x) {
27305
- return typeof x === "string" ? x : void 0;
27306
- }
27307
- function expectEffect(x) {
27308
- if (x === "Allow" /* Allow */ || x === "Deny" /* Deny */) {
27309
- return x;
27310
- }
27311
- return "Unknown" /* Unknown */;
27312
- }
27313
- function forceListOfStrings(x) {
27314
- if (typeof x === "string") {
27315
- return [x];
27316
- }
27317
- if (typeof x === "undefined" || x === null) {
27318
- return [];
27319
- }
27320
- if (Array.isArray(x)) {
27321
- return x.map((e) => forceListOfStrings(e).join(","));
27322
- }
27323
- if (typeof x === "object" && x !== null) {
27324
- const ret = [];
27325
- for (const [key, value] of Object.entries(x)) {
27326
- ret.push(...forceListOfStrings(value).map((s) => `${key}:${s}`));
27278
+ function flatMap(xs, f) {
27279
+ const ret = new Array();
27280
+ for (const x of xs) {
27281
+ ret.push(...f(x));
27282
+ }
27283
+ return ret;
27327
27284
  }
27328
- return ret;
27329
- }
27330
- return [`${x}`];
27331
- }
27332
- function renderCondition(condition) {
27333
- if (!condition || Object.keys(condition).length === 0) {
27334
- return "";
27335
27285
  }
27336
- const jsonRepresentation = JSON.stringify(condition, void 0, 2);
27337
- const lines = jsonRepresentation.split("\n");
27338
- return lines.slice(1, lines.length - 1).map((s) => s.slice(2)).join("\n");
27339
- }
27340
- var deepEqual3, Statement, Targets;
27341
- var init_statement = __esm({
27342
- "../cloudformation-diff/lib/iam/statement.ts"() {
27343
- "use strict";
27344
- init_maybe_parsed();
27345
- init_util2();
27346
- deepEqual3 = require_fast_deep_equal();
27347
- Statement = class {
27286
+ });
27287
+
27288
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/iam/statement.js
27289
+ var require_statement = __commonJS({
27290
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/iam/statement.js"(exports2) {
27291
+ "use strict";
27292
+ Object.defineProperty(exports2, "__esModule", { value: true });
27293
+ exports2.Effect = exports2.Targets = exports2.Statement = void 0;
27294
+ exports2.parseStatements = parseStatements;
27295
+ exports2.parseLambdaPermission = parseLambdaPermission;
27296
+ exports2.renderCondition = renderCondition;
27297
+ var maybe_parsed_1 = require_maybe_parsed();
27298
+ var util_1 = require_util3();
27299
+ var deepEqual = require_fast_deep_equal();
27300
+ var Statement = class {
27348
27301
  constructor(statement) {
27349
27302
  if (typeof statement === "string") {
27350
27303
  this.sid = void 0;
27351
- this.effect = "Unknown" /* Unknown */;
27304
+ this.effect = Effect.Unknown;
27352
27305
  this.resources = new Targets({}, "", "");
27353
27306
  this.actions = new Targets({}, "", "");
27354
27307
  this.principals = new Targets({}, "", "");
@@ -27368,7 +27321,7 @@ var init_statement = __esm({
27368
27321
  * Whether this statement is equal to the other statement
27369
27322
  */
27370
27323
  equal(other) {
27371
- return this.sid === other.sid && this.effect === other.effect && this.serializedIntrinsic === other.serializedIntrinsic && this.resources.equal(other.resources) && this.actions.equal(other.actions) && this.principals.equal(other.principals) && deepEqual3(this.condition, other.condition);
27324
+ return this.sid === other.sid && this.effect === other.effect && this.serializedIntrinsic === other.serializedIntrinsic && this.resources.equal(other.resources) && this.actions.equal(other.actions) && this.principals.equal(other.principals) && deepEqual(this.condition, other.condition);
27372
27325
  }
27373
27326
  render() {
27374
27327
  return this.serializedIntrinsic ? {
@@ -27393,7 +27346,7 @@ var init_statement = __esm({
27393
27346
  * @internal
27394
27347
  */
27395
27348
  _toJson() {
27396
- return this.serializedIntrinsic ? mkUnparseable(this.serializedIntrinsic) : mkParsed(deepRemoveUndefined({
27349
+ return this.serializedIntrinsic ? (0, maybe_parsed_1.mkUnparseable)(this.serializedIntrinsic) : (0, maybe_parsed_1.mkParsed)((0, util_1.deepRemoveUndefined)({
27397
27350
  sid: this.sid,
27398
27351
  effect: this.effect,
27399
27352
  resources: this.resources._toJson(),
@@ -27410,10 +27363,55 @@ var init_statement = __esm({
27410
27363
  */
27411
27364
  get isNegativeStatement() {
27412
27365
  const notTarget = this.actions.not || this.principals.not || this.resources.not;
27413
- return this.effect === "Allow" /* Allow */ ? notTarget : !notTarget;
27366
+ return this.effect === Effect.Allow ? notTarget : !notTarget;
27414
27367
  }
27415
27368
  };
27416
- Targets = class {
27369
+ exports2.Statement = Statement;
27370
+ function parseStatements(x) {
27371
+ if (x === void 0) {
27372
+ x = [];
27373
+ }
27374
+ if (!Array.isArray(x)) {
27375
+ x = [x];
27376
+ }
27377
+ return x.map((s) => new Statement(s));
27378
+ }
27379
+ function parseLambdaPermission(x) {
27380
+ const statement = {
27381
+ Effect: "Allow",
27382
+ Action: x.Action,
27383
+ Resource: x.FunctionName
27384
+ };
27385
+ if (x.Principal !== void 0) {
27386
+ if (x.Principal === "*") {
27387
+ statement.Principal = "*";
27388
+ } else if (/^\d{12}$/.test(x.Principal)) {
27389
+ statement.Principal = { AWS: `arn:aws:iam::${x.Principal}:root` };
27390
+ } else {
27391
+ statement.Principal = { Service: x.Principal };
27392
+ }
27393
+ }
27394
+ if (x.SourceArn !== void 0) {
27395
+ if (statement.Condition === void 0) {
27396
+ statement.Condition = {};
27397
+ }
27398
+ statement.Condition.ArnLike = { "AWS:SourceArn": x.SourceArn };
27399
+ }
27400
+ if (x.SourceAccount !== void 0) {
27401
+ if (statement.Condition === void 0) {
27402
+ statement.Condition = {};
27403
+ }
27404
+ statement.Condition.StringEquals = { "AWS:SourceAccount": x.SourceAccount };
27405
+ }
27406
+ if (x.EventSourceToken !== void 0) {
27407
+ if (statement.Condition === void 0) {
27408
+ statement.Condition = {};
27409
+ }
27410
+ statement.Condition.StringEquals = { "lambda:EventSourceToken": x.EventSourceToken };
27411
+ }
27412
+ return new Statement(statement);
27413
+ }
27414
+ var Targets = class {
27417
27415
  constructor(statement, positiveKey, negativeKey) {
27418
27416
  if (negativeKey in statement) {
27419
27417
  this.values = forceListOfStrings(statement[negativeKey]);
@@ -27431,7 +27429,7 @@ var init_statement = __esm({
27431
27429
  * Whether this set of targets is equal to the other set of targets
27432
27430
  */
27433
27431
  equal(other) {
27434
- return this.not === other.not && deepEqual3(this.values.sort(), other.values.sort());
27432
+ return this.not === other.not && deepEqual(this.values.sort(), other.values.sort());
27435
27433
  }
27436
27434
  /**
27437
27435
  * If the current value set is empty, put this in it
@@ -27468,21 +27466,59 @@ var init_statement = __esm({
27468
27466
  return { not: this.not, values: this.values };
27469
27467
  }
27470
27468
  };
27469
+ exports2.Targets = Targets;
27470
+ var Effect;
27471
+ (function(Effect2) {
27472
+ Effect2["Unknown"] = "Unknown";
27473
+ Effect2["Allow"] = "Allow";
27474
+ Effect2["Deny"] = "Deny";
27475
+ })(Effect || (exports2.Effect = Effect = {}));
27476
+ function expectString(x) {
27477
+ return typeof x === "string" ? x : void 0;
27478
+ }
27479
+ function expectEffect(x) {
27480
+ if (x === Effect.Allow || x === Effect.Deny) {
27481
+ return x;
27482
+ }
27483
+ return Effect.Unknown;
27484
+ }
27485
+ function forceListOfStrings(x) {
27486
+ if (typeof x === "string") {
27487
+ return [x];
27488
+ }
27489
+ if (typeof x === "undefined" || x === null) {
27490
+ return [];
27491
+ }
27492
+ if (Array.isArray(x)) {
27493
+ return x.map((e) => forceListOfStrings(e).join(","));
27494
+ }
27495
+ if (typeof x === "object" && x !== null) {
27496
+ const ret = [];
27497
+ for (const [key, value] of Object.entries(x)) {
27498
+ ret.push(...forceListOfStrings(value).map((s) => `${key}:${s}`));
27499
+ }
27500
+ return ret;
27501
+ }
27502
+ return [`${x}`];
27503
+ }
27504
+ function renderCondition(condition) {
27505
+ if (!condition || Object.keys(condition).length === 0) {
27506
+ return "";
27507
+ }
27508
+ const jsonRepresentation = JSON.stringify(condition, void 0, 2);
27509
+ const lines = jsonRepresentation.split("\n");
27510
+ return lines.slice(1, lines.length - 1).map((s) => s.slice(2)).join("\n");
27511
+ }
27471
27512
  }
27472
27513
  });
27473
27514
 
27474
- // ../cloudformation-diff/lib/diffable.ts
27475
- function contains(element, xs) {
27476
- return xs.some((x) => x.equal(element));
27477
- }
27478
- function difference(collection, elements) {
27479
- return collection.filter((x) => !contains(x, elements));
27480
- }
27481
- var DiffableCollection;
27482
- var init_diffable = __esm({
27483
- "../cloudformation-diff/lib/diffable.ts"() {
27515
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/diffable.js
27516
+ var require_diffable = __commonJS({
27517
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/diffable.js"(exports2) {
27484
27518
  "use strict";
27485
- DiffableCollection = class {
27519
+ Object.defineProperty(exports2, "__esModule", { value: true });
27520
+ exports2.DiffableCollection = void 0;
27521
+ var DiffableCollection = class {
27486
27522
  constructor() {
27487
27523
  this.additions = [];
27488
27524
  this.removals = [];
@@ -27509,101 +27545,100 @@ var init_diffable = __esm({
27509
27545
  return this.removals.length > 0;
27510
27546
  }
27511
27547
  };
27548
+ exports2.DiffableCollection = DiffableCollection;
27549
+ function contains(element, xs) {
27550
+ return xs.some((x) => x.equal(element));
27551
+ }
27552
+ function difference(collection, elements) {
27553
+ return collection.filter((x) => !contains(x, elements));
27554
+ }
27512
27555
  }
27513
27556
  });
27514
27557
 
27515
- // ../cloudformation-diff/lib/render-intrinsics.ts
27516
- function renderIntrinsics(x) {
27517
- if (Array.isArray(x)) {
27518
- return x.filter((el) => !isNoValue(el)).map(renderIntrinsics);
27519
- }
27520
- if (isNoValue(x)) {
27521
- return void 0;
27522
- }
27523
- const intrinsic = getIntrinsic(x);
27524
- if (intrinsic) {
27525
- if (intrinsic.fn === "Ref") {
27526
- return "${" + intrinsic.args + "}";
27558
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/render-intrinsics.js
27559
+ var require_render_intrinsics = __commonJS({
27560
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/render-intrinsics.js"(exports2) {
27561
+ "use strict";
27562
+ Object.defineProperty(exports2, "__esModule", { value: true });
27563
+ exports2.renderIntrinsics = renderIntrinsics;
27564
+ function renderIntrinsics(x) {
27565
+ if (Array.isArray(x)) {
27566
+ return x.filter((el) => !isNoValue(el)).map(renderIntrinsics);
27567
+ }
27568
+ if (isNoValue(x)) {
27569
+ return void 0;
27570
+ }
27571
+ const intrinsic = getIntrinsic(x);
27572
+ if (intrinsic) {
27573
+ if (intrinsic.fn === "Ref") {
27574
+ return "${" + intrinsic.args + "}";
27575
+ }
27576
+ if (intrinsic.fn === "Fn::GetAtt") {
27577
+ return "${" + intrinsic.args[0] + "." + intrinsic.args[1] + "}";
27578
+ }
27579
+ if (intrinsic.fn === "Fn::Join") {
27580
+ return unCloudFormationFnJoin(intrinsic.args[0], intrinsic.args[1]);
27581
+ }
27582
+ return stringifyIntrinsic(intrinsic.fn, intrinsic.args);
27583
+ }
27584
+ if (typeof x === "object" && x !== null) {
27585
+ const ret = {};
27586
+ for (const [key, value] of Object.entries(x)) {
27587
+ if (!isNoValue(value)) {
27588
+ ret[key] = renderIntrinsics(value);
27589
+ }
27590
+ }
27591
+ return ret;
27592
+ }
27593
+ return x;
27527
27594
  }
27528
- if (intrinsic.fn === "Fn::GetAtt") {
27529
- return "${" + intrinsic.args[0] + "." + intrinsic.args[1] + "}";
27595
+ function unCloudFormationFnJoin(separator, args) {
27596
+ if (Array.isArray(args)) {
27597
+ return args.filter((el) => !isNoValue(el)).map(renderIntrinsics).join(separator);
27598
+ }
27599
+ return stringifyIntrinsic("Fn::Join", [separator, args]);
27530
27600
  }
27531
- if (intrinsic.fn === "Fn::Join") {
27532
- return unCloudFormationFnJoin(intrinsic.args[0], intrinsic.args[1]);
27601
+ function stringifyIntrinsic(fn, args) {
27602
+ return JSON.stringify({ [fn]: renderIntrinsics(args) });
27533
27603
  }
27534
- return stringifyIntrinsic(intrinsic.fn, intrinsic.args);
27535
- }
27536
- if (typeof x === "object" && x !== null) {
27537
- const ret = {};
27538
- for (const [key, value] of Object.entries(x)) {
27539
- if (!isNoValue(value)) {
27540
- ret[key] = renderIntrinsics(value);
27604
+ function getIntrinsic(x) {
27605
+ if (x === void 0 || x === null || Array.isArray(x)) {
27606
+ return void 0;
27541
27607
  }
27608
+ if (typeof x !== "object") {
27609
+ return void 0;
27610
+ }
27611
+ const keys = Object.keys(x);
27612
+ return keys.length === 1 && (keys[0] === "Ref" || keys[0].startsWith("Fn::")) ? { fn: keys[0], args: x[keys[0]] } : void 0;
27613
+ }
27614
+ function isNoValue(x) {
27615
+ const int = getIntrinsic(x);
27616
+ return int && int.fn === "Ref" && int.args === "AWS::NoValue";
27542
27617
  }
27543
- return ret;
27544
- }
27545
- return x;
27546
- }
27547
- function unCloudFormationFnJoin(separator, args) {
27548
- if (Array.isArray(args)) {
27549
- return args.filter((el) => !isNoValue(el)).map(renderIntrinsics).join(separator);
27550
- }
27551
- return stringifyIntrinsic("Fn::Join", [separator, args]);
27552
- }
27553
- function stringifyIntrinsic(fn, args) {
27554
- return JSON.stringify({ [fn]: renderIntrinsics(args) });
27555
- }
27556
- function getIntrinsic(x) {
27557
- if (x === void 0 || x === null || Array.isArray(x)) {
27558
- return void 0;
27559
- }
27560
- if (typeof x !== "object") {
27561
- return void 0;
27562
- }
27563
- const keys = Object.keys(x);
27564
- return keys.length === 1 && (keys[0] === "Ref" || keys[0].startsWith("Fn::")) ? { fn: keys[0], args: x[keys[0]] } : void 0;
27565
- }
27566
- function isNoValue(x) {
27567
- const int = getIntrinsic(x);
27568
- return int && int.fn === "Ref" && int.args === "AWS::NoValue";
27569
- }
27570
- var init_render_intrinsics = __esm({
27571
- "../cloudformation-diff/lib/render-intrinsics.ts"() {
27572
- "use strict";
27573
27618
  }
27574
27619
  });
27575
27620
 
27576
- // ../cloudformation-diff/lib/iam/iam-changes.ts
27577
- function defaultPrincipal(principal, statements) {
27578
- statements.forEach((s) => s.principals.replaceEmpty(principal));
27579
- statements.forEach((s) => s.principals.replaceStar(principal));
27580
- return statements;
27581
- }
27582
- function defaultResource(resource, statements) {
27583
- statements.forEach((s) => s.resources.replaceEmpty(resource));
27584
- statements.forEach((s) => s.resources.replaceStar(resource));
27585
- return statements;
27586
- }
27587
- var import_service_spec_types, chalk3, IamChanges;
27588
- var init_iam_changes = __esm({
27589
- "../cloudformation-diff/lib/iam/iam-changes.ts"() {
27590
- "use strict";
27591
- import_service_spec_types = __toESM(require_lib9());
27592
- chalk3 = __toESM(require_source());
27593
- init_iam_identity_center();
27594
- init_managed_policy();
27595
- init_statement();
27596
- init_diffable();
27597
- init_render_intrinsics();
27598
- init_util2();
27599
- IamChanges = class {
27621
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.js
27622
+ var require_iam_changes = __commonJS({
27623
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.js"(exports2) {
27624
+ "use strict";
27625
+ Object.defineProperty(exports2, "__esModule", { value: true });
27626
+ exports2.IamChanges = void 0;
27627
+ var service_spec_types_1 = require_lib9();
27628
+ var chalk3 = require_source();
27629
+ var iam_identity_center_1 = require_iam_identity_center();
27630
+ var managed_policy_1 = require_managed_policy();
27631
+ var statement_1 = require_statement();
27632
+ var diffable_1 = require_diffable();
27633
+ var render_intrinsics_1 = require_render_intrinsics();
27634
+ var util_1 = require_util3();
27635
+ var IamChanges = class {
27600
27636
  constructor(props) {
27601
- // each entry in a DiffableCollection is used to generate a single row of the security changes table that is presented for cdk diff and cdk deploy.
27602
- this.statements = new DiffableCollection();
27603
- this.managedPolicies = new DiffableCollection();
27604
- this.ssoPermissionSets = new DiffableCollection();
27605
- this.ssoAssignments = new DiffableCollection();
27606
- this.ssoInstanceACAConfigs = new DiffableCollection();
27637
+ this.statements = new diffable_1.DiffableCollection();
27638
+ this.managedPolicies = new diffable_1.DiffableCollection();
27639
+ this.ssoPermissionSets = new diffable_1.DiffableCollection();
27640
+ this.ssoAssignments = new diffable_1.DiffableCollection();
27641
+ this.ssoInstanceACAConfigs = new diffable_1.DiffableCollection();
27607
27642
  for (const propertyChange of props.propertyChanges) {
27608
27643
  this.readPropertyChange(propertyChange);
27609
27644
  }
@@ -27656,7 +27691,7 @@ var init_iam_changes = __esm({
27656
27691
  renderedStatement.condition
27657
27692
  ].map((s) => chalk3.red(s)));
27658
27693
  }
27659
- ret.sort(makeComparator((row) => [row[1]]));
27694
+ ret.sort((0, util_1.makeComparator)((row) => [row[1]]));
27660
27695
  ret.splice(0, 0, header);
27661
27696
  return ret;
27662
27697
  }
@@ -27677,7 +27712,7 @@ var init_iam_changes = __esm({
27677
27712
  att.managedPolicyArn
27678
27713
  ].map((s) => chalk3.red(s)));
27679
27714
  }
27680
- ret.sort(makeComparator((row) => [row[1]]));
27715
+ ret.sort((0, util_1.makeComparator)((row) => [row[1]]));
27681
27716
  ret.splice(0, 0, header);
27682
27717
  return ret;
27683
27718
  }
@@ -27708,7 +27743,7 @@ var init_iam_changes = __esm({
27708
27743
  att.targetType || ""
27709
27744
  ].map((s) => chalk3.red(s)));
27710
27745
  }
27711
- ret.sort(makeComparator((row) => [row[1]]));
27746
+ ret.sort((0, util_1.makeComparator)((row) => [row[1]]));
27712
27747
  ret.splice(0, 0, header);
27713
27748
  return ret;
27714
27749
  }
@@ -27736,7 +27771,7 @@ var init_iam_changes = __esm({
27736
27771
  ((_b = att.accessControlAttributes) == null ? void 0 : _b.map(formatAccessControlAttribute).join("\n")) || ""
27737
27772
  ].map((s) => chalk3.red(s)));
27738
27773
  }
27739
- ret.sort(makeComparator((row) => [row[1]]));
27774
+ ret.sort((0, util_1.makeComparator)((row) => [row[1]]));
27740
27775
  ret.splice(0, 0, header);
27741
27776
  return ret;
27742
27777
  }
@@ -27778,7 +27813,7 @@ var init_iam_changes = __esm({
27778
27813
  ((_b = att.ssoCustomerManagedPolicyReferences) == null ? void 0 : _b.map(formatManagedPolicyRef).join("\n")) || ""
27779
27814
  ].map((s) => chalk3.red(s)));
27780
27815
  }
27781
- ret.sort(makeComparator((row) => [row[1]]));
27816
+ ret.sort((0, util_1.makeComparator)((row) => [row[1]]));
27782
27817
  ret.splice(0, 0, header);
27783
27818
  return ret;
27784
27819
  }
@@ -27789,24 +27824,24 @@ var init_iam_changes = __esm({
27789
27824
  * @internal
27790
27825
  */
27791
27826
  _toJson() {
27792
- return deepRemoveUndefined({
27793
- statementAdditions: dropIfEmpty(this.statements.additions.map((s) => s._toJson())),
27794
- statementRemovals: dropIfEmpty(this.statements.removals.map((s) => s._toJson())),
27795
- managedPolicyAdditions: dropIfEmpty(this.managedPolicies.additions.map((s) => s._toJson())),
27796
- managedPolicyRemovals: dropIfEmpty(this.managedPolicies.removals.map((s) => s._toJson()))
27827
+ return (0, util_1.deepRemoveUndefined)({
27828
+ statementAdditions: (0, util_1.dropIfEmpty)(this.statements.additions.map((s) => s._toJson())),
27829
+ statementRemovals: (0, util_1.dropIfEmpty)(this.statements.removals.map((s) => s._toJson())),
27830
+ managedPolicyAdditions: (0, util_1.dropIfEmpty)(this.managedPolicies.additions.map((s) => s._toJson())),
27831
+ managedPolicyRemovals: (0, util_1.dropIfEmpty)(this.managedPolicies.removals.map((s) => s._toJson()))
27797
27832
  });
27798
27833
  }
27799
27834
  readPropertyChange(propertyChange) {
27800
27835
  switch (propertyChange.scrutinyType) {
27801
- case import_service_spec_types.PropertyScrutinyType.InlineIdentityPolicies:
27836
+ case service_spec_types_1.PropertyScrutinyType.InlineIdentityPolicies:
27802
27837
  this.statements.addOld(...this.readIdentityPolicies(propertyChange.oldValue, propertyChange.resourceLogicalId));
27803
27838
  this.statements.addNew(...this.readIdentityPolicies(propertyChange.newValue, propertyChange.resourceLogicalId));
27804
27839
  break;
27805
- case import_service_spec_types.PropertyScrutinyType.InlineResourcePolicy:
27840
+ case service_spec_types_1.PropertyScrutinyType.InlineResourcePolicy:
27806
27841
  this.statements.addOld(...this.readResourceStatements(propertyChange.oldValue, propertyChange.resourceLogicalId));
27807
27842
  this.statements.addNew(...this.readResourceStatements(propertyChange.newValue, propertyChange.resourceLogicalId));
27808
27843
  break;
27809
- case import_service_spec_types.PropertyScrutinyType.ManagedPolicies:
27844
+ case service_spec_types_1.PropertyScrutinyType.ManagedPolicies:
27810
27845
  this.managedPolicies.addOld(...this.readManagedPolicies(propertyChange.oldValue, propertyChange.resourceLogicalId));
27811
27846
  this.managedPolicies.addNew(...this.readManagedPolicies(propertyChange.newValue, propertyChange.resourceLogicalId));
27812
27847
  break;
@@ -27814,27 +27849,27 @@ var init_iam_changes = __esm({
27814
27849
  }
27815
27850
  readResourceChange(resourceChange) {
27816
27851
  switch (resourceChange.scrutinyType) {
27817
- case import_service_spec_types.ResourceScrutinyType.IdentityPolicyResource:
27852
+ case service_spec_types_1.ResourceScrutinyType.IdentityPolicyResource:
27818
27853
  this.statements.addOld(...this.readIdentityPolicyResource(resourceChange.oldProperties));
27819
27854
  this.statements.addNew(...this.readIdentityPolicyResource(resourceChange.newProperties));
27820
27855
  break;
27821
- case import_service_spec_types.ResourceScrutinyType.ResourcePolicyResource:
27856
+ case service_spec_types_1.ResourceScrutinyType.ResourcePolicyResource:
27822
27857
  this.statements.addOld(...this.readResourcePolicyResource(resourceChange.oldProperties));
27823
27858
  this.statements.addNew(...this.readResourcePolicyResource(resourceChange.newProperties));
27824
27859
  break;
27825
- case import_service_spec_types.ResourceScrutinyType.LambdaPermission:
27860
+ case service_spec_types_1.ResourceScrutinyType.LambdaPermission:
27826
27861
  this.statements.addOld(...this.readLambdaStatements(resourceChange.oldProperties));
27827
27862
  this.statements.addNew(...this.readLambdaStatements(resourceChange.newProperties));
27828
27863
  break;
27829
- case import_service_spec_types.ResourceScrutinyType.SsoPermissionSet:
27864
+ case service_spec_types_1.ResourceScrutinyType.SsoPermissionSet:
27830
27865
  this.ssoPermissionSets.addOld(...this.readSsoPermissionSet(resourceChange.oldProperties, resourceChange.resourceLogicalId));
27831
27866
  this.ssoPermissionSets.addNew(...this.readSsoPermissionSet(resourceChange.newProperties, resourceChange.resourceLogicalId));
27832
27867
  break;
27833
- case import_service_spec_types.ResourceScrutinyType.SsoAssignmentResource:
27868
+ case service_spec_types_1.ResourceScrutinyType.SsoAssignmentResource:
27834
27869
  this.ssoAssignments.addOld(...this.readSsoAssignments(resourceChange.oldProperties, resourceChange.resourceLogicalId));
27835
27870
  this.ssoAssignments.addNew(...this.readSsoAssignments(resourceChange.newProperties, resourceChange.resourceLogicalId));
27836
27871
  break;
27837
- case import_service_spec_types.ResourceScrutinyType.SsoInstanceACAConfigResource:
27872
+ case service_spec_types_1.ResourceScrutinyType.SsoInstanceACAConfigResource:
27838
27873
  this.ssoInstanceACAConfigs.addOld(...this.readSsoInstanceACAConfigs(resourceChange.oldProperties, resourceChange.resourceLogicalId));
27839
27874
  this.ssoInstanceACAConfigs.addNew(...this.readSsoInstanceACAConfigs(resourceChange.newProperties, resourceChange.resourceLogicalId));
27840
27875
  break;
@@ -27848,10 +27883,10 @@ var init_iam_changes = __esm({
27848
27883
  return [];
27849
27884
  }
27850
27885
  const appliesToPrincipal = "AWS:${" + logicalId + "}";
27851
- return flatMap(policies, (policy) => {
27886
+ return (0, util_1.flatMap)(policies, (policy) => {
27852
27887
  var _a;
27853
27888
  const unparsedStatement = ((_a = policy.PolicyDocument) == null ? void 0 : _a.Statement) ? policy.PolicyDocument.Statement : policy;
27854
- return defaultPrincipal(appliesToPrincipal, parseStatements(renderIntrinsics(unparsedStatement)));
27889
+ return defaultPrincipal(appliesToPrincipal, (0, statement_1.parseStatements)((0, render_intrinsics_1.renderIntrinsics)(unparsedStatement)));
27855
27890
  });
27856
27891
  }
27857
27892
  /**
@@ -27861,19 +27896,19 @@ var init_iam_changes = __esm({
27861
27896
  if (properties === void 0) {
27862
27897
  return [];
27863
27898
  }
27864
- properties = renderIntrinsics(properties);
27899
+ properties = (0, render_intrinsics_1.renderIntrinsics)(properties);
27865
27900
  const principals = (properties.Groups || []).concat(properties.Users || []).concat(properties.Roles || []);
27866
- return flatMap(principals, (principal) => {
27901
+ return (0, util_1.flatMap)(principals, (principal) => {
27867
27902
  const ref = "AWS:" + principal;
27868
- return defaultPrincipal(ref, parseStatements(properties.PolicyDocument.Statement));
27903
+ return defaultPrincipal(ref, (0, statement_1.parseStatements)(properties.PolicyDocument.Statement));
27869
27904
  });
27870
27905
  }
27871
27906
  readSsoInstanceACAConfigs(properties, logicalId) {
27872
27907
  if (properties === void 0) {
27873
27908
  return [];
27874
27909
  }
27875
- properties = renderIntrinsics(properties);
27876
- return [new SsoInstanceACAConfig({
27910
+ properties = (0, render_intrinsics_1.renderIntrinsics)(properties);
27911
+ return [new iam_identity_center_1.SsoInstanceACAConfig({
27877
27912
  cfnLogicalId: "${" + logicalId + "}",
27878
27913
  ssoInstanceArn: properties.InstanceArn,
27879
27914
  accessControlAttributes: properties.AccessControlAttributes
@@ -27883,8 +27918,8 @@ var init_iam_changes = __esm({
27883
27918
  if (properties === void 0) {
27884
27919
  return [];
27885
27920
  }
27886
- properties = renderIntrinsics(properties);
27887
- return [new SsoAssignment({
27921
+ properties = (0, render_intrinsics_1.renderIntrinsics)(properties);
27922
+ return [new iam_identity_center_1.SsoAssignment({
27888
27923
  cfnLogicalId: "${" + logicalId + "}",
27889
27924
  ssoInstanceArn: properties.InstanceArn,
27890
27925
  permissionSetArn: properties.PermissionSetArn,
@@ -27898,8 +27933,8 @@ var init_iam_changes = __esm({
27898
27933
  if (properties === void 0) {
27899
27934
  return [];
27900
27935
  }
27901
- properties = renderIntrinsics(properties);
27902
- return [new SsoPermissionSet({
27936
+ properties = (0, render_intrinsics_1.renderIntrinsics)(properties);
27937
+ return [new iam_identity_center_1.SsoPermissionSet({
27903
27938
  cfnLogicalId: "${" + logicalId + "}",
27904
27939
  name: properties.Name,
27905
27940
  ssoInstanceArn: properties.InstanceArn,
@@ -27912,7 +27947,7 @@ var init_iam_changes = __esm({
27912
27947
  return [];
27913
27948
  }
27914
27949
  const appliesToResource = "${" + logicalId + ".Arn}";
27915
- return defaultResource(appliesToResource, parseStatements(renderIntrinsics(policy.Statement)));
27950
+ return defaultResource(appliesToResource, (0, statement_1.parseStatements)((0, render_intrinsics_1.renderIntrinsics)(policy.Statement)));
27916
27951
  }
27917
27952
  /**
27918
27953
  * Parse an AWS::*::{Bucket,Topic,Queue}policy
@@ -27921,15 +27956,15 @@ var init_iam_changes = __esm({
27921
27956
  if (properties === void 0) {
27922
27957
  return [];
27923
27958
  }
27924
- properties = renderIntrinsics(properties);
27959
+ properties = (0, render_intrinsics_1.renderIntrinsics)(properties);
27925
27960
  const policyKeys = Object.keys(properties).filter((key) => key.indexOf("Policy") > -1);
27926
27961
  const resourceKeys = Object.keys(properties).filter((key) => !policyKeys.includes(key) && !key.endsWith("Name"));
27927
27962
  let resources = resourceKeys.length === 1 ? properties[resourceKeys[0]] : ["???"];
27928
27963
  if (!Array.isArray(resources)) {
27929
27964
  resources = [resources];
27930
27965
  }
27931
- return flatMap(resources, (resource) => {
27932
- return defaultResource(resource, parseStatements(properties[policyKeys[0]].Statement));
27966
+ return (0, util_1.flatMap)(resources, (resource) => {
27967
+ return defaultResource(resource, (0, statement_1.parseStatements)(properties[policyKeys[0]].Statement));
27933
27968
  });
27934
27969
  }
27935
27970
  readManagedPolicies(policyArns, logicalId) {
@@ -27937,87 +27972,56 @@ var init_iam_changes = __esm({
27937
27972
  return [];
27938
27973
  }
27939
27974
  const rep = "${" + logicalId + "}";
27940
- return ManagedPolicyAttachment.parseManagedPolicies(rep, renderIntrinsics(policyArns));
27975
+ return managed_policy_1.ManagedPolicyAttachment.parseManagedPolicies(rep, (0, render_intrinsics_1.renderIntrinsics)(policyArns));
27941
27976
  }
27942
27977
  readLambdaStatements(properties) {
27943
27978
  if (!properties) {
27944
27979
  return [];
27945
27980
  }
27946
- return [parseLambdaPermission(renderIntrinsics(properties))];
27981
+ return [(0, statement_1.parseLambdaPermission)((0, render_intrinsics_1.renderIntrinsics)(properties))];
27947
27982
  }
27948
27983
  };
27984
+ exports2.IamChanges = IamChanges;
27949
27985
  IamChanges.IamPropertyScrutinies = [
27950
- import_service_spec_types.PropertyScrutinyType.InlineIdentityPolicies,
27951
- import_service_spec_types.PropertyScrutinyType.InlineResourcePolicy,
27952
- import_service_spec_types.PropertyScrutinyType.ManagedPolicies
27986
+ service_spec_types_1.PropertyScrutinyType.InlineIdentityPolicies,
27987
+ service_spec_types_1.PropertyScrutinyType.InlineResourcePolicy,
27988
+ service_spec_types_1.PropertyScrutinyType.ManagedPolicies
27953
27989
  ];
27954
27990
  IamChanges.IamResourceScrutinies = [
27955
- import_service_spec_types.ResourceScrutinyType.ResourcePolicyResource,
27956
- import_service_spec_types.ResourceScrutinyType.IdentityPolicyResource,
27957
- import_service_spec_types.ResourceScrutinyType.LambdaPermission,
27958
- import_service_spec_types.ResourceScrutinyType.SsoAssignmentResource,
27959
- import_service_spec_types.ResourceScrutinyType.SsoInstanceACAConfigResource,
27960
- import_service_spec_types.ResourceScrutinyType.SsoPermissionSet
27991
+ service_spec_types_1.ResourceScrutinyType.ResourcePolicyResource,
27992
+ service_spec_types_1.ResourceScrutinyType.IdentityPolicyResource,
27993
+ service_spec_types_1.ResourceScrutinyType.LambdaPermission,
27994
+ service_spec_types_1.ResourceScrutinyType.SsoAssignmentResource,
27995
+ service_spec_types_1.ResourceScrutinyType.SsoInstanceACAConfigResource,
27996
+ service_spec_types_1.ResourceScrutinyType.SsoPermissionSet
27961
27997
  ];
27998
+ function defaultPrincipal(principal, statements) {
27999
+ statements.forEach((s) => s.principals.replaceEmpty(principal));
28000
+ statements.forEach((s) => s.principals.replaceStar(principal));
28001
+ return statements;
28002
+ }
28003
+ function defaultResource(resource, statements) {
28004
+ statements.forEach((s) => s.resources.replaceEmpty(resource));
28005
+ statements.forEach((s) => s.resources.replaceStar(resource));
28006
+ return statements;
28007
+ }
27962
28008
  }
27963
28009
  });
27964
28010
 
27965
- // ../cloudformation-diff/lib/network/security-group-rule.ts
27966
- function peerEqual(a, b) {
27967
- if (a === void 0 !== (b === void 0)) {
27968
- return false;
27969
- }
27970
- if (a === void 0) {
27971
- return true;
27972
- }
27973
- if (a.kind !== b.kind) {
27974
- return false;
27975
- }
27976
- switch (a.kind) {
27977
- case "cidr-ip":
27978
- return a.ip === b.ip;
27979
- case "security-group":
27980
- return a.securityGroupId === b.securityGroupId;
27981
- case "prefix-list":
27982
- return a.prefixListId === b.prefixListId;
27983
- }
27984
- }
27985
- function findFirst(obj, keys, fn) {
27986
- for (const key of keys) {
27987
- try {
27988
- if (key in obj) {
27989
- return fn(obj[key]);
27990
- }
27991
- } catch (e) {
27992
- debugger;
27993
- }
27994
- }
27995
- return void 0;
27996
- }
27997
- var SecurityGroupRule;
27998
- var init_security_group_rule = __esm({
27999
- "../cloudformation-diff/lib/network/security-group-rule.ts"() {
28011
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/network/security-group-rule.js
28012
+ var require_security_group_rule = __commonJS({
28013
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/network/security-group-rule.js"(exports2) {
28000
28014
  "use strict";
28001
- SecurityGroupRule = class {
28015
+ Object.defineProperty(exports2, "__esModule", { value: true });
28016
+ exports2.SecurityGroupRule = void 0;
28017
+ var SecurityGroupRule = class {
28002
28018
  constructor(ruleObject, groupRef) {
28003
28019
  var _a;
28004
28020
  this.ipProtocol = ((_a = ruleObject.IpProtocol) == null ? void 0 : _a.toString()) || "*unknown*";
28005
28021
  this.fromPort = ruleObject.FromPort;
28006
28022
  this.toPort = ruleObject.ToPort;
28007
28023
  this.groupId = ruleObject.GroupId || groupRef || "*unknown*";
28008
- this.peer = findFirst(
28009
- ruleObject,
28010
- ["CidrIp", "CidrIpv6"],
28011
- (ip) => ({ kind: "cidr-ip", ip })
28012
- ) || findFirst(
28013
- ruleObject,
28014
- ["DestinationSecurityGroupId", "SourceSecurityGroupId"],
28015
- (securityGroupId) => ({ kind: "security-group", securityGroupId })
28016
- ) || findFirst(
28017
- ruleObject,
28018
- ["DestinationPrefixListId", "SourcePrefixListId"],
28019
- (prefixListId) => ({ kind: "prefix-list", prefixListId })
28020
- );
28024
+ this.peer = findFirst(ruleObject, ["CidrIp", "CidrIpv6"], (ip) => ({ kind: "cidr-ip", ip })) || findFirst(ruleObject, ["DestinationSecurityGroupId", "SourceSecurityGroupId"], (securityGroupId) => ({ kind: "security-group", securityGroupId })) || findFirst(ruleObject, ["DestinationPrefixListId", "SourcePrefixListId"], (prefixListId) => ({ kind: "prefix-list", prefixListId }));
28021
28025
  }
28022
28026
  equal(other) {
28023
28027
  return this.ipProtocol === other.ipProtocol && this.fromPort === other.fromPort && this.toPort === other.toPort && peerEqual(this.peer, other.peer);
@@ -28064,23 +28068,56 @@ var init_security_group_rule = __esm({
28064
28068
  };
28065
28069
  }
28066
28070
  };
28071
+ exports2.SecurityGroupRule = SecurityGroupRule;
28072
+ function peerEqual(a, b) {
28073
+ if (a === void 0 !== (b === void 0)) {
28074
+ return false;
28075
+ }
28076
+ if (a === void 0) {
28077
+ return true;
28078
+ }
28079
+ if (a.kind !== b.kind) {
28080
+ return false;
28081
+ }
28082
+ switch (a.kind) {
28083
+ case "cidr-ip":
28084
+ return a.ip === b.ip;
28085
+ case "security-group":
28086
+ return a.securityGroupId === b.securityGroupId;
28087
+ case "prefix-list":
28088
+ return a.prefixListId === b.prefixListId;
28089
+ }
28090
+ }
28091
+ function findFirst(obj, keys, fn) {
28092
+ for (const key of keys) {
28093
+ try {
28094
+ if (key in obj) {
28095
+ return fn(obj[key]);
28096
+ }
28097
+ } catch (e) {
28098
+ debugger;
28099
+ }
28100
+ }
28101
+ return void 0;
28102
+ }
28067
28103
  }
28068
28104
  });
28069
28105
 
28070
- // ../cloudformation-diff/lib/network/security-group-changes.ts
28071
- var chalk4, SecurityGroupChanges;
28072
- var init_security_group_changes = __esm({
28073
- "../cloudformation-diff/lib/network/security-group-changes.ts"() {
28106
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.js
28107
+ var require_security_group_changes = __commonJS({
28108
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.js"(exports2) {
28074
28109
  "use strict";
28075
- chalk4 = __toESM(require_source());
28076
- init_security_group_rule();
28077
- init_diffable();
28078
- init_render_intrinsics();
28079
- init_util2();
28080
- SecurityGroupChanges = class {
28110
+ Object.defineProperty(exports2, "__esModule", { value: true });
28111
+ exports2.SecurityGroupChanges = void 0;
28112
+ var chalk3 = require_source();
28113
+ var security_group_rule_1 = require_security_group_rule();
28114
+ var diffable_1 = require_diffable();
28115
+ var render_intrinsics_1 = require_render_intrinsics();
28116
+ var util_1 = require_util3();
28117
+ var SecurityGroupChanges = class {
28081
28118
  constructor(props) {
28082
- this.ingress = new DiffableCollection();
28083
- this.egress = new DiffableCollection();
28119
+ this.ingress = new diffable_1.DiffableCollection();
28120
+ this.egress = new diffable_1.DiffableCollection();
28084
28121
  for (const ingressProp of props.ingressRulePropertyChanges) {
28085
28122
  this.ingress.addOld(...this.readInlineRules(ingressProp.oldValue, ingressProp.resourceLogicalId));
28086
28123
  this.ingress.addNew(...this.readInlineRules(ingressProp.newValue, ingressProp.resourceLogicalId));
@@ -28117,21 +28154,21 @@ var init_security_group_changes = __esm({
28117
28154
  inOut,
28118
28155
  rule.describeProtocol(),
28119
28156
  rule.describePeer()
28120
- ].map((s) => plusMin === "+" ? chalk4.green(s) : chalk4.red(s));
28157
+ ].map((s) => plusMin === "+" ? chalk3.green(s) : chalk3.red(s));
28121
28158
  ret.push(...this.ingress.additions.map(renderRule("+", inWord)));
28122
28159
  ret.push(...this.egress.additions.map(renderRule("+", outWord)));
28123
28160
  ret.push(...this.ingress.removals.map(renderRule("-", inWord)));
28124
28161
  ret.push(...this.egress.removals.map(renderRule("-", outWord)));
28125
- ret.sort(makeComparator((row) => [row[1], row[2].indexOf(inWord) > -1 ? 0 : 1]));
28162
+ ret.sort((0, util_1.makeComparator)((row) => [row[1], row[2].indexOf(inWord) > -1 ? 0 : 1]));
28126
28163
  ret.splice(0, 0, header);
28127
28164
  return ret;
28128
28165
  }
28129
28166
  toJson() {
28130
- return deepRemoveUndefined({
28131
- ingressRuleAdditions: dropIfEmpty(this.ingress.additions.map((s) => s.toJson())),
28132
- ingressRuleRemovals: dropIfEmpty(this.ingress.removals.map((s) => s.toJson())),
28133
- egressRuleAdditions: dropIfEmpty(this.egress.additions.map((s) => s.toJson())),
28134
- egressRuleRemovals: dropIfEmpty(this.egress.removals.map((s) => s.toJson()))
28167
+ return (0, util_1.deepRemoveUndefined)({
28168
+ ingressRuleAdditions: (0, util_1.dropIfEmpty)(this.ingress.additions.map((s) => s.toJson())),
28169
+ ingressRuleRemovals: (0, util_1.dropIfEmpty)(this.ingress.removals.map((s) => s.toJson())),
28170
+ egressRuleAdditions: (0, util_1.dropIfEmpty)(this.egress.additions.map((s) => s.toJson())),
28171
+ egressRuleRemovals: (0, util_1.dropIfEmpty)(this.egress.removals.map((s) => s.toJson()))
28135
28172
  });
28136
28173
  }
28137
28174
  get rulesAdded() {
@@ -28143,59 +28180,34 @@ var init_security_group_changes = __esm({
28143
28180
  }
28144
28181
  const ref = "${" + logicalId + ".GroupId}";
28145
28182
  return rules.flatMap((r) => {
28146
- const rendered = renderIntrinsics(r);
28147
- return typeof rendered === "object" ? [new SecurityGroupRule(rendered, ref)] : [];
28183
+ const rendered = (0, render_intrinsics_1.renderIntrinsics)(r);
28184
+ return typeof rendered === "object" ? [new security_group_rule_1.SecurityGroupRule(rendered, ref)] : [];
28148
28185
  });
28149
28186
  }
28150
28187
  readRuleResource(resource) {
28151
28188
  if (!resource) {
28152
28189
  return [];
28153
28190
  }
28154
- return [new SecurityGroupRule(renderIntrinsics(resource))];
28191
+ return [new security_group_rule_1.SecurityGroupRule((0, render_intrinsics_1.renderIntrinsics)(resource))];
28155
28192
  }
28156
28193
  };
28194
+ exports2.SecurityGroupChanges = SecurityGroupChanges;
28157
28195
  }
28158
28196
  });
28159
28197
 
28160
- // ../cloudformation-diff/lib/diff/types.ts
28161
- function worstImpact(one, two) {
28162
- if (!two) {
28163
- return one;
28164
- }
28165
- const badness = {
28166
- ["NO_CHANGE" /* NO_CHANGE */]: 0,
28167
- ["WILL_IMPORT" /* WILL_IMPORT */]: 0,
28168
- ["WILL_UPDATE" /* WILL_UPDATE */]: 1,
28169
- ["WILL_CREATE" /* WILL_CREATE */]: 2,
28170
- ["WILL_ORPHAN" /* WILL_ORPHAN */]: 3,
28171
- ["MAY_REPLACE" /* MAY_REPLACE */]: 4,
28172
- ["WILL_REPLACE" /* WILL_REPLACE */]: 5,
28173
- ["WILL_DESTROY" /* WILL_DESTROY */]: 6
28174
- };
28175
- return badness[one] > badness[two] ? one : two;
28176
- }
28177
- function isPropertyDifference(diff) {
28178
- return diff.changeImpact !== void 0;
28179
- }
28180
- function onlyChanges(xs) {
28181
- const ret = {};
28182
- for (const [key, diff] of Object.entries(xs)) {
28183
- if (diff.isDifferent) {
28184
- ret[key] = diff;
28185
- }
28186
- }
28187
- return ret;
28188
- }
28189
- var import_assert, import_service_spec_types2, TemplateDiff, Difference, PropertyDifference, DifferenceCollection, ConditionDifference, MappingDifference, MetadataDifference, OutputDifference, ParameterDifference, ResourceImpact, ResourceDifference;
28190
- var init_types = __esm({
28191
- "../cloudformation-diff/lib/diff/types.ts"() {
28192
- "use strict";
28193
- import_assert = require("assert");
28194
- import_service_spec_types2 = __toESM(require_lib9());
28195
- init_util();
28196
- init_iam_changes();
28197
- init_security_group_changes();
28198
- TemplateDiff = class {
28198
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/types.js
28199
+ var require_types = __commonJS({
28200
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/types.js"(exports2) {
28201
+ "use strict";
28202
+ Object.defineProperty(exports2, "__esModule", { value: true });
28203
+ exports2.ResourceDifference = exports2.ResourceImpact = exports2.ParameterDifference = exports2.OutputDifference = exports2.MetadataDifference = exports2.MappingDifference = exports2.ConditionDifference = exports2.DifferenceCollection = exports2.PropertyDifference = exports2.Difference = exports2.TemplateDiff = void 0;
28204
+ exports2.isPropertyDifference = isPropertyDifference;
28205
+ var assert_1 = require("assert");
28206
+ var service_spec_types_1 = require_lib9();
28207
+ var util_1 = require_util2();
28208
+ var iam_changes_1 = require_iam_changes();
28209
+ var security_group_changes_1 = require_security_group_changes();
28210
+ var TemplateDiff = class {
28199
28211
  constructor(args) {
28200
28212
  if (args.awsTemplateFormatVersion !== void 0) {
28201
28213
  this.awsTemplateFormatVersion = args.awsTemplateFormatVersion;
@@ -28213,15 +28225,15 @@ var init_types = __esm({
28213
28225
  this.parameters = args.parameters || new DifferenceCollection({});
28214
28226
  this.resources = args.resources || new DifferenceCollection({});
28215
28227
  this.unknown = args.unknown || new DifferenceCollection({});
28216
- this.iamChanges = new IamChanges({
28217
- propertyChanges: this.scrutinizablePropertyChanges(IamChanges.IamPropertyScrutinies),
28218
- resourceChanges: this.scrutinizableResourceChanges(IamChanges.IamResourceScrutinies)
28228
+ this.iamChanges = new iam_changes_1.IamChanges({
28229
+ propertyChanges: this.scrutinizablePropertyChanges(iam_changes_1.IamChanges.IamPropertyScrutinies),
28230
+ resourceChanges: this.scrutinizableResourceChanges(iam_changes_1.IamChanges.IamResourceScrutinies)
28219
28231
  });
28220
- this.securityGroupChanges = new SecurityGroupChanges({
28221
- egressRulePropertyChanges: this.scrutinizablePropertyChanges([import_service_spec_types2.PropertyScrutinyType.EgressRules]),
28222
- ingressRulePropertyChanges: this.scrutinizablePropertyChanges([import_service_spec_types2.PropertyScrutinyType.IngressRules]),
28223
- egressRuleResourceChanges: this.scrutinizableResourceChanges([import_service_spec_types2.ResourceScrutinyType.EgressRuleResource]),
28224
- ingressRuleResourceChanges: this.scrutinizableResourceChanges([import_service_spec_types2.ResourceScrutinyType.IngressRuleResource])
28232
+ this.securityGroupChanges = new security_group_changes_1.SecurityGroupChanges({
28233
+ egressRulePropertyChanges: this.scrutinizablePropertyChanges([service_spec_types_1.PropertyScrutinyType.EgressRules]),
28234
+ ingressRulePropertyChanges: this.scrutinizablePropertyChanges([service_spec_types_1.PropertyScrutinyType.IngressRules]),
28235
+ egressRuleResourceChanges: this.scrutinizableResourceChanges([service_spec_types_1.ResourceScrutinyType.EgressRuleResource]),
28236
+ ingressRuleResourceChanges: this.scrutinizableResourceChanges([service_spec_types_1.ResourceScrutinyType.IngressRuleResource])
28225
28237
  });
28226
28238
  }
28227
28239
  get differenceCount() {
@@ -28275,9 +28287,9 @@ var init_types = __esm({
28275
28287
  if (!resourceChange.resourceType) {
28276
28288
  continue;
28277
28289
  }
28278
- const newTypeProps = ((_a = loadResourceModel(resourceChange.resourceType)) == null ? void 0 : _a.properties) || {};
28290
+ const newTypeProps = ((_a = (0, util_1.loadResourceModel)(resourceChange.resourceType)) == null ? void 0 : _a.properties) || {};
28279
28291
  for (const [propertyName, prop] of Object.entries(newTypeProps)) {
28280
- const propScrutinyType = prop.scrutinizable || import_service_spec_types2.PropertyScrutinyType.None;
28292
+ const propScrutinyType = prop.scrutinizable || service_spec_types_1.PropertyScrutinyType.None;
28281
28293
  if (scrutinyTypes.includes(propScrutinyType)) {
28282
28294
  ret.push({
28283
28295
  resourceLogicalId,
@@ -28311,7 +28323,7 @@ var init_types = __esm({
28311
28323
  };
28312
28324
  if (resourceChange.resourceTypeChanged) {
28313
28325
  if (resourceChange.oldResourceType) {
28314
- const oldResourceModel = loadResourceModel(resourceChange.oldResourceType);
28326
+ const oldResourceModel = (0, util_1.loadResourceModel)(resourceChange.oldResourceType);
28315
28327
  if (oldResourceModel && this.resourceIsScrutinizable(oldResourceModel, scrutinyTypes)) {
28316
28328
  ret.push({
28317
28329
  ...commonProps,
@@ -28322,7 +28334,7 @@ var init_types = __esm({
28322
28334
  }
28323
28335
  }
28324
28336
  if (resourceChange.newResourceType) {
28325
- const newResourceModel = loadResourceModel(resourceChange.newResourceType);
28337
+ const newResourceModel = (0, util_1.loadResourceModel)(resourceChange.newResourceType);
28326
28338
  if (newResourceModel && this.resourceIsScrutinizable(newResourceModel, scrutinyTypes)) {
28327
28339
  ret.push({
28328
28340
  ...commonProps,
@@ -28336,7 +28348,7 @@ var init_types = __esm({
28336
28348
  if (!resourceChange.resourceType) {
28337
28349
  continue;
28338
28350
  }
28339
- const resourceModel = loadResourceModel(resourceChange.resourceType);
28351
+ const resourceModel = (0, util_1.loadResourceModel)(resourceChange.resourceType);
28340
28352
  if (resourceModel && this.resourceIsScrutinizable(resourceModel, scrutinyTypes)) {
28341
28353
  ret.push({
28342
28354
  ...commonProps,
@@ -28349,10 +28361,11 @@ var init_types = __esm({
28349
28361
  return ret;
28350
28362
  }
28351
28363
  resourceIsScrutinizable(res, scrutinyTypes) {
28352
- return scrutinyTypes.includes(res.scrutinizable || import_service_spec_types2.ResourceScrutinyType.None);
28364
+ return scrutinyTypes.includes(res.scrutinizable || service_spec_types_1.ResourceScrutinyType.None);
28353
28365
  }
28354
28366
  };
28355
- Difference = class {
28367
+ exports2.TemplateDiff = TemplateDiff;
28368
+ var Difference = class {
28356
28369
  /**
28357
28370
  * @param oldValue the old value, cannot be equal (to the sense of +deepEqual+) to +newValue+.
28358
28371
  * @param newValue the new value, cannot be equal (to the sense of +deepEqual+) to +oldValue+.
@@ -28361,9 +28374,9 @@ var init_types = __esm({
28361
28374
  this.oldValue = oldValue;
28362
28375
  this.newValue = newValue;
28363
28376
  if (oldValue === void 0 && newValue === void 0) {
28364
- throw new import_assert.AssertionError({ message: "oldValue and newValue are both undefined!" });
28377
+ throw new assert_1.AssertionError({ message: "oldValue and newValue are both undefined!" });
28365
28378
  }
28366
- this.isDifferent = !deepEqual(oldValue, newValue);
28379
+ this.isDifferent = !(0, util_1.deepEqual)(oldValue, newValue);
28367
28380
  }
28368
28381
  /** @returns +true+ if the element is new to the template. */
28369
28382
  get isAddition() {
@@ -28378,13 +28391,15 @@ var init_types = __esm({
28378
28391
  return this.oldValue !== void 0 && this.newValue !== void 0;
28379
28392
  }
28380
28393
  };
28381
- PropertyDifference = class extends Difference {
28394
+ exports2.Difference = Difference;
28395
+ var PropertyDifference = class extends Difference {
28382
28396
  constructor(oldValue, newValue, args) {
28383
28397
  super(oldValue, newValue);
28384
28398
  this.changeImpact = args.changeImpact;
28385
28399
  }
28386
28400
  };
28387
- DifferenceCollection = class _DifferenceCollection {
28401
+ exports2.PropertyDifference = PropertyDifference;
28402
+ var DifferenceCollection = class _DifferenceCollection {
28388
28403
  constructor(diffs) {
28389
28404
  this.diffs = diffs;
28390
28405
  }
@@ -28454,22 +28469,24 @@ var init_types = __esm({
28454
28469
  others.forEach((v) => cb(v.logicalId, v.change));
28455
28470
  }
28456
28471
  };
28457
- ConditionDifference = class extends Difference {
28458
- // TODO: define specific difference attributes
28472
+ exports2.DifferenceCollection = DifferenceCollection;
28473
+ var ConditionDifference = class extends Difference {
28459
28474
  };
28460
- MappingDifference = class extends Difference {
28461
- // TODO: define specific difference attributes
28475
+ exports2.ConditionDifference = ConditionDifference;
28476
+ var MappingDifference = class extends Difference {
28462
28477
  };
28463
- MetadataDifference = class extends Difference {
28464
- // TODO: define specific difference attributes
28478
+ exports2.MappingDifference = MappingDifference;
28479
+ var MetadataDifference = class extends Difference {
28465
28480
  };
28466
- OutputDifference = class extends Difference {
28467
- // TODO: define specific difference attributes
28481
+ exports2.MetadataDifference = MetadataDifference;
28482
+ var OutputDifference = class extends Difference {
28468
28483
  };
28469
- ParameterDifference = class extends Difference {
28470
- // TODO: define specific difference attributes
28484
+ exports2.OutputDifference = OutputDifference;
28485
+ var ParameterDifference = class extends Difference {
28471
28486
  };
28472
- ResourceImpact = /* @__PURE__ */ ((ResourceImpact3) => {
28487
+ exports2.ParameterDifference = ParameterDifference;
28488
+ var ResourceImpact2;
28489
+ (function(ResourceImpact3) {
28473
28490
  ResourceImpact3["WILL_UPDATE"] = "WILL_UPDATE";
28474
28491
  ResourceImpact3["WILL_CREATE"] = "WILL_CREATE";
28475
28492
  ResourceImpact3["WILL_REPLACE"] = "WILL_REPLACE";
@@ -28478,9 +28495,24 @@ var init_types = __esm({
28478
28495
  ResourceImpact3["WILL_ORPHAN"] = "WILL_ORPHAN";
28479
28496
  ResourceImpact3["WILL_IMPORT"] = "WILL_IMPORT";
28480
28497
  ResourceImpact3["NO_CHANGE"] = "NO_CHANGE";
28481
- return ResourceImpact3;
28482
- })(ResourceImpact || {});
28483
- ResourceDifference = class {
28498
+ })(ResourceImpact2 || (exports2.ResourceImpact = ResourceImpact2 = {}));
28499
+ function worstImpact(one, two) {
28500
+ if (!two) {
28501
+ return one;
28502
+ }
28503
+ const badness = {
28504
+ [ResourceImpact2.NO_CHANGE]: 0,
28505
+ [ResourceImpact2.WILL_IMPORT]: 0,
28506
+ [ResourceImpact2.WILL_UPDATE]: 1,
28507
+ [ResourceImpact2.WILL_CREATE]: 2,
28508
+ [ResourceImpact2.WILL_ORPHAN]: 3,
28509
+ [ResourceImpact2.MAY_REPLACE]: 4,
28510
+ [ResourceImpact2.WILL_REPLACE]: 5,
28511
+ [ResourceImpact2.WILL_DESTROY]: 6
28512
+ };
28513
+ return badness[one] > badness[two] ? one : two;
28514
+ }
28515
+ var ResourceDifference2 = class {
28484
28516
  constructor(oldValue, newValue, args) {
28485
28517
  this.oldValue = oldValue;
28486
28518
  this.newValue = newValue;
@@ -28571,18 +28603,18 @@ var init_types = __esm({
28571
28603
  }
28572
28604
  get changeImpact() {
28573
28605
  if (this.isImport) {
28574
- return "WILL_IMPORT" /* WILL_IMPORT */;
28606
+ return ResourceImpact2.WILL_IMPORT;
28575
28607
  }
28576
28608
  if (this.resourceTypes.oldType !== this.resourceTypes.newType) {
28577
28609
  if (this.resourceTypes.oldType === void 0) {
28578
- return "WILL_CREATE" /* WILL_CREATE */;
28610
+ return ResourceImpact2.WILL_CREATE;
28579
28611
  }
28580
28612
  if (this.resourceTypes.newType === void 0) {
28581
- return this.oldValue.DeletionPolicy === "Retain" ? "WILL_ORPHAN" /* WILL_ORPHAN */ : "WILL_DESTROY" /* WILL_DESTROY */;
28613
+ return this.oldValue.DeletionPolicy === "Retain" ? ResourceImpact2.WILL_ORPHAN : ResourceImpact2.WILL_DESTROY;
28582
28614
  }
28583
- return "WILL_REPLACE" /* WILL_REPLACE */;
28615
+ return ResourceImpact2.WILL_REPLACE;
28584
28616
  }
28585
- const baseImpact = Object.keys(this.otherChanges).length > 0 ? "WILL_UPDATE" /* WILL_UPDATE */ : "NO_CHANGE" /* NO_CHANGE */;
28617
+ const baseImpact = Object.keys(this.otherChanges).length > 0 ? ResourceImpact2.WILL_UPDATE : ResourceImpact2.NO_CHANGE;
28586
28618
  return Object.values(this.propertyDiffs).map((elt) => elt.changeImpact).reduce(worstImpact, baseImpact);
28587
28619
  }
28588
28620
  /**
@@ -28603,99 +28635,118 @@ var init_types = __esm({
28603
28635
  }
28604
28636
  }
28605
28637
  };
28638
+ exports2.ResourceDifference = ResourceDifference2;
28639
+ function isPropertyDifference(diff) {
28640
+ return diff.changeImpact !== void 0;
28641
+ }
28642
+ function onlyChanges(xs) {
28643
+ const ret = {};
28644
+ for (const [key, diff] of Object.entries(xs)) {
28645
+ if (diff.isDifferent) {
28646
+ ret[key] = diff;
28647
+ }
28648
+ }
28649
+ return ret;
28650
+ }
28606
28651
  }
28607
28652
  });
28608
28653
 
28609
- // ../cloudformation-diff/lib/diff/index.ts
28610
- function diffAttribute(oldValue, newValue) {
28611
- return new Difference(_asString(oldValue), _asString(newValue));
28612
- }
28613
- function diffCondition(oldValue, newValue) {
28614
- return new ConditionDifference(oldValue, newValue);
28615
- }
28616
- function diffMapping(oldValue, newValue) {
28617
- return new MappingDifference(oldValue, newValue);
28618
- }
28619
- function diffMetadata(oldValue, newValue) {
28620
- return new MetadataDifference(oldValue, newValue);
28621
- }
28622
- function diffOutput(oldValue, newValue) {
28623
- return new OutputDifference(oldValue, newValue);
28624
- }
28625
- function diffParameter(oldValue, newValue) {
28626
- return new ParameterDifference(oldValue, newValue);
28627
- }
28628
- function diffResource(oldValue, newValue) {
28629
- const resourceType = {
28630
- oldType: oldValue && oldValue.Type,
28631
- newType: newValue && newValue.Type
28632
- };
28633
- let propertyDiffs = {};
28634
- let otherDiffs = {};
28635
- if (resourceType.oldType !== void 0 && resourceType.oldType === resourceType.newType) {
28636
- const impl = loadResourceModel(resourceType.oldType);
28637
- propertyDiffs = diffKeyedEntities(
28638
- oldValue.Properties,
28639
- newValue.Properties,
28640
- (oldVal, newVal, key) => _diffProperty(oldVal, newVal, key, impl)
28641
- );
28642
- otherDiffs = diffKeyedEntities(oldValue, newValue, _diffOther);
28643
- delete otherDiffs.Properties;
28644
- }
28645
- return new ResourceDifference(oldValue, newValue, {
28646
- resourceType,
28647
- propertyDiffs,
28648
- otherDiffs
28649
- });
28650
- function _diffProperty(oldV, newV, key, resourceSpec) {
28651
- var _a;
28652
- let changeImpact = "NO_CHANGE" /* NO_CHANGE */;
28653
- const spec = (_a = resourceSpec == null ? void 0 : resourceSpec.properties) == null ? void 0 : _a[key];
28654
- if (spec && !deepEqual(oldV, newV)) {
28655
- switch (spec.causesReplacement) {
28656
- case "yes":
28657
- changeImpact = "WILL_REPLACE" /* WILL_REPLACE */;
28658
- break;
28659
- case "maybe":
28660
- changeImpact = "MAY_REPLACE" /* MAY_REPLACE */;
28661
- break;
28662
- default:
28663
- changeImpact = "WILL_UPDATE" /* WILL_UPDATE */;
28654
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/index.js
28655
+ var require_diff4 = __commonJS({
28656
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/index.js"(exports2) {
28657
+ "use strict";
28658
+ Object.defineProperty(exports2, "__esModule", { value: true });
28659
+ exports2.diffAttribute = diffAttribute;
28660
+ exports2.diffCondition = diffCondition;
28661
+ exports2.diffMapping = diffMapping;
28662
+ exports2.diffMetadata = diffMetadata;
28663
+ exports2.diffOutput = diffOutput;
28664
+ exports2.diffParameter = diffParameter;
28665
+ exports2.diffResource = diffResource;
28666
+ exports2.diffUnknown = diffUnknown;
28667
+ var types = require_types();
28668
+ var util_1 = require_util2();
28669
+ function diffAttribute(oldValue, newValue) {
28670
+ return new types.Difference(_asString(oldValue), _asString(newValue));
28671
+ }
28672
+ function diffCondition(oldValue, newValue) {
28673
+ return new types.ConditionDifference(oldValue, newValue);
28674
+ }
28675
+ function diffMapping(oldValue, newValue) {
28676
+ return new types.MappingDifference(oldValue, newValue);
28677
+ }
28678
+ function diffMetadata(oldValue, newValue) {
28679
+ return new types.MetadataDifference(oldValue, newValue);
28680
+ }
28681
+ function diffOutput(oldValue, newValue) {
28682
+ return new types.OutputDifference(oldValue, newValue);
28683
+ }
28684
+ function diffParameter(oldValue, newValue) {
28685
+ return new types.ParameterDifference(oldValue, newValue);
28686
+ }
28687
+ function diffResource(oldValue, newValue) {
28688
+ const resourceType = {
28689
+ oldType: oldValue && oldValue.Type,
28690
+ newType: newValue && newValue.Type
28691
+ };
28692
+ let propertyDiffs = {};
28693
+ let otherDiffs = {};
28694
+ if (resourceType.oldType !== void 0 && resourceType.oldType === resourceType.newType) {
28695
+ const impl = (0, util_1.loadResourceModel)(resourceType.oldType);
28696
+ propertyDiffs = (0, util_1.diffKeyedEntities)(oldValue.Properties, newValue.Properties, (oldVal, newVal, key) => _diffProperty(oldVal, newVal, key, impl));
28697
+ otherDiffs = (0, util_1.diffKeyedEntities)(oldValue, newValue, _diffOther);
28698
+ delete otherDiffs.Properties;
28699
+ }
28700
+ return new types.ResourceDifference(oldValue, newValue, {
28701
+ resourceType,
28702
+ propertyDiffs,
28703
+ otherDiffs
28704
+ });
28705
+ function _diffProperty(oldV, newV, key, resourceSpec) {
28706
+ var _a;
28707
+ let changeImpact = types.ResourceImpact.NO_CHANGE;
28708
+ const spec = (_a = resourceSpec == null ? void 0 : resourceSpec.properties) == null ? void 0 : _a[key];
28709
+ if (spec && !(0, util_1.deepEqual)(oldV, newV)) {
28710
+ switch (spec.causesReplacement) {
28711
+ case "yes":
28712
+ changeImpact = types.ResourceImpact.WILL_REPLACE;
28713
+ break;
28714
+ case "maybe":
28715
+ changeImpact = types.ResourceImpact.MAY_REPLACE;
28716
+ break;
28717
+ default:
28718
+ changeImpact = types.ResourceImpact.WILL_UPDATE;
28719
+ }
28720
+ }
28721
+ return new types.PropertyDifference(oldV, newV, { changeImpact });
28722
+ }
28723
+ function _diffOther(oldV, newV) {
28724
+ return new types.Difference(oldV, newV);
28664
28725
  }
28665
28726
  }
28666
- return new PropertyDifference(oldV, newV, { changeImpact });
28667
- }
28668
- function _diffOther(oldV, newV) {
28669
- return new Difference(oldV, newV);
28670
- }
28671
- }
28672
- function diffUnknown(oldValue, newValue) {
28673
- return new Difference(oldValue, newValue);
28674
- }
28675
- function _asString(value) {
28676
- if (value == null) {
28677
- return void 0;
28678
- }
28679
- if (typeof value === "string") {
28680
- return value;
28681
- }
28682
- return JSON.stringify(value);
28683
- }
28684
- var init_diff = __esm({
28685
- "../cloudformation-diff/lib/diff/index.ts"() {
28686
- "use strict";
28687
- init_types();
28688
- init_util();
28727
+ function diffUnknown(oldValue, newValue) {
28728
+ return new types.Difference(oldValue, newValue);
28729
+ }
28730
+ function _asString(value) {
28731
+ if (value == null) {
28732
+ return void 0;
28733
+ }
28734
+ if (typeof value === "string") {
28735
+ return value;
28736
+ }
28737
+ return JSON.stringify(value);
28738
+ }
28689
28739
  }
28690
28740
  });
28691
28741
 
28692
- // ../cloudformation-diff/lib/diff/template-and-changeset-diff-merger.ts
28693
- var _TemplateAndChangeSetDiffMerger, TemplateAndChangeSetDiffMerger;
28694
- var init_template_and_changeset_diff_merger = __esm({
28695
- "../cloudformation-diff/lib/diff/template-and-changeset-diff-merger.ts"() {
28742
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/template-and-changeset-diff-merger.js
28743
+ var require_template_and_changeset_diff_merger = __commonJS({
28744
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/template-and-changeset-diff-merger.js"(exports2) {
28696
28745
  "use strict";
28697
- init_types();
28698
- _TemplateAndChangeSetDiffMerger = class _TemplateAndChangeSetDiffMerger {
28746
+ Object.defineProperty(exports2, "__esModule", { value: true });
28747
+ exports2.TemplateAndChangeSetDiffMerger = void 0;
28748
+ var types = require_types();
28749
+ var TemplateAndChangeSetDiffMerger = class _TemplateAndChangeSetDiffMerger {
28699
28750
  static determineChangeSetReplacementMode(propertyChange) {
28700
28751
  var _a;
28701
28752
  if (((_a = propertyChange.Target) == null ? void 0 : _a.RequiresRecreation) === void 0) {
@@ -28756,30 +28807,30 @@ var init_template_and_changeset_diff_merger = __esm({
28756
28807
  var _a2;
28757
28808
  if (type === "Property") {
28758
28809
  if (!this.changeSetResources[logicalId]) {
28759
- value.changeImpact = "NO_CHANGE" /* NO_CHANGE */;
28810
+ value.changeImpact = types.ResourceImpact.NO_CHANGE;
28760
28811
  value.isDifferent = false;
28761
28812
  return;
28762
28813
  }
28763
28814
  const changingPropertyCausesResourceReplacement = (_a2 = (this.changeSetResources[logicalId].propertyReplacementModes ?? {})[name]) == null ? void 0 : _a2.replacementMode;
28764
28815
  switch (changingPropertyCausesResourceReplacement) {
28765
28816
  case "Always":
28766
- value.changeImpact = "WILL_REPLACE" /* WILL_REPLACE */;
28817
+ value.changeImpact = types.ResourceImpact.WILL_REPLACE;
28767
28818
  break;
28768
28819
  case "Never":
28769
- value.changeImpact = "WILL_UPDATE" /* WILL_UPDATE */;
28820
+ value.changeImpact = types.ResourceImpact.WILL_UPDATE;
28770
28821
  break;
28771
28822
  case "Conditionally":
28772
- value.changeImpact = "MAY_REPLACE" /* MAY_REPLACE */;
28823
+ value.changeImpact = types.ResourceImpact.MAY_REPLACE;
28773
28824
  break;
28774
28825
  case void 0:
28775
- value.changeImpact = "NO_CHANGE" /* NO_CHANGE */;
28826
+ value.changeImpact = types.ResourceImpact.NO_CHANGE;
28776
28827
  value.isDifferent = false;
28777
28828
  break;
28778
28829
  }
28779
28830
  } else if (type === "Other") {
28780
28831
  switch (name) {
28781
28832
  case "Metadata":
28782
- change.setOtherChange("Metadata", new Difference(value.newValue, value.newValue));
28833
+ change.setOtherChange("Metadata", new types.Difference(value.newValue, value.newValue));
28783
28834
  break;
28784
28835
  }
28785
28836
  }
@@ -28804,198 +28855,196 @@ var init_template_and_changeset_diff_merger = __esm({
28804
28855
  return importedResourceLogicalIds;
28805
28856
  }
28806
28857
  };
28807
- // If we somehow cannot find the resourceType, then we'll mark it as UNKNOWN, so that can be seen in the diff.
28808
- _TemplateAndChangeSetDiffMerger.UNKNOWN_RESOURCE_TYPE = "UNKNOWN_RESOURCE_TYPE";
28809
- TemplateAndChangeSetDiffMerger = _TemplateAndChangeSetDiffMerger;
28810
- }
28811
- });
28812
-
28813
- // ../cloudformation-diff/lib/diff-template.ts
28814
- var diff_template_exports = {};
28815
- __export(diff_template_exports, {
28816
- ConditionDifference: () => ConditionDifference,
28817
- Difference: () => Difference,
28818
- DifferenceCollection: () => DifferenceCollection,
28819
- MappingDifference: () => MappingDifference,
28820
- MetadataDifference: () => MetadataDifference,
28821
- OutputDifference: () => OutputDifference,
28822
- ParameterDifference: () => ParameterDifference,
28823
- PropertyDifference: () => PropertyDifference,
28824
- ResourceDifference: () => ResourceDifference,
28825
- ResourceImpact: () => ResourceImpact,
28826
- TemplateDiff: () => TemplateDiff,
28827
- diffTemplate: () => diffTemplate,
28828
- fullDiff: () => fullDiff,
28829
- isPropertyDifference: () => isPropertyDifference
28830
- });
28831
- function fullDiff(currentTemplate, newTemplate, changeSet, isImport) {
28832
- normalize(currentTemplate);
28833
- normalize(newTemplate);
28834
- const theDiff = diffTemplate(currentTemplate, newTemplate);
28835
- if (changeSet) {
28836
- const changeSetDiff = new TemplateAndChangeSetDiffMerger({ changeSet });
28837
- theDiff.resources.forEachDifference(
28838
- (logicalId, change) => changeSetDiff.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, change)
28839
- );
28840
- changeSetDiff.addImportInformationFromChangeset(theDiff.resources);
28841
- } else if (isImport) {
28842
- makeAllResourceChangesImports(theDiff);
28858
+ exports2.TemplateAndChangeSetDiffMerger = TemplateAndChangeSetDiffMerger;
28859
+ TemplateAndChangeSetDiffMerger.UNKNOWN_RESOURCE_TYPE = "UNKNOWN_RESOURCE_TYPE";
28843
28860
  }
28844
- return theDiff;
28845
- }
28846
- function diffTemplate(currentTemplate, newTemplate) {
28847
- const theDiff = calculateTemplateDiff(currentTemplate, newTemplate);
28848
- const newTemplateCopy = deepCopy(newTemplate);
28849
- let didPropagateReferenceChanges;
28850
- let diffWithReplacements;
28851
- do {
28852
- diffWithReplacements = calculateTemplateDiff(currentTemplate, newTemplateCopy);
28853
- didPropagateReferenceChanges = false;
28854
- if (diffWithReplacements.resources) {
28855
- diffWithReplacements.resources.forEachDifference((logicalId, change) => {
28856
- if (change.changeImpact === "WILL_REPLACE" /* WILL_REPLACE */) {
28857
- if (propagateReplacedReferences(newTemplateCopy, logicalId)) {
28858
- didPropagateReferenceChanges = true;
28859
- }
28861
+ });
28862
+
28863
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff-template.js
28864
+ var require_diff_template = __commonJS({
28865
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff-template.js"(exports2) {
28866
+ "use strict";
28867
+ var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
28868
+ if (k2 === void 0) k2 = k;
28869
+ var desc = Object.getOwnPropertyDescriptor(m, k);
28870
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
28871
+ desc = { enumerable: true, get: function() {
28872
+ return m[k];
28873
+ } };
28874
+ }
28875
+ Object.defineProperty(o, k2, desc);
28876
+ } : function(o, m, k, k2) {
28877
+ if (k2 === void 0) k2 = k;
28878
+ o[k2] = m[k];
28879
+ });
28880
+ var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) {
28881
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p);
28882
+ };
28883
+ Object.defineProperty(exports2, "__esModule", { value: true });
28884
+ exports2.fullDiff = fullDiff2;
28885
+ exports2.diffTemplate = diffTemplate;
28886
+ var impl = require_diff4();
28887
+ var template_and_changeset_diff_merger_1 = require_template_and_changeset_diff_merger();
28888
+ var types = require_types();
28889
+ var util_1 = require_util2();
28890
+ __exportStar2(require_types(), exports2);
28891
+ var DIFF_HANDLERS = {
28892
+ AWSTemplateFormatVersion: (diff, oldValue, newValue) => diff.awsTemplateFormatVersion = impl.diffAttribute(oldValue, newValue),
28893
+ Description: (diff, oldValue, newValue) => diff.description = impl.diffAttribute(oldValue, newValue),
28894
+ Metadata: (diff, oldValue, newValue) => diff.metadata = new types.DifferenceCollection((0, util_1.diffKeyedEntities)(oldValue, newValue, impl.diffMetadata)),
28895
+ Parameters: (diff, oldValue, newValue) => diff.parameters = new types.DifferenceCollection((0, util_1.diffKeyedEntities)(oldValue, newValue, impl.diffParameter)),
28896
+ Mappings: (diff, oldValue, newValue) => diff.mappings = new types.DifferenceCollection((0, util_1.diffKeyedEntities)(oldValue, newValue, impl.diffMapping)),
28897
+ Conditions: (diff, oldValue, newValue) => diff.conditions = new types.DifferenceCollection((0, util_1.diffKeyedEntities)(oldValue, newValue, impl.diffCondition)),
28898
+ Transform: (diff, oldValue, newValue) => diff.transform = impl.diffAttribute(oldValue, newValue),
28899
+ Resources: (diff, oldValue, newValue) => diff.resources = new types.DifferenceCollection((0, util_1.diffKeyedEntities)(oldValue, newValue, impl.diffResource)),
28900
+ Outputs: (diff, oldValue, newValue) => diff.outputs = new types.DifferenceCollection((0, util_1.diffKeyedEntities)(oldValue, newValue, impl.diffOutput))
28901
+ };
28902
+ function fullDiff2(currentTemplate, newTemplate, changeSet, isImport) {
28903
+ normalize(currentTemplate);
28904
+ normalize(newTemplate);
28905
+ const theDiff = diffTemplate(currentTemplate, newTemplate);
28906
+ if (changeSet) {
28907
+ const changeSetDiff = new template_and_changeset_diff_merger_1.TemplateAndChangeSetDiffMerger({ changeSet });
28908
+ theDiff.resources.forEachDifference((logicalId, change) => changeSetDiff.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, change));
28909
+ changeSetDiff.addImportInformationFromChangeset(theDiff.resources);
28910
+ } else if (isImport) {
28911
+ makeAllResourceChangesImports(theDiff);
28912
+ }
28913
+ return theDiff;
28914
+ }
28915
+ function diffTemplate(currentTemplate, newTemplate) {
28916
+ const theDiff = calculateTemplateDiff(currentTemplate, newTemplate);
28917
+ const newTemplateCopy = deepCopy(newTemplate);
28918
+ let didPropagateReferenceChanges;
28919
+ let diffWithReplacements;
28920
+ do {
28921
+ diffWithReplacements = calculateTemplateDiff(currentTemplate, newTemplateCopy);
28922
+ didPropagateReferenceChanges = false;
28923
+ if (diffWithReplacements.resources) {
28924
+ diffWithReplacements.resources.forEachDifference((logicalId, change) => {
28925
+ if (change.changeImpact === types.ResourceImpact.WILL_REPLACE) {
28926
+ if (propagateReplacedReferences(newTemplateCopy, logicalId)) {
28927
+ didPropagateReferenceChanges = true;
28928
+ }
28929
+ }
28930
+ });
28931
+ }
28932
+ } while (didPropagateReferenceChanges);
28933
+ diffWithReplacements.resources.filter((r) => isReplacement(r.changeImpact)).forEachDifference((logicalId, downstreamReplacement) => {
28934
+ const resource = theDiff.resources.get(logicalId);
28935
+ if (resource.changeImpact !== downstreamReplacement.changeImpact) {
28936
+ propagatePropertyReplacement(downstreamReplacement, resource);
28860
28937
  }
28861
28938
  });
28939
+ return theDiff;
28862
28940
  }
28863
- } while (didPropagateReferenceChanges);
28864
- diffWithReplacements.resources.filter((r) => isReplacement(r.changeImpact)).forEachDifference((logicalId, downstreamReplacement) => {
28865
- const resource = theDiff.resources.get(logicalId);
28866
- if (resource.changeImpact !== downstreamReplacement.changeImpact) {
28867
- propagatePropertyReplacement(downstreamReplacement, resource);
28941
+ function isReplacement(impact) {
28942
+ return impact === types.ResourceImpact.MAY_REPLACE || impact === types.ResourceImpact.WILL_REPLACE;
28868
28943
  }
28869
- });
28870
- return theDiff;
28871
- }
28872
- function isReplacement(impact) {
28873
- return impact === "MAY_REPLACE" /* MAY_REPLACE */ || impact === "WILL_REPLACE" /* WILL_REPLACE */;
28874
- }
28875
- function propagatePropertyReplacement(source, dest) {
28876
- for (const [propertyName, diff] of Object.entries(source.propertyUpdates)) {
28877
- if (diff.changeImpact && isReplacement(diff.changeImpact)) {
28878
- dest.setPropertyChange(propertyName, diff);
28879
- }
28880
- }
28881
- }
28882
- function calculateTemplateDiff(currentTemplate, newTemplate) {
28883
- const differences = {};
28884
- const unknown = {};
28885
- for (const key of unionOf(Object.keys(currentTemplate), Object.keys(newTemplate)).sort()) {
28886
- const oldValue = currentTemplate[key];
28887
- const newValue = newTemplate[key];
28888
- if (deepEqual(oldValue, newValue)) {
28889
- continue;
28890
- }
28891
- const handler = DIFF_HANDLERS[key] || ((_diff, oldV, newV) => unknown[key] = diffUnknown(oldV, newV));
28892
- handler(differences, oldValue, newValue);
28893
- }
28894
- if (Object.keys(unknown).length > 0) {
28895
- differences.unknown = new DifferenceCollection(unknown);
28896
- }
28897
- return new TemplateDiff(differences);
28898
- }
28899
- function propagateReplacedReferences(template, logicalId) {
28900
- let ret = false;
28901
- function recurse(obj) {
28902
- if (Array.isArray(obj)) {
28903
- obj.forEach(recurse);
28904
- }
28905
- if (typeof obj === "object" && obj !== null) {
28906
- if (!replaceReference(obj)) {
28907
- Object.values(obj).forEach(recurse);
28944
+ function propagatePropertyReplacement(source, dest) {
28945
+ for (const [propertyName, diff] of Object.entries(source.propertyUpdates)) {
28946
+ if (diff.changeImpact && isReplacement(diff.changeImpact)) {
28947
+ dest.setPropertyChange(propertyName, diff);
28948
+ }
28908
28949
  }
28909
28950
  }
28910
- }
28911
- function replaceReference(obj) {
28912
- const keys = Object.keys(obj);
28913
- if (keys.length !== 1) {
28914
- return false;
28915
- }
28916
- const key = keys[0];
28917
- if (key === "Ref") {
28918
- if (obj.Ref === logicalId) {
28919
- obj.Ref = logicalId + " (replaced)";
28920
- ret = true;
28951
+ function calculateTemplateDiff(currentTemplate, newTemplate) {
28952
+ const differences = {};
28953
+ const unknown = {};
28954
+ for (const key of (0, util_1.unionOf)(Object.keys(currentTemplate), Object.keys(newTemplate)).sort()) {
28955
+ const oldValue = currentTemplate[key];
28956
+ const newValue = newTemplate[key];
28957
+ if ((0, util_1.deepEqual)(oldValue, newValue)) {
28958
+ continue;
28959
+ }
28960
+ const handler = DIFF_HANDLERS[key] || ((_diff, oldV, newV) => unknown[key] = impl.diffUnknown(oldV, newV));
28961
+ handler(differences, oldValue, newValue);
28921
28962
  }
28922
- return true;
28923
- }
28924
- if (key.startsWith("Fn::")) {
28925
- if (Array.isArray(obj[key]) && obj[key].length > 0 && obj[key][0] === logicalId) {
28926
- obj[key][0] = logicalId + "(replaced)";
28927
- ret = true;
28963
+ if (Object.keys(unknown).length > 0) {
28964
+ differences.unknown = new types.DifferenceCollection(unknown);
28928
28965
  }
28929
- return true;
28966
+ return new types.TemplateDiff(differences);
28930
28967
  }
28931
- return false;
28932
- }
28933
- recurse(template);
28934
- return ret;
28935
- }
28936
- function deepCopy(x) {
28937
- if (Array.isArray(x)) {
28938
- return x.map(deepCopy);
28939
- }
28940
- if (typeof x === "object" && x !== null) {
28941
- const ret = {};
28942
- for (const key of Object.keys(x)) {
28943
- ret[key] = deepCopy(x[key]);
28968
+ function propagateReplacedReferences(template, logicalId) {
28969
+ let ret = false;
28970
+ function recurse(obj) {
28971
+ if (Array.isArray(obj)) {
28972
+ obj.forEach(recurse);
28973
+ }
28974
+ if (typeof obj === "object" && obj !== null) {
28975
+ if (!replaceReference(obj)) {
28976
+ Object.values(obj).forEach(recurse);
28977
+ }
28978
+ }
28979
+ }
28980
+ function replaceReference(obj) {
28981
+ const keys = Object.keys(obj);
28982
+ if (keys.length !== 1) {
28983
+ return false;
28984
+ }
28985
+ const key = keys[0];
28986
+ if (key === "Ref") {
28987
+ if (obj.Ref === logicalId) {
28988
+ obj.Ref = logicalId + " (replaced)";
28989
+ ret = true;
28990
+ }
28991
+ return true;
28992
+ }
28993
+ if (key.startsWith("Fn::")) {
28994
+ if (Array.isArray(obj[key]) && obj[key].length > 0 && obj[key][0] === logicalId) {
28995
+ obj[key][0] = logicalId + "(replaced)";
28996
+ ret = true;
28997
+ }
28998
+ return true;
28999
+ }
29000
+ return false;
29001
+ }
29002
+ recurse(template);
29003
+ return ret;
28944
29004
  }
28945
- return ret;
28946
- }
28947
- return x;
28948
- }
28949
- function makeAllResourceChangesImports(diff) {
28950
- diff.resources.forEachDifference((_logicalId, change) => {
28951
- change.isImport = true;
28952
- });
28953
- }
28954
- function normalize(template) {
28955
- if (typeof template === "object") {
28956
- for (const key of Object.keys(template ?? {})) {
28957
- if (key === "Fn::GetAtt" && typeof template[key] === "string") {
28958
- template[key] = template[key].split(".");
28959
- continue;
28960
- } else if (key === "DependsOn") {
28961
- if (typeof template[key] === "string") {
28962
- template[key] = [template[key]];
28963
- } else if (Array.isArray(template[key])) {
28964
- template[key] = template[key].sort();
29005
+ function deepCopy(x) {
29006
+ if (Array.isArray(x)) {
29007
+ return x.map(deepCopy);
29008
+ }
29009
+ if (typeof x === "object" && x !== null) {
29010
+ const ret = {};
29011
+ for (const key of Object.keys(x)) {
29012
+ ret[key] = deepCopy(x[key]);
28965
29013
  }
28966
- continue;
29014
+ return ret;
28967
29015
  }
28968
- if (Array.isArray(template[key])) {
28969
- for (const element of template[key]) {
28970
- normalize(element);
29016
+ return x;
29017
+ }
29018
+ function makeAllResourceChangesImports(diff) {
29019
+ diff.resources.forEachDifference((_logicalId, change) => {
29020
+ change.isImport = true;
29021
+ });
29022
+ }
29023
+ function normalize(template) {
29024
+ if (typeof template === "object") {
29025
+ for (const key of Object.keys(template ?? {})) {
29026
+ if (key === "Fn::GetAtt" && typeof template[key] === "string") {
29027
+ template[key] = template[key].split(".");
29028
+ continue;
29029
+ } else if (key === "DependsOn") {
29030
+ if (typeof template[key] === "string") {
29031
+ template[key] = [template[key]];
29032
+ } else if (Array.isArray(template[key])) {
29033
+ template[key] = template[key].sort();
29034
+ }
29035
+ continue;
29036
+ }
29037
+ if (Array.isArray(template[key])) {
29038
+ for (const element of template[key]) {
29039
+ normalize(element);
29040
+ }
29041
+ } else {
29042
+ normalize(template[key]);
29043
+ }
28971
29044
  }
28972
- } else {
28973
- normalize(template[key]);
28974
29045
  }
28975
29046
  }
28976
29047
  }
28977
- }
28978
- var DIFF_HANDLERS;
28979
- var init_diff_template = __esm({
28980
- "../cloudformation-diff/lib/diff-template.ts"() {
28981
- "use strict";
28982
- init_diff();
28983
- init_template_and_changeset_diff_merger();
28984
- init_types();
28985
- init_util();
28986
- init_types();
28987
- DIFF_HANDLERS = {
28988
- AWSTemplateFormatVersion: (diff, oldValue, newValue) => diff.awsTemplateFormatVersion = diffAttribute(oldValue, newValue),
28989
- Description: (diff, oldValue, newValue) => diff.description = diffAttribute(oldValue, newValue),
28990
- Metadata: (diff, oldValue, newValue) => diff.metadata = new DifferenceCollection(diffKeyedEntities(oldValue, newValue, diffMetadata)),
28991
- Parameters: (diff, oldValue, newValue) => diff.parameters = new DifferenceCollection(diffKeyedEntities(oldValue, newValue, diffParameter)),
28992
- Mappings: (diff, oldValue, newValue) => diff.mappings = new DifferenceCollection(diffKeyedEntities(oldValue, newValue, diffMapping)),
28993
- Conditions: (diff, oldValue, newValue) => diff.conditions = new DifferenceCollection(diffKeyedEntities(oldValue, newValue, diffCondition)),
28994
- Transform: (diff, oldValue, newValue) => diff.transform = diffAttribute(oldValue, newValue),
28995
- Resources: (diff, oldValue, newValue) => diff.resources = new DifferenceCollection(diffKeyedEntities(oldValue, newValue, diffResource)),
28996
- Outputs: (diff, oldValue, newValue) => diff.outputs = new DifferenceCollection(diffKeyedEntities(oldValue, newValue, diffOutput))
28997
- };
28998
- }
28999
29048
  });
29000
29049
 
29001
29050
  // ../../../node_modules/ansi-regex/index.js
@@ -29071,7 +29120,7 @@ var require_string_width = __commonJS({
29071
29120
  var stripAnsi = require_strip_ansi();
29072
29121
  var isFullwidthCodePoint = require_is_fullwidth_code_point();
29073
29122
  var emojiRegex = require_emoji_regex();
29074
- var stringWidth2 = (string) => {
29123
+ var stringWidth = (string) => {
29075
29124
  if (typeof string !== "string" || string.length === 0) {
29076
29125
  return 0;
29077
29126
  }
@@ -29096,8 +29145,8 @@ var require_string_width = __commonJS({
29096
29145
  }
29097
29146
  return width;
29098
29147
  };
29099
- module2.exports = stringWidth2;
29100
- module2.exports.default = stringWidth2;
29148
+ module2.exports = stringWidth;
29149
+ module2.exports.default = stringWidth;
29101
29150
  }
29102
29151
  });
29103
29152
 
@@ -29359,10 +29408,10 @@ var require_utils4 = __commonJS({
29359
29408
  return (_b = (_a = input.match(/\s+/g)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
29360
29409
  };
29361
29410
  exports2.countSpaceSequence = countSpaceSequence;
29362
- var distributeUnevenly = (sum2, length) => {
29363
- const result = Array.from({ length }).fill(Math.floor(sum2 / length));
29411
+ var distributeUnevenly = (sum, length) => {
29412
+ const result = Array.from({ length }).fill(Math.floor(sum / length));
29364
29413
  return result.map((element, index) => {
29365
- return element + (index < sum2 % length ? 1 : 0);
29414
+ return element + (index < sum % length ? 1 : 0);
29366
29415
  });
29367
29416
  };
29368
29417
  exports2.distributeUnevenly = distributeUnevenly;
@@ -33485,7 +33534,7 @@ var require_table = __commonJS({
33485
33534
  var truncateTableData_1 = require_truncateTableData();
33486
33535
  var utils_1 = require_utils4();
33487
33536
  var validateTableData_1 = require_validateTableData();
33488
- var table3 = (data, userConfig = {}) => {
33537
+ var table = (data, userConfig = {}) => {
33489
33538
  (0, validateTableData_1.validateTableData)(data);
33490
33539
  let rows = (0, stringifyTableData_1.stringifyTableData)(data);
33491
33540
  const [injectedRows, injectedSpanningCellConfig] = (0, injectHeaderConfig_1.injectHeaderConfig)(rows, userConfig);
@@ -33500,7 +33549,7 @@ var require_table = __commonJS({
33500
33549
  const outputColumnWidths = (0, calculateOutputColumnWidths_1.calculateOutputColumnWidths)(config);
33501
33550
  return (0, drawTable_1.drawTable)(rows, outputColumnWidths, rowHeights, config);
33502
33551
  };
33503
- exports2.table = table3;
33552
+ exports2.table = table;
33504
33553
  }
33505
33554
  });
33506
33555
 
@@ -33546,75 +33595,72 @@ var require_src2 = __commonJS({
33546
33595
  }
33547
33596
  });
33548
33597
 
33549
- // ../cloudformation-diff/lib/format-table.ts
33550
- var format_table_exports = {};
33551
- __export(format_table_exports, {
33552
- formatTable: () => formatTable
33553
- });
33554
- function formatTable(cells, columns) {
33555
- return table.table(cells, {
33556
- border: TABLE_BORDER_CHARACTERS,
33557
- columns: buildColumnConfig(columns !== void 0 ? calculateColumnWidths(cells, columns) : void 0),
33558
- drawHorizontalLine: (line) => {
33559
- return line < 2 || line === cells.length || lineBetween(cells[line - 1], cells[line]);
33598
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/format-table.js
33599
+ var require_format_table = __commonJS({
33600
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/format-table.js"(exports2) {
33601
+ "use strict";
33602
+ Object.defineProperty(exports2, "__esModule", { value: true });
33603
+ exports2.formatTable = formatTable;
33604
+ var chalk3 = require_source();
33605
+ var string_width_1 = require_string_width();
33606
+ var table = require_src2();
33607
+ function formatTable(cells, columns) {
33608
+ return table.table(cells, {
33609
+ border: TABLE_BORDER_CHARACTERS,
33610
+ columns: buildColumnConfig(columns !== void 0 ? calculateColumnWidths(cells, columns) : void 0),
33611
+ drawHorizontalLine: (line) => {
33612
+ return line < 2 || line === cells.length || lineBetween(cells[line - 1], cells[line]);
33613
+ }
33614
+ }).trimRight();
33615
+ }
33616
+ function lineBetween(rowA, rowB) {
33617
+ return rowA[1] !== rowB[1];
33618
+ }
33619
+ function buildColumnConfig(widths) {
33620
+ if (widths === void 0) {
33621
+ return void 0;
33622
+ }
33623
+ const ret = {};
33624
+ widths.forEach((width, i) => {
33625
+ if (width === void 0) {
33626
+ return;
33627
+ }
33628
+ ret[i] = { width };
33629
+ });
33630
+ return ret;
33560
33631
  }
33561
- }).trimRight();
33562
- }
33563
- function lineBetween(rowA, rowB) {
33564
- return rowA[1] !== rowB[1];
33565
- }
33566
- function buildColumnConfig(widths) {
33567
- if (widths === void 0) {
33568
- return void 0;
33569
- }
33570
- const ret = {};
33571
- widths.forEach((width, i) => {
33572
- if (width === void 0) {
33573
- return;
33632
+ function calculateColumnWidths(rows, terminalWidth) {
33633
+ terminalWidth = Math.max(terminalWidth, 40);
33634
+ const columns = rows[0].map((_, i) => Math.max(...rows.map((row) => (0, string_width_1.default)(String(row[i])))));
33635
+ const contentWidth = terminalWidth - 2 - columns.length * 3;
33636
+ if (sum(columns) <= contentWidth) {
33637
+ return columns;
33638
+ }
33639
+ const fairShare = Math.min(contentWidth / columns.length);
33640
+ const smallColumns = columns.filter((w) => w < fairShare);
33641
+ let distributableWidth = contentWidth - sum(smallColumns);
33642
+ const fairDistributable = Math.floor(distributableWidth / (columns.length - smallColumns.length));
33643
+ const ret = new Array();
33644
+ for (const requestedWidth of columns) {
33645
+ if (requestedWidth < fairShare) {
33646
+ ret.push(requestedWidth);
33647
+ } else {
33648
+ const width = distributableWidth < 2 * fairDistributable ? distributableWidth : fairDistributable;
33649
+ ret.push(width);
33650
+ distributableWidth -= width;
33651
+ }
33652
+ }
33653
+ return ret;
33574
33654
  }
33575
- ret[i] = { width };
33576
- });
33577
- return ret;
33578
- }
33579
- function calculateColumnWidths(rows, terminalWidth) {
33580
- terminalWidth = Math.max(terminalWidth, 40);
33581
- const columns = rows[0].map((_, i) => Math.max(...rows.map((row) => (0, import_string_width.default)(String(row[i])))));
33582
- const contentWidth = terminalWidth - 2 - columns.length * 3;
33583
- if (sum(columns) <= contentWidth) {
33584
- return columns;
33585
- }
33586
- const fairShare = Math.min(contentWidth / columns.length);
33587
- const smallColumns = columns.filter((w) => w < fairShare);
33588
- let distributableWidth = contentWidth - sum(smallColumns);
33589
- const fairDistributable = Math.floor(distributableWidth / (columns.length - smallColumns.length));
33590
- const ret = new Array();
33591
- for (const requestedWidth of columns) {
33592
- if (requestedWidth < fairShare) {
33593
- ret.push(requestedWidth);
33594
- } else {
33595
- const width = distributableWidth < 2 * fairDistributable ? distributableWidth : fairDistributable;
33596
- ret.push(width);
33597
- distributableWidth -= width;
33655
+ function sum(xs) {
33656
+ let total = 0;
33657
+ for (const x of xs) {
33658
+ total += x;
33659
+ }
33660
+ return total;
33598
33661
  }
33599
- }
33600
- return ret;
33601
- }
33602
- function sum(xs) {
33603
- let total = 0;
33604
- for (const x of xs) {
33605
- total += x;
33606
- }
33607
- return total;
33608
- }
33609
- var chalk5, import_string_width, table, tableColor, TABLE_BORDER_CHARACTERS;
33610
- var init_format_table = __esm({
33611
- "../cloudformation-diff/lib/format-table.ts"() {
33612
- "use strict";
33613
- chalk5 = __toESM(require_source());
33614
- import_string_width = __toESM(require_string_width());
33615
- table = __toESM(require_src2());
33616
- tableColor = chalk5.gray;
33617
- TABLE_BORDER_CHARACTERS = {
33662
+ var tableColor = chalk3.gray;
33663
+ var TABLE_BORDER_CHARACTERS = {
33618
33664
  topBody: tableColor("\u2500"),
33619
33665
  topJoin: tableColor("\u252C"),
33620
33666
  topLeft: tableColor("\u250C"),
@@ -33634,9 +33680,9 @@ var init_format_table = __esm({
33634
33680
  }
33635
33681
  });
33636
33682
 
33637
- // ../../../node_modules/diff/lib/diff/base.js
33683
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/base.js
33638
33684
  var require_base = __commonJS({
33639
- "../../../node_modules/diff/lib/diff/base.js"(exports2) {
33685
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/base.js"(exports2) {
33640
33686
  "use strict";
33641
33687
  Object.defineProperty(exports2, "__esModule", {
33642
33688
  value: true
@@ -33883,9 +33929,9 @@ var require_base = __commonJS({
33883
33929
  }
33884
33930
  });
33885
33931
 
33886
- // ../../../node_modules/diff/lib/diff/character.js
33932
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/character.js
33887
33933
  var require_character = __commonJS({
33888
- "../../../node_modules/diff/lib/diff/character.js"(exports2) {
33934
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/character.js"(exports2) {
33889
33935
  "use strict";
33890
33936
  Object.defineProperty(exports2, "__esModule", {
33891
33937
  value: true
@@ -33909,9 +33955,9 @@ var require_character = __commonJS({
33909
33955
  }
33910
33956
  });
33911
33957
 
33912
- // ../../../node_modules/diff/lib/util/params.js
33958
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/util/params.js
33913
33959
  var require_params = __commonJS({
33914
- "../../../node_modules/diff/lib/util/params.js"(exports2) {
33960
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/util/params.js"(exports2) {
33915
33961
  "use strict";
33916
33962
  Object.defineProperty(exports2, "__esModule", {
33917
33963
  value: true
@@ -33932,9 +33978,9 @@ var require_params = __commonJS({
33932
33978
  }
33933
33979
  });
33934
33980
 
33935
- // ../../../node_modules/diff/lib/diff/word.js
33981
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/word.js
33936
33982
  var require_word = __commonJS({
33937
- "../../../node_modules/diff/lib/diff/word.js"(exports2) {
33983
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/word.js"(exports2) {
33938
33984
  "use strict";
33939
33985
  Object.defineProperty(exports2, "__esModule", {
33940
33986
  value: true
@@ -33989,9 +34035,9 @@ var require_word = __commonJS({
33989
34035
  }
33990
34036
  });
33991
34037
 
33992
- // ../../../node_modules/diff/lib/diff/line.js
34038
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/line.js
33993
34039
  var require_line = __commonJS({
33994
- "../../../node_modules/diff/lib/diff/line.js"(exports2) {
34040
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/line.js"(exports2) {
33995
34041
  "use strict";
33996
34042
  Object.defineProperty(exports2, "__esModule", {
33997
34043
  value: true
@@ -34049,9 +34095,9 @@ var require_line = __commonJS({
34049
34095
  }
34050
34096
  });
34051
34097
 
34052
- // ../../../node_modules/diff/lib/diff/sentence.js
34098
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/sentence.js
34053
34099
  var require_sentence = __commonJS({
34054
- "../../../node_modules/diff/lib/diff/sentence.js"(exports2) {
34100
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/sentence.js"(exports2) {
34055
34101
  "use strict";
34056
34102
  Object.defineProperty(exports2, "__esModule", {
34057
34103
  value: true
@@ -34078,9 +34124,9 @@ var require_sentence = __commonJS({
34078
34124
  }
34079
34125
  });
34080
34126
 
34081
- // ../../../node_modules/diff/lib/diff/css.js
34127
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/css.js
34082
34128
  var require_css = __commonJS({
34083
- "../../../node_modules/diff/lib/diff/css.js"(exports2) {
34129
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/css.js"(exports2) {
34084
34130
  "use strict";
34085
34131
  Object.defineProperty(exports2, "__esModule", {
34086
34132
  value: true
@@ -34107,9 +34153,9 @@ var require_css = __commonJS({
34107
34153
  }
34108
34154
  });
34109
34155
 
34110
- // ../../../node_modules/diff/lib/diff/json.js
34156
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/json.js
34111
34157
  var require_json2 = __commonJS({
34112
- "../../../node_modules/diff/lib/diff/json.js"(exports2) {
34158
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/json.js"(exports2) {
34113
34159
  "use strict";
34114
34160
  Object.defineProperty(exports2, "__esModule", {
34115
34161
  value: true
@@ -34229,9 +34275,9 @@ var require_json2 = __commonJS({
34229
34275
  }
34230
34276
  });
34231
34277
 
34232
- // ../../../node_modules/diff/lib/diff/array.js
34278
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/array.js
34233
34279
  var require_array = __commonJS({
34234
- "../../../node_modules/diff/lib/diff/array.js"(exports2) {
34280
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/array.js"(exports2) {
34235
34281
  "use strict";
34236
34282
  Object.defineProperty(exports2, "__esModule", {
34237
34283
  value: true
@@ -34261,9 +34307,9 @@ var require_array = __commonJS({
34261
34307
  }
34262
34308
  });
34263
34309
 
34264
- // ../../../node_modules/diff/lib/patch/parse.js
34310
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/parse.js
34265
34311
  var require_parse5 = __commonJS({
34266
- "../../../node_modules/diff/lib/patch/parse.js"(exports2) {
34312
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/parse.js"(exports2) {
34267
34313
  "use strict";
34268
34314
  Object.defineProperty(exports2, "__esModule", {
34269
34315
  value: true
@@ -34377,9 +34423,9 @@ var require_parse5 = __commonJS({
34377
34423
  }
34378
34424
  });
34379
34425
 
34380
- // ../../../node_modules/diff/lib/util/distance-iterator.js
34426
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/util/distance-iterator.js
34381
34427
  var require_distance_iterator = __commonJS({
34382
- "../../../node_modules/diff/lib/util/distance-iterator.js"(exports2) {
34428
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/util/distance-iterator.js"(exports2) {
34383
34429
  "use strict";
34384
34430
  Object.defineProperty(exports2, "__esModule", {
34385
34431
  value: true
@@ -34414,9 +34460,9 @@ var require_distance_iterator = __commonJS({
34414
34460
  }
34415
34461
  });
34416
34462
 
34417
- // ../../../node_modules/diff/lib/patch/apply.js
34463
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/apply.js
34418
34464
  var require_apply = __commonJS({
34419
- "../../../node_modules/diff/lib/patch/apply.js"(exports2) {
34465
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/apply.js"(exports2) {
34420
34466
  "use strict";
34421
34467
  Object.defineProperty(exports2, "__esModule", {
34422
34468
  value: true
@@ -34556,14 +34602,14 @@ var require_apply = __commonJS({
34556
34602
  }
34557
34603
  });
34558
34604
 
34559
- // ../../../node_modules/diff/lib/patch/create.js
34605
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/create.js
34560
34606
  var require_create = __commonJS({
34561
- "../../../node_modules/diff/lib/patch/create.js"(exports2) {
34607
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/create.js"(exports2) {
34562
34608
  "use strict";
34563
34609
  Object.defineProperty(exports2, "__esModule", {
34564
34610
  value: true
34565
34611
  });
34566
- exports2.structuredPatch = structuredPatch2;
34612
+ exports2.structuredPatch = structuredPatch;
34567
34613
  exports2.formatPatch = formatPatch;
34568
34614
  exports2.createTwoFilesPatch = createTwoFilesPatch;
34569
34615
  exports2.createPatch = createPatch;
@@ -34595,7 +34641,7 @@ var require_create = __commonJS({
34595
34641
  }
34596
34642
  return arr2;
34597
34643
  }
34598
- function structuredPatch2(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
34644
+ function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
34599
34645
  if (!options) {
34600
34646
  options = {};
34601
34647
  }
@@ -34748,7 +34794,7 @@ var require_create = __commonJS({
34748
34794
  return ret.join("\n") + "\n";
34749
34795
  }
34750
34796
  function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
34751
- return formatPatch(structuredPatch2(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));
34797
+ return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));
34752
34798
  }
34753
34799
  function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
34754
34800
  return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
@@ -34756,9 +34802,9 @@ var require_create = __commonJS({
34756
34802
  }
34757
34803
  });
34758
34804
 
34759
- // ../../../node_modules/diff/lib/util/array.js
34805
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/util/array.js
34760
34806
  var require_array2 = __commonJS({
34761
- "../../../node_modules/diff/lib/util/array.js"(exports2) {
34807
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/util/array.js"(exports2) {
34762
34808
  "use strict";
34763
34809
  Object.defineProperty(exports2, "__esModule", {
34764
34810
  value: true
@@ -34785,9 +34831,9 @@ var require_array2 = __commonJS({
34785
34831
  }
34786
34832
  });
34787
34833
 
34788
- // ../../../node_modules/diff/lib/patch/merge.js
34834
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/merge.js
34789
34835
  var require_merge = __commonJS({
34790
- "../../../node_modules/diff/lib/patch/merge.js"(exports2) {
34836
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/merge.js"(exports2) {
34791
34837
  "use strict";
34792
34838
  Object.defineProperty(exports2, "__esModule", {
34793
34839
  value: true
@@ -35208,9 +35254,9 @@ var require_merge = __commonJS({
35208
35254
  }
35209
35255
  });
35210
35256
 
35211
- // ../../../node_modules/diff/lib/patch/reverse.js
35257
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/reverse.js
35212
35258
  var require_reverse = __commonJS({
35213
- "../../../node_modules/diff/lib/patch/reverse.js"(exports2) {
35259
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/reverse.js"(exports2) {
35214
35260
  "use strict";
35215
35261
  Object.defineProperty(exports2, "__esModule", {
35216
35262
  value: true
@@ -35252,22 +35298,22 @@ var require_reverse = __commonJS({
35252
35298
  }
35253
35299
  return obj;
35254
35300
  }
35255
- function reversePatch(structuredPatch2) {
35256
- if (Array.isArray(structuredPatch2)) {
35257
- return structuredPatch2.map(reversePatch).reverse();
35301
+ function reversePatch(structuredPatch) {
35302
+ if (Array.isArray(structuredPatch)) {
35303
+ return structuredPatch.map(reversePatch).reverse();
35258
35304
  }
35259
35305
  return (
35260
35306
  /*istanbul ignore start*/
35261
35307
  _objectSpread(_objectSpread(
35262
35308
  {},
35263
35309
  /*istanbul ignore end*/
35264
- structuredPatch2
35310
+ structuredPatch
35265
35311
  ), {}, {
35266
- oldFileName: structuredPatch2.newFileName,
35267
- oldHeader: structuredPatch2.newHeader,
35268
- newFileName: structuredPatch2.oldFileName,
35269
- newHeader: structuredPatch2.oldHeader,
35270
- hunks: structuredPatch2.hunks.map(function(hunk) {
35312
+ oldFileName: structuredPatch.newFileName,
35313
+ oldHeader: structuredPatch.newHeader,
35314
+ newFileName: structuredPatch.oldFileName,
35315
+ newHeader: structuredPatch.oldHeader,
35316
+ hunks: structuredPatch.hunks.map(function(hunk) {
35271
35317
  return {
35272
35318
  oldLines: hunk.newLines,
35273
35319
  oldStart: hunk.newStart,
@@ -35303,9 +35349,9 @@ var require_reverse = __commonJS({
35303
35349
  }
35304
35350
  });
35305
35351
 
35306
- // ../../../node_modules/diff/lib/convert/dmp.js
35352
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/convert/dmp.js
35307
35353
  var require_dmp = __commonJS({
35308
- "../../../node_modules/diff/lib/convert/dmp.js"(exports2) {
35354
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/convert/dmp.js"(exports2) {
35309
35355
  "use strict";
35310
35356
  Object.defineProperty(exports2, "__esModule", {
35311
35357
  value: true
@@ -35329,9 +35375,9 @@ var require_dmp = __commonJS({
35329
35375
  }
35330
35376
  });
35331
35377
 
35332
- // ../../../node_modules/diff/lib/convert/xml.js
35378
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/convert/xml.js
35333
35379
  var require_xml = __commonJS({
35334
- "../../../node_modules/diff/lib/convert/xml.js"(exports2) {
35380
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/convert/xml.js"(exports2) {
35335
35381
  "use strict";
35336
35382
  Object.defineProperty(exports2, "__esModule", {
35337
35383
  value: true
@@ -35366,9 +35412,9 @@ var require_xml = __commonJS({
35366
35412
  }
35367
35413
  });
35368
35414
 
35369
- // ../../../node_modules/diff/lib/index.js
35415
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/index.js
35370
35416
  var require_lib10 = __commonJS({
35371
- "../../../node_modules/diff/lib/index.js"(exports2) {
35417
+ "../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/index.js"(exports2) {
35372
35418
  "use strict";
35373
35419
  Object.defineProperty(exports2, "__esModule", {
35374
35420
  value: true
@@ -35526,102 +35572,58 @@ var require_lib10 = __commonJS({
35526
35572
  }
35527
35573
  });
35528
35574
 
35529
- // ../cloudformation-diff/lib/format.ts
35530
- var format_exports = {};
35531
- __export(format_exports, {
35532
- Formatter: () => Formatter,
35533
- formatDifferences: () => formatDifferences,
35534
- formatSecurityChanges: () => formatSecurityChanges
35535
- });
35536
- function formatDifferences(stream, templateDiff, logicalToPathMap = {}, context = 3) {
35537
- const formatter = new Formatter(stream, logicalToPathMap, templateDiff, context);
35538
- if (templateDiff.awsTemplateFormatVersion || templateDiff.transform || templateDiff.description) {
35539
- formatter.printSectionHeader("Template");
35540
- formatter.formatDifference("AWSTemplateFormatVersion", "AWSTemplateFormatVersion", templateDiff.awsTemplateFormatVersion);
35541
- formatter.formatDifference("Transform", "Transform", templateDiff.transform);
35542
- formatter.formatDifference("Description", "Description", templateDiff.description);
35543
- formatter.printSectionFooter();
35544
- }
35545
- formatSecurityChangesWithBanner(formatter, templateDiff);
35546
- formatter.formatSection("Parameters", "Parameter", templateDiff.parameters);
35547
- formatter.formatSection("Metadata", "Metadata", templateDiff.metadata);
35548
- formatter.formatSection("Mappings", "Mapping", templateDiff.mappings);
35549
- formatter.formatSection("Conditions", "Condition", templateDiff.conditions);
35550
- formatter.formatSection("Resources", "Resource", templateDiff.resources, formatter.formatResourceDifference.bind(formatter));
35551
- formatter.formatSection("Outputs", "Output", templateDiff.outputs);
35552
- formatter.formatSection("Other Changes", "Unknown", templateDiff.unknown);
35553
- }
35554
- function formatSecurityChanges(stream, templateDiff, logicalToPathMap = {}, context) {
35555
- const formatter = new Formatter(stream, logicalToPathMap, templateDiff, context);
35556
- formatSecurityChangesWithBanner(formatter, templateDiff);
35557
- }
35558
- function formatSecurityChangesWithBanner(formatter, templateDiff) {
35559
- if (!templateDiff.iamChanges.hasChanges && !templateDiff.securityGroupChanges.hasChanges) {
35560
- return;
35561
- }
35562
- formatter.formatIamChanges(templateDiff.iamChanges);
35563
- formatter.formatSecurityGroupChanges(templateDiff.securityGroupChanges);
35564
- formatter.warning("(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299)");
35565
- formatter.printSectionFooter();
35566
- }
35567
- function _diffStrings(oldStr, newStr, context) {
35568
- const patch = structuredPatch(null, null, oldStr, newStr, null, null, { context });
35569
- const result = new Array();
35570
- for (const hunk of patch.hunks) {
35571
- result.push(chalk6.magenta(`@@ -${hunk.oldStart},${hunk.oldLines} +${hunk.newStart},${hunk.newLines} @@`));
35572
- const baseIndent = _findIndent(hunk.lines);
35573
- for (const line of hunk.lines) {
35574
- if (line === "\") {
35575
- continue;
35576
- }
35577
- const marker = line.charAt(0);
35578
- const text = line.slice(1 + baseIndent);
35579
- switch (marker) {
35580
- case " ":
35581
- result.push(`${CONTEXT} ${text}`);
35582
- break;
35583
- case "+":
35584
- result.push(chalk6.bold(`${ADDITION} ${chalk6.green(text)}`));
35585
- break;
35586
- case "-":
35587
- result.push(chalk6.bold(`${REMOVAL} ${chalk6.red(text)}`));
35588
- break;
35589
- default:
35590
- throw new Error(`Unexpected diff marker: ${marker} (full line: ${line})`);
35591
- }
35592
- }
35593
- }
35594
- return result;
35595
- function _findIndent(lines) {
35596
- let indent = Number.MAX_SAFE_INTEGER;
35597
- for (const line of lines) {
35598
- for (let i = 1; i < line.length; i++) {
35599
- if (line.charAt(i) !== " ") {
35600
- indent = indent > i - 1 ? i - 1 : indent;
35601
- break;
35602
- }
35575
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/format.js
35576
+ var require_format = __commonJS({
35577
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/format.js"(exports2) {
35578
+ "use strict";
35579
+ Object.defineProperty(exports2, "__esModule", { value: true });
35580
+ exports2.Formatter = void 0;
35581
+ exports2.formatDifferences = formatDifferences2;
35582
+ exports2.formatSecurityChanges = formatSecurityChanges;
35583
+ var util_1 = require("util");
35584
+ var chalk3 = require_source();
35585
+ var util_2 = require_util2();
35586
+ var diff_template_1 = require_diff_template();
35587
+ var format_table_1 = require_format_table();
35588
+ var PATH_METADATA_KEY2 = "aws:cdk:path";
35589
+ var { structuredPatch } = require_lib10();
35590
+ function formatDifferences2(stream, templateDiff, logicalToPathMap = {}, context = 3) {
35591
+ const formatter = new Formatter(stream, logicalToPathMap, templateDiff, context);
35592
+ if (templateDiff.awsTemplateFormatVersion || templateDiff.transform || templateDiff.description) {
35593
+ formatter.printSectionHeader("Template");
35594
+ formatter.formatDifference("AWSTemplateFormatVersion", "AWSTemplateFormatVersion", templateDiff.awsTemplateFormatVersion);
35595
+ formatter.formatDifference("Transform", "Transform", templateDiff.transform);
35596
+ formatter.formatDifference("Description", "Description", templateDiff.description);
35597
+ formatter.printSectionFooter();
35598
+ }
35599
+ formatSecurityChangesWithBanner(formatter, templateDiff);
35600
+ formatter.formatSection("Parameters", "Parameter", templateDiff.parameters);
35601
+ formatter.formatSection("Metadata", "Metadata", templateDiff.metadata);
35602
+ formatter.formatSection("Mappings", "Mapping", templateDiff.mappings);
35603
+ formatter.formatSection("Conditions", "Condition", templateDiff.conditions);
35604
+ formatter.formatSection("Resources", "Resource", templateDiff.resources, formatter.formatResourceDifference.bind(formatter));
35605
+ formatter.formatSection("Outputs", "Output", templateDiff.outputs);
35606
+ formatter.formatSection("Other Changes", "Unknown", templateDiff.unknown);
35607
+ }
35608
+ function formatSecurityChanges(stream, templateDiff, logicalToPathMap = {}, context) {
35609
+ const formatter = new Formatter(stream, logicalToPathMap, templateDiff, context);
35610
+ formatSecurityChangesWithBanner(formatter, templateDiff);
35611
+ }
35612
+ function formatSecurityChangesWithBanner(formatter, templateDiff) {
35613
+ if (!templateDiff.iamChanges.hasChanges && !templateDiff.securityGroupChanges.hasChanges) {
35614
+ return;
35603
35615
  }
35604
- }
35605
- return indent;
35606
- }
35607
- }
35608
- var import_util8, chalk6, PATH_METADATA_KEY2, structuredPatch, ADDITION, CONTEXT, UPDATE, REMOVAL, IMPORT, Formatter;
35609
- var init_format = __esm({
35610
- "../cloudformation-diff/lib/format.ts"() {
35611
- "use strict";
35612
- import_util8 = require("util");
35613
- chalk6 = __toESM(require_source());
35614
- init_util();
35615
- init_diff_template();
35616
- init_format_table();
35617
- PATH_METADATA_KEY2 = "aws:cdk:path";
35618
- ({ structuredPatch } = require_lib10());
35619
- ADDITION = chalk6.green("[+]");
35620
- CONTEXT = chalk6.grey("[ ]");
35621
- UPDATE = chalk6.yellow("[~]");
35622
- REMOVAL = chalk6.red("[-]");
35623
- IMPORT = chalk6.blue("[\u2190]");
35624
- Formatter = class {
35616
+ formatter.formatIamChanges(templateDiff.iamChanges);
35617
+ formatter.formatSecurityGroupChanges(templateDiff.securityGroupChanges);
35618
+ formatter.warning("(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299)");
35619
+ formatter.printSectionFooter();
35620
+ }
35621
+ var ADDITION = chalk3.green("[+]");
35622
+ var CONTEXT = chalk3.grey("[ ]");
35623
+ var UPDATE = chalk3.yellow("[~]");
35624
+ var REMOVAL = chalk3.red("[-]");
35625
+ var IMPORT = chalk3.blue("[\u2190]");
35626
+ var Formatter = class {
35625
35627
  constructor(stream, logicalToPathMap, diff, context = 3) {
35626
35628
  this.stream = stream;
35627
35629
  this.logicalToPathMap = logicalToPathMap;
@@ -35631,10 +35633,10 @@ var init_format = __esm({
35631
35633
  }
35632
35634
  }
35633
35635
  print(fmt, ...args) {
35634
- this.stream.write(chalk6.white((0, import_util8.format)(fmt, ...args)) + "\n");
35636
+ this.stream.write(chalk3.white((0, util_1.format)(fmt, ...args)) + "\n");
35635
35637
  }
35636
35638
  warning(fmt, ...args) {
35637
- this.stream.write(chalk6.yellow((0, import_util8.format)(fmt, ...args)) + "\n");
35639
+ this.stream.write(chalk3.yellow((0, util_1.format)(fmt, ...args)) + "\n");
35638
35640
  }
35639
35641
  formatSection(title, entryType, collection, formatter = this.formatDifference.bind(this)) {
35640
35642
  if (collection.differenceCount === 0) {
@@ -35645,7 +35647,7 @@ var init_format = __esm({
35645
35647
  this.printSectionFooter();
35646
35648
  }
35647
35649
  printSectionHeader(title) {
35648
- this.print(chalk6.underline(chalk6.bold(title)));
35650
+ this.print(chalk3.underline(chalk3.bold(title)));
35649
35651
  }
35650
35652
  printSectionFooter() {
35651
35653
  this.print("");
@@ -35661,8 +35663,8 @@ var init_format = __esm({
35661
35663
  return;
35662
35664
  }
35663
35665
  let value;
35664
- const oldValue = this.formatValue(diff.oldValue, chalk6.red);
35665
- const newValue = this.formatValue(diff.newValue, chalk6.green);
35666
+ const oldValue = this.formatValue(diff.oldValue, chalk3.red);
35667
+ const newValue = this.formatValue(diff.newValue, chalk3.green);
35666
35668
  if (diff.isAddition) {
35667
35669
  value = newValue;
35668
35670
  } else if (diff.isUpdate) {
@@ -35670,7 +35672,7 @@ var init_format = __esm({
35670
35672
  } else if (diff.isRemoval) {
35671
35673
  value = oldValue;
35672
35674
  }
35673
- this.print(`${this.formatPrefix(diff)} ${chalk6.cyan(type)} ${this.formatLogicalId(logicalId)}: ${value}`);
35675
+ this.print(`${this.formatPrefix(diff)} ${chalk3.cyan(type)} ${this.formatLogicalId(logicalId)}: ${value}`);
35674
35676
  }
35675
35677
  /**
35676
35678
  * Print a resource difference for a given logical ID.
@@ -35683,7 +35685,7 @@ var init_format = __esm({
35683
35685
  return;
35684
35686
  }
35685
35687
  const resourceType = diff.isRemoval ? diff.oldResourceType : diff.newResourceType;
35686
- this.print(`${this.formatResourcePrefix(diff)} ${this.formatValue(resourceType, chalk6.cyan)} ${this.formatLogicalId(logicalId)} ${this.formatImpact(diff.changeImpact)}`.trimEnd());
35688
+ this.print(`${this.formatResourcePrefix(diff)} ${this.formatValue(resourceType, chalk3.cyan)} ${this.formatLogicalId(logicalId)} ${this.formatImpact(diff.changeImpact)}`.trimEnd());
35687
35689
  if (diff.isUpdate) {
35688
35690
  const differenceCount = diff.differenceCount;
35689
35691
  let processedCount = 0;
@@ -35709,7 +35711,7 @@ var init_format = __esm({
35709
35711
  if (diff.isRemoval) {
35710
35712
  return REMOVAL;
35711
35713
  }
35712
- return chalk6.white("[?]");
35714
+ return chalk3.white("[?]");
35713
35715
  }
35714
35716
  /**
35715
35717
  * @param value the value to be formatted.
@@ -35732,19 +35734,19 @@ var init_format = __esm({
35732
35734
  */
35733
35735
  formatImpact(impact) {
35734
35736
  switch (impact) {
35735
- case "MAY_REPLACE" /* MAY_REPLACE */:
35736
- return chalk6.italic(chalk6.yellow("may be replaced"));
35737
- case "WILL_REPLACE" /* WILL_REPLACE */:
35738
- return chalk6.italic(chalk6.bold(chalk6.red("replace")));
35739
- case "WILL_DESTROY" /* WILL_DESTROY */:
35740
- return chalk6.italic(chalk6.bold(chalk6.red("destroy")));
35741
- case "WILL_ORPHAN" /* WILL_ORPHAN */:
35742
- return chalk6.italic(chalk6.yellow("orphan"));
35743
- case "WILL_IMPORT" /* WILL_IMPORT */:
35744
- return chalk6.italic(chalk6.blue("import"));
35745
- case "WILL_UPDATE" /* WILL_UPDATE */:
35746
- case "WILL_CREATE" /* WILL_CREATE */:
35747
- case "NO_CHANGE" /* NO_CHANGE */:
35737
+ case diff_template_1.ResourceImpact.MAY_REPLACE:
35738
+ return chalk3.italic(chalk3.yellow("may be replaced"));
35739
+ case diff_template_1.ResourceImpact.WILL_REPLACE:
35740
+ return chalk3.italic(chalk3.bold(chalk3.red("replace")));
35741
+ case diff_template_1.ResourceImpact.WILL_DESTROY:
35742
+ return chalk3.italic(chalk3.bold(chalk3.red("destroy")));
35743
+ case diff_template_1.ResourceImpact.WILL_ORPHAN:
35744
+ return chalk3.italic(chalk3.yellow("orphan"));
35745
+ case diff_template_1.ResourceImpact.WILL_IMPORT:
35746
+ return chalk3.italic(chalk3.blue("import"));
35747
+ case diff_template_1.ResourceImpact.WILL_UPDATE:
35748
+ case diff_template_1.ResourceImpact.WILL_CREATE:
35749
+ case diff_template_1.ResourceImpact.NO_CHANGE:
35748
35750
  return "";
35749
35751
  }
35750
35752
  }
@@ -35756,10 +35758,10 @@ var init_format = __esm({
35756
35758
  */
35757
35759
  formatTreeDiff(name, diff, last) {
35758
35760
  let additionalInfo = "";
35759
- if (isPropertyDifference(diff)) {
35760
- if (diff.changeImpact === "MAY_REPLACE" /* MAY_REPLACE */) {
35761
+ if ((0, diff_template_1.isPropertyDifference)(diff)) {
35762
+ if (diff.changeImpact === diff_template_1.ResourceImpact.MAY_REPLACE) {
35761
35763
  additionalInfo = " (may cause replacement)";
35762
- } else if (diff.changeImpact === "WILL_REPLACE" /* WILL_REPLACE */) {
35764
+ } else if (diff.changeImpact === diff_template_1.ResourceImpact.WILL_REPLACE) {
35763
35765
  additionalInfo = " (requires replacement)";
35764
35766
  }
35765
35767
  }
@@ -35785,31 +35787,31 @@ var init_format = __esm({
35785
35787
  this.print("%s %s %s", linePrefix, i === 0 ? "\u2514\u2500" : " ", diff[i]);
35786
35788
  }
35787
35789
  } else {
35788
- this.print("%s \u251C\u2500 %s %s", linePrefix, REMOVAL, this.formatValue(oldObject, chalk6.red));
35789
- this.print("%s \u2514\u2500 %s %s", linePrefix, ADDITION, this.formatValue(newObject, chalk6.green));
35790
+ this.print("%s \u251C\u2500 %s %s", linePrefix, REMOVAL, this.formatValue(oldObject, chalk3.red));
35791
+ this.print("%s \u2514\u2500 %s %s", linePrefix, ADDITION, this.formatValue(newObject, chalk3.green));
35790
35792
  }
35791
35793
  } else if (oldObject !== void 0) {
35792
- this.print("%s \u2514\u2500 %s", linePrefix, this.formatValue(oldObject, chalk6.red));
35794
+ this.print("%s \u2514\u2500 %s", linePrefix, this.formatValue(oldObject, chalk3.red));
35793
35795
  } else {
35794
- this.print("%s \u2514\u2500 %s", linePrefix, this.formatValue(newObject, chalk6.green));
35796
+ this.print("%s \u2514\u2500 %s", linePrefix, this.formatValue(newObject, chalk3.green));
35795
35797
  }
35796
35798
  return;
35797
35799
  }
35798
35800
  const keySet = new Set(Object.keys(oldObject));
35799
35801
  Object.keys(newObject).forEach((k) => keySet.add(k));
35800
- const keys = new Array(...keySet).filter((k) => !deepEqual(oldObject[k], newObject[k])).sort();
35802
+ const keys = new Array(...keySet).filter((k) => !(0, util_2.deepEqual)(oldObject[k], newObject[k])).sort();
35801
35803
  const lastKey = keys[keys.length - 1];
35802
35804
  for (const key of keys) {
35803
35805
  const oldValue = oldObject[key];
35804
35806
  const newValue = newObject[key];
35805
35807
  const treePrefix = key === lastKey ? "\u2514" : "\u251C";
35806
35808
  if (oldValue !== void 0 && newValue !== void 0) {
35807
- this.print("%s %s\u2500 %s %s:", linePrefix, treePrefix, this.changeTag(oldValue, newValue), chalk6.blue(`.${key}`));
35809
+ this.print("%s %s\u2500 %s %s:", linePrefix, treePrefix, this.changeTag(oldValue, newValue), chalk3.blue(`.${key}`));
35808
35810
  this.formatObjectDiff(oldValue, newValue, `${linePrefix} ${key === lastKey ? " " : "\u2502"}`);
35809
35811
  } else if (oldValue !== void 0) {
35810
- this.print("%s %s\u2500 %s Removed: %s", linePrefix, treePrefix, REMOVAL, chalk6.blue(`.${key}`));
35812
+ this.print("%s %s\u2500 %s Removed: %s", linePrefix, treePrefix, REMOVAL, chalk3.blue(`.${key}`));
35811
35813
  } else {
35812
- this.print("%s %s\u2500 %s Added: %s", linePrefix, treePrefix, ADDITION, chalk6.blue(`.${key}`));
35814
+ this.print("%s %s\u2500 %s Added: %s", linePrefix, treePrefix, ADDITION, chalk3.blue(`.${key}`));
35813
35815
  }
35814
35816
  }
35815
35817
  }
@@ -35854,7 +35856,7 @@ var init_format = __esm({
35854
35856
  formatLogicalId(logicalId) {
35855
35857
  const normalized = this.normalizedLogicalIdPath(logicalId);
35856
35858
  if (normalized) {
35857
- return `${normalized} ${chalk6.gray(logicalId)}`;
35859
+ return `${normalized} ${chalk3.gray(logicalId)}`;
35858
35860
  }
35859
35861
  return logicalId;
35860
35862
  }
@@ -35885,22 +35887,22 @@ var init_format = __esm({
35885
35887
  }
35886
35888
  if (changes.statements.hasChanges) {
35887
35889
  this.printSectionHeader("IAM Statement Changes");
35888
- this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarizeStatements()), this.stream.columns));
35890
+ this.print((0, format_table_1.formatTable)(this.deepSubstituteBracedLogicalIds(changes.summarizeStatements()), this.stream.columns));
35889
35891
  }
35890
35892
  if (changes.managedPolicies.hasChanges) {
35891
35893
  this.printSectionHeader("IAM Policy Changes");
35892
- this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarizeManagedPolicies()), this.stream.columns));
35894
+ this.print((0, format_table_1.formatTable)(this.deepSubstituteBracedLogicalIds(changes.summarizeManagedPolicies()), this.stream.columns));
35893
35895
  }
35894
35896
  if (changes.ssoPermissionSets.hasChanges || changes.ssoInstanceACAConfigs.hasChanges || changes.ssoAssignments.hasChanges) {
35895
35897
  this.printSectionHeader("IAM Identity Center Changes");
35896
35898
  if (changes.ssoPermissionSets.hasChanges) {
35897
- this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarizeSsoPermissionSets()), this.stream.columns));
35899
+ this.print((0, format_table_1.formatTable)(this.deepSubstituteBracedLogicalIds(changes.summarizeSsoPermissionSets()), this.stream.columns));
35898
35900
  }
35899
35901
  if (changes.ssoInstanceACAConfigs.hasChanges) {
35900
- this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarizeSsoInstanceACAConfigs()), this.stream.columns));
35902
+ this.print((0, format_table_1.formatTable)(this.deepSubstituteBracedLogicalIds(changes.summarizeSsoInstanceACAConfigs()), this.stream.columns));
35901
35903
  }
35902
35904
  if (changes.ssoAssignments.hasChanges) {
35903
- this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarizeSsoAssignments()), this.stream.columns));
35905
+ this.print((0, format_table_1.formatTable)(this.deepSubstituteBracedLogicalIds(changes.summarizeSsoAssignments()), this.stream.columns));
35904
35906
  }
35905
35907
  }
35906
35908
  }
@@ -35909,7 +35911,7 @@ var init_format = __esm({
35909
35911
  return;
35910
35912
  }
35911
35913
  this.printSectionHeader("Security Group Changes");
35912
- this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarize()), this.stream.columns));
35914
+ this.print((0, format_table_1.formatTable)(this.deepSubstituteBracedLogicalIds(changes.summarize()), this.stream.columns));
35913
35915
  }
35914
35916
  deepSubstituteBracedLogicalIds(rows) {
35915
35917
  return rows.map((row) => row.map(this.substituteBracedLogicalIds.bind(this)));
@@ -35923,12 +35925,54 @@ var init_format = __esm({
35923
35925
  });
35924
35926
  }
35925
35927
  };
35928
+ exports2.Formatter = Formatter;
35929
+ function _diffStrings(oldStr, newStr, context) {
35930
+ const patch = structuredPatch(null, null, oldStr, newStr, null, null, { context });
35931
+ const result = new Array();
35932
+ for (const hunk of patch.hunks) {
35933
+ result.push(chalk3.magenta(`@@ -${hunk.oldStart},${hunk.oldLines} +${hunk.newStart},${hunk.newLines} @@`));
35934
+ const baseIndent = _findIndent(hunk.lines);
35935
+ for (const line of hunk.lines) {
35936
+ if (line === "\") {
35937
+ continue;
35938
+ }
35939
+ const marker = line.charAt(0);
35940
+ const text = line.slice(1 + baseIndent);
35941
+ switch (marker) {
35942
+ case " ":
35943
+ result.push(`${CONTEXT} ${text}`);
35944
+ break;
35945
+ case "+":
35946
+ result.push(chalk3.bold(`${ADDITION} ${chalk3.green(text)}`));
35947
+ break;
35948
+ case "-":
35949
+ result.push(chalk3.bold(`${REMOVAL} ${chalk3.red(text)}`));
35950
+ break;
35951
+ default:
35952
+ throw new Error(`Unexpected diff marker: ${marker} (full line: ${line})`);
35953
+ }
35954
+ }
35955
+ }
35956
+ return result;
35957
+ function _findIndent(lines) {
35958
+ let indent = Number.MAX_SAFE_INTEGER;
35959
+ for (const line of lines) {
35960
+ for (let i = 1; i < line.length; i++) {
35961
+ if (line.charAt(i) !== " ") {
35962
+ indent = indent > i - 1 ? i - 1 : indent;
35963
+ break;
35964
+ }
35965
+ }
35966
+ }
35967
+ return indent;
35968
+ }
35969
+ }
35926
35970
  }
35927
35971
  });
35928
35972
 
35929
- // ../cloudformation-diff/lib/index.js
35973
+ // ../../../node_modules/@aws-cdk/cloudformation-diff/lib/index.js
35930
35974
  var require_lib11 = __commonJS({
35931
- "../cloudformation-diff/lib/index.js"(exports2) {
35975
+ "../../../node_modules/@aws-cdk/cloudformation-diff/lib/index.js"(exports2) {
35932
35976
  "use strict";
35933
35977
  var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
35934
35978
  if (k2 === void 0) k2 = k;
@@ -35948,10 +35992,10 @@ var require_lib11 = __commonJS({
35948
35992
  };
35949
35993
  Object.defineProperty(exports2, "__esModule", { value: true });
35950
35994
  exports2.mangleLikeCloudFormation = exports2.deepEqual = void 0;
35951
- __exportStar2((init_diff_template(), __toCommonJS(diff_template_exports)), exports2);
35952
- __exportStar2((init_format(), __toCommonJS(format_exports)), exports2);
35953
- __exportStar2((init_format_table(), __toCommonJS(format_table_exports)), exports2);
35954
- var util_1 = (init_util(), __toCommonJS(util_exports));
35995
+ __exportStar2(require_diff_template(), exports2);
35996
+ __exportStar2(require_format(), exports2);
35997
+ __exportStar2(require_format_table(), exports2);
35998
+ var util_1 = require_util2();
35955
35999
  Object.defineProperty(exports2, "deepEqual", { enumerable: true, get: function() {
35956
36000
  return util_1.deepEqual;
35957
36001
  } });