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