@go-to-k/cdkd 0.307.0 → 0.308.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.
@@ -2,7 +2,7 @@ import { c as __exportAll, r as getAwsClients } from "./aws-clients-Bu9EMILF.js"
2
2
  import { A as isNameGeneration, B as SECRET_REF_MAX_CODE_POINTS, D as getCurrentStackInstanceId, E as getCurrentSkipPrefix, F as withSkipPrefix, G as displayAwsMessage, H as UNRENDERABLE, I as withStackScope, J as displayStackName, K as displayIdent, L as withStackScopeBeforeStateRead, N as stackInstanceNameSuffix, O as getCurrentStackName, P as withNameGeneration, Q as safeMsg, R as withoutGeneratedFallbackName, S as fallbackNamePropertyFor, T as generatedNameFor, U as asIsMessage, V as STACK_REF_MAX_CODE_POINTS, Y as isPasteableIdent, Z as plainIdentOr, a as safeStringify$1, c as isStdoutReservedForPayload, et as terminalSafe, f as currentLogLineMasker, j as looksLikeCdkdGeneratedName, m as getLiveRenderer, n as describeAwsFailure, p as installLogLineMaskerSource, q as displaySafe, s as getLogger, t as VERBOSE_POINTER, tt as truncateCodePoints, v as applyDefaultNameForFallback, w as generateResourceNameWithFallback, x as explicitNamePropertyFor, y as currentNameGeneration, z as SAFE_MSG_ALTERED_CHAR } from "./aws-failure-text-NSBdKPYK.js";
3
3
  import { $n as isUpdateUnsupportedError, An as StateError, At as carryCreatedBeforeFailure, B as compensateProtectionFlip, Bn as UNSHOWABLE_VALUE, Bt as replayMadeAnotherResource, Cr as markNonRetryable, Ct as createMaskedLogSinks, D as markNotGone, Dn as ResourceUpdateNotSupportedError, Dt as maskerOrIdentity, E as isMarkedNotGone, En as ResourceTimeoutError, Et as maskDeep, F as refusalTypeShown, Fn as normalizeAwsError, Ft as isAuxiliaryFailure, Gn as physicalIdShownBesideCommand, Gt as formatLockExpiry, H as deleteWithProtectionCompensation, Ht as buildForceUnlockCommand, It as isAuxiliaryMarkOf, J as observeThenDisableProtection, Jn as shellBoundedDisplay, Jt as recoveryCommandFlags, K as isTerminalDeleteFailure, Kn as plainOrDescribed, Kt as formatLockOperation, L as resolveExplicitPhysicalId, Lt as markAuxiliaryFailure, M as isQuotableImportValue, Mt as createdBeforeFailure, N as normalizeAwsTagsToCfn, Nt as createdResourceIdentityBeforeFailure, O as assertRegionMatch, Ot as withDerivedNameMasks, P as quotedRemedyLogicalId, Pn as isSoftAbort, Pt as hasCreatedBeforeFailure, Qt as injectiveKey, Rn as SHELL_ACTIVE, Rt as markCreatedBeforeFailure, Sn as MalformedProducerRecordRefusalError, Sr as isThrottlingError, St as stateOrphanRecordRemedy, T as RESOURCE_NOT_FOUND, Tn as ProvisioningError, Tr as wrapMaskedAwsError, Tt as isSecretDerivedValue, Un as isInertUnquoted, Vn as commandHole, Vt as UNREPRODUCIBLE_LOCK_CLAUSE, Wn as pasteableCommand, Xn as withheldTargetClause, Xt as CUSTOM_RESOURCE_RESPONSE_PREFIX, Y as protectionFlipKey, Yn as shellQuote, Yt as sanitizeRecoveryValue, Z as runDeleteAttempt, Zt as DEFAULT_STATE_PREFIX, _n as IntrinsicResolutionRefusalError, _r as isRetryableTransientError, an as ambientCredentialConfig, at as protectedReplacementAdvice, bn as LockError, bt as resourceTypeShown, cn as AccountIdUnavailableError, cr as escapeRegExp$3, ct as monotonicNowMs, d as prepareRemovalForUpdate, er as hasReplayMayCollide, et as DELETION_PROTECTION_DOC_POINTER, f as removalWarning, fn as CrossAccountSecretRefusalError, fr as formatRetryClassificationSignals, ft as isInterruptedWaitError, gn as DynamicReferenceRegionAmbiguousError, gr as isIamPropagationError, gt as compositeIdSeparatorRefusal, hn as DeploymentNotApprovedError, i as holdsSecretDerivedEntry, in as ambientClientDefaults, ir as isReplayedNameCollisionFrom, it as pasteableAwsCommand, jn as SynthesisError, kt as RETRY_AUXILIARY_OWNER, l as withUnchangedSecretPrincipalLists, ln as AssetError, lr as stripControlChars, m as withoutInjectedRemovals, mr as isAmbiguousOutcomeError, mt as canonicalizeRoute53QueryName, nr as isNameCooldownError, on as clientDefaultsFor, or as markReplayMayCollide, pn as DependencyError, pr as isAmbiguousCcHandlerErrorCode, pt as startInterruptWatch, qn as quotedOrDescribed, qt as formatLockOwner, rn as withPasteableAwsProfile, rr as isRecreateRetryableError, sn as credentialFingerprint, sr as relayedNameCollision, st as ElapsedBudgetRegistry, tn as producerRecordKey, tr as isNameCollisionErrorFrom, un as CdkdError, vr as isTransientServerError, vt as logicalIdShown, w as withoutServerErrorRetries, wr as markRedactedCause, wt as createMaskedRetryLogger, xn as MacroExpansionError, xr as isMarkedNonRetryable, xt as segmentAfterAnchor, yr as retryClassificationText, z as ProtectionFlipRegistry, zn as SHELL_ACTIVE_WHY } from "./iam-policy-targets-TFGunWmV.js";
4
4
  import { a as setAssumedRoleCredentials, c as ambientRegion, i as getPreAssumeEnvCredentials, n as awsClientDefaults, o as setPreAssumeEnvCredentials, r as getAssumedRoleCredentials, s as quietS3Logger, t as SECOND_ROLE_PUBLISH_REFUSAL } from "./aws-client-defaults-BX9Y_fKp.js";
5
- import { t as getCdkdVersion } from "./version-Dhhyrf1v.js";
5
+ import { t as getCdkdVersion } from "./version-DzajQDkv.js";
6
6
  import { createHash, randomUUID } from "node:crypto";
7
7
  import { AsyncLocalStorage } from "node:async_hooks";
8
8
  import { CreateBucketCommand, DeleteObjectCommand, DeleteObjectsCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketReplicationCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchKey, PutBucketEncryptionCommand, PutBucketLifecycleConfigurationCommand, PutBucketPolicyCommand, PutObjectCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
@@ -11,7 +11,7 @@ import { PublishCommand, SNSClient } from "@aws-sdk/client-sns";
11
11
  import { GetFunctionCommand, GetFunctionConfigurationCommand, GetFunctionUrlConfigCommand, InvokeCommand, LambdaClient, UpdateFunctionConfigurationCommand, waitUntilFunctionActiveV2, waitUntilFunctionUpdatedV2 } from "@aws-sdk/client-lambda";
12
12
  import { AssumeRoleCommand, GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
13
13
  import { CreateSnapshotCommand, DeleteVolumeCommand, DescribeAvailabilityZonesCommand, DescribeImagesCommand, DescribeInstanceAttributeCommand, DescribeInstancesCommand, DescribeLaunchTemplatesCommand, DescribeNatGatewaysCommand, DescribeRouteTablesCommand, DescribeSecurityGroupsCommand, DescribeSnapshotsCommand, DescribeSubnetsCommand, DescribeVolumesCommand, DescribeVpcsCommand, DescribeVpnGatewaysCommand, EC2Client, ModifyInstanceAttributeCommand } from "@aws-sdk/client-ec2";
14
- import { CreateTableCommand, DeleteTableCommand, DescribeContinuousBackupsCommand, DescribeContributorInsightsCommand, DescribeKinesisStreamingDestinationCommand, DescribeTableCommand, DescribeTimeToLiveCommand, DynamoDBClient, ListTagsOfResourceCommand, ResourceNotFoundException as ResourceNotFoundException$1, TagResourceCommand as TagResourceCommand$2, UntagResourceCommand as UntagResourceCommand$2, UpdateTableCommand, UpdateTimeToLiveCommand } from "@aws-sdk/client-dynamodb";
14
+ import { CreateTableCommand, DeleteResourcePolicyCommand, DeleteTableCommand, DescribeContinuousBackupsCommand, DescribeContributorInsightsCommand, DescribeKinesisStreamingDestinationCommand, DescribeTableCommand, DescribeTimeToLiveCommand, DisableKinesisStreamingDestinationCommand, DynamoDBClient, EnableKinesisStreamingDestinationCommand, GetResourcePolicyCommand, ListTagsOfResourceCommand, PolicyNotFoundException, PutResourcePolicyCommand, ResourceNotFoundException as ResourceNotFoundException$1, TagResourceCommand as TagResourceCommand$2, UntagResourceCommand as UntagResourceCommand$2, UpdateContinuousBackupsCommand, UpdateContributorInsightsCommand, UpdateKinesisStreamingDestinationCommand, UpdateTableCommand, UpdateTimeToLiveCommand } from "@aws-sdk/client-dynamodb";
15
15
  import { CloudFormationClient, CreateChangeSetCommand, DeleteStackCommand, DescribeChangeSetCommand, DescribeStacksCommand, DescribeTypeCommand, GetTemplateCommand, ListExportsCommand, waitUntilChangeSetCreateComplete } from "@aws-sdk/client-cloudformation";
16
16
  import { GetRestApiCommand } from "@aws-sdk/client-api-gateway";
17
17
  import { DescribeApiDestinationCommand, DescribeConnectionCommand } from "@aws-sdk/client-eventbridge";
@@ -7845,7 +7845,7 @@ const WHOLE_DYNAMIC_REFERENCE_PATTERN = new RegExp(`^\\{\\{resolve:${DYNAMIC_REF
7845
7845
  function isSingleDynamicReferenceToken(value) {
7846
7846
  return WHOLE_DYNAMIC_REFERENCE_PATTERN.test(value);
7847
7847
  }
7848
- function isPlainObject$7(value) {
7848
+ function isPlainObject$9(value) {
7849
7849
  return value !== null && typeof value === "object" && !Array.isArray(value);
7850
7850
  }
7851
7851
 
@@ -8101,7 +8101,7 @@ function crossStackSourceKey(source) {
8101
8101
  }
8102
8102
  if (key === "Fn::GetStackOutput") {
8103
8103
  const args = source[key];
8104
- if (!isPlainObject$7(args)) return void 0;
8104
+ if (!isPlainObject$9(args)) return void 0;
8105
8105
  const stackName = Object.hasOwn(args, "StackName") ? literalStringOrUndefined(args["StackName"]) : void 0;
8106
8106
  const outputName = Object.hasOwn(args, "OutputName") ? literalStringOrUndefined(args["OutputName"]) : void 0;
8107
8107
  if (stackName === void 0 || outputName === void 0) return void 0;
@@ -8147,7 +8147,7 @@ function crossStackSourceKey(source) {
8147
8147
  let template;
8148
8148
  let variables;
8149
8149
  if (typeof raw === "string") template = raw;
8150
- else if (Array.isArray(raw) && raw.length === 2 && isPlainObject$7(raw[1])) {
8150
+ else if (Array.isArray(raw) && raw.length === 2 && isPlainObject$9(raw[1])) {
8151
8151
  if (typeof raw[0] !== "string") return void 0;
8152
8152
  template = raw[0];
8153
8153
  variables = raw[1];
@@ -8441,12 +8441,12 @@ const UNFRAMED_SPELLING = Symbol("cdkd.nested-parameter.unframed-spelling");
8441
8441
  function recordNestedStackParameterExpressions(secrets, resourceType, resolvedProperties, sourceProperties, provenance = "template-derived") {
8442
8442
  if (resourceType !== NESTED_STACK_RESOURCE_TYPE$4) return;
8443
8443
  if (secrets.size === 0) return;
8444
- if (!isPlainObject$7(resolvedProperties) || !isPlainObject$7(sourceProperties)) return;
8444
+ if (!isPlainObject$9(resolvedProperties) || !isPlainObject$9(sourceProperties)) return;
8445
8445
  if (!Object.hasOwn(resolvedProperties, "Parameters")) return;
8446
8446
  if (!Object.hasOwn(sourceProperties, "Parameters")) return;
8447
8447
  const resolvedParameters = resolvedProperties["Parameters"];
8448
8448
  const sourceParameters = sourceProperties["Parameters"];
8449
- if (!isPlainObject$7(resolvedParameters) || !isPlainObject$7(sourceParameters)) return;
8449
+ if (!isPlainObject$9(resolvedParameters) || !isPlainObject$9(sourceParameters)) return;
8450
8450
  const positioned = redactAtProvenance({ ...resolvedParameters }, secrets, sourceParameters, provenance, true);
8451
8451
  let table = nestedStackParameterExpressions.get(secrets);
8452
8452
  for (const [name, resolvedValue] of Object.entries(resolvedParameters)) {
@@ -8495,7 +8495,7 @@ function recordNestedStackParameterExpressions(secrets, resourceType, resolvedPr
8495
8495
  if (typeof resolvedValue !== "string") return void 0;
8496
8496
  const sourceLeaf = sourceParameters[name];
8497
8497
  if (typeof sourceLeaf === "string") return sourceLeaf;
8498
- if (!isPlainObject$7(sourceLeaf)) return void 0;
8498
+ if (!isPlainObject$9(sourceLeaf)) return void 0;
8499
8499
  const written = positioned[name];
8500
8500
  if (typeof written !== "string") return void 0;
8501
8501
  const rendered = intrinsicSkeletonSegments(sourceLeaf)?.map((s) => s === UNKNOWN_PART ? "\0" : s).join("");
@@ -8832,7 +8832,7 @@ function evaluatePureRead(node, bind, pseudo, split, choose, depth = 0) {
8832
8832
  }
8833
8833
  return { value: out };
8834
8834
  }
8835
- if (!isPlainObject$7(node)) return void 0;
8835
+ if (!isPlainObject$9(node)) return void 0;
8836
8836
  const keys = Object.keys(node);
8837
8837
  if (keys.length !== 1) return void 0;
8838
8838
  const key = keys[0];
@@ -8873,7 +8873,7 @@ function evaluatePureRead(node, bind, pseudo, split, choose, depth = 0) {
8873
8873
  }
8874
8874
  function evaluatePureSub(args, bind, pseudo, evaluate) {
8875
8875
  const [text, variables] = typeof args === "string" ? [args, {}] : Array.isArray(args) && args.length === 2 ? [args[0], args[1]] : [void 0, void 0];
8876
- if (typeof text !== "string" || text.includes("{{resolve:") || !isPlainObject$7(variables)) return;
8876
+ if (typeof text !== "string" || text.includes("{{resolve:") || !isPlainObject$9(variables)) return;
8877
8877
  const bound = /* @__PURE__ */ new Map();
8878
8878
  for (const [name, variable] of Object.entries(variables)) {
8879
8879
  const evaluated = evaluate(variable);
@@ -8906,7 +8906,7 @@ function bindReadName(name, bind, pseudo) {
8906
8906
  function collectRereadConditions(node, names, depth = 0) {
8907
8907
  if (depth > MAX_REREAD_DEPTH) return false;
8908
8908
  if (Array.isArray(node)) return node.every((element) => collectRereadConditions(element, names, depth + 1));
8909
- if (!isPlainObject$7(node)) return true;
8909
+ if (!isPlainObject$9(node)) return true;
8910
8910
  if (Object.hasOwn(node, "Fn::If")) {
8911
8911
  const args = node["Fn::If"];
8912
8912
  if (!Array.isArray(args) || typeof args[0] !== "string") return false;
@@ -8917,7 +8917,7 @@ function collectRereadConditions(node, names, depth = 0) {
8917
8917
  function holdsRereadTrigger(node, depth = 0) {
8918
8918
  if (depth > MAX_REREAD_DEPTH) return false;
8919
8919
  if (Array.isArray(node)) return node.some((element) => holdsRereadTrigger(element, depth + 1));
8920
- if (!isPlainObject$7(node)) return false;
8920
+ if (!isPlainObject$9(node)) return false;
8921
8921
  return Object.entries(node).some(([key, child]) => REREAD_TRIGGERS.has(key) || holdsRereadTrigger(child, depth + 1));
8922
8922
  }
8923
8923
  function rendersReadTo(spelling, parentSecrets, value) {
@@ -8960,7 +8960,7 @@ function namesParameterOnBranches(node, choose, isParameter, depth = 0) {
8960
8960
  if (depth > MAX_REREAD_DEPTH) return true;
8961
8961
  if (typeof node === "string") return node.includes("{{resolve:");
8962
8962
  if (Array.isArray(node)) return node.some((element) => namesParameterOnBranches(element, choose, isParameter, depth + 1));
8963
- if (!isPlainObject$7(node)) return false;
8963
+ if (!isPlainObject$9(node)) return false;
8964
8964
  if (Object.hasOwn(node, "Fn::If")) {
8965
8965
  const args = node["Fn::If"];
8966
8966
  if (Object.keys(node).length !== 1) return true;
@@ -9073,7 +9073,7 @@ function appendValuePlaceholderParts(value, out, budget, depth) {
9073
9073
  if (budget.exhausted) return;
9074
9074
  const literal = joinPartLiteralText(value);
9075
9075
  if (literal !== void 0) return pushPlaceholderPart(out, literal, budget);
9076
- if (isPlainObject$7(value) && Object.keys(value).length === 1) {
9076
+ if (isPlainObject$9(value) && Object.keys(value).length === 1) {
9077
9077
  const ref = value["Ref"];
9078
9078
  if (typeof ref === "string" && ref !== "") return pushPlaceholderPart(out, keyedPart({ Ref: ref }), budget);
9079
9079
  if (depth >= MAX_PLACEHOLDER_DEPTH) {
@@ -9105,7 +9105,7 @@ function appendParameterPlaceholderParts(source, out, budget, depth) {
9105
9105
  let template;
9106
9106
  let variables = {};
9107
9107
  if (typeof args === "string") template = args;
9108
- else if (Array.isArray(args) && args.length === 2 && isPlainObject$7(args[1])) {
9108
+ else if (Array.isArray(args) && args.length === 2 && isPlainObject$9(args[1])) {
9109
9109
  template = args[0];
9110
9110
  variables = args[1];
9111
9111
  } else return false;
@@ -9268,7 +9268,7 @@ function isUniquelyKeyedBy(items, key) {
9268
9268
  if (items.length === 0) return false;
9269
9269
  const seen = /* @__PURE__ */ new Set();
9270
9270
  for (const item of items) {
9271
- if (!isPlainObject$7(item) || !Object.hasOwn(item, key)) return false;
9271
+ if (!isPlainObject$9(item) || !Object.hasOwn(item, key)) return false;
9272
9272
  const id = item[key];
9273
9273
  if (typeof id !== "string" || id === "") return false;
9274
9274
  if (seen.has(id)) return false;
@@ -9296,7 +9296,7 @@ const NEVER_DROPPING_INTRINSICS = /* @__PURE__ */ new Set([
9296
9296
  ]);
9297
9297
  function arrayElementDrop(element, depth = 0) {
9298
9298
  if (depth > 16) return "unknown";
9299
- if (!isPlainObject$7(element)) return "never";
9299
+ if (!isPlainObject$9(element)) return "never";
9300
9300
  if (Object.hasOwn(element, "Ref")) return element["Ref"] === "AWS::NoValue" ? "always" : "never";
9301
9301
  const keys = Object.keys(element);
9302
9302
  if (keys.filter((key) => key.startsWith("Fn::") || key === "Condition").length === 0) return "never";
@@ -9332,7 +9332,7 @@ function keptLiteralsCorroborate(kept, bag, secrets) {
9332
9332
  return kept.every((element, i) => keptElementCorroborates(element, bag[i], secrets));
9333
9333
  }
9334
9334
  function isIntrinsicNode(value) {
9335
- if (!isPlainObject$7(value)) return false;
9335
+ if (!isPlainObject$9(value)) return false;
9336
9336
  const keys = Object.keys(value);
9337
9337
  return keys.length === 1 && (keys[0] === "Ref" || keys[0].startsWith("Fn::"));
9338
9338
  }
@@ -9345,7 +9345,7 @@ function keptElementCorroborates(source, bag, secrets, depth = 0) {
9345
9345
  if (source === null || typeof source !== "object") return source === bag;
9346
9346
  if (isIntrinsicNode(source)) return true;
9347
9347
  if (Array.isArray(source)) return Array.isArray(bag) && bag.length === source.length && source.every((element, i) => keptElementCorroborates(element, bag[i], secrets, depth + 1));
9348
- if (!isPlainObject$7(source) || !isPlainObject$7(bag)) return false;
9348
+ if (!isPlainObject$9(source) || !isPlainObject$9(bag)) return false;
9349
9349
  if (Object.keys(bag).some((key) => !Object.hasOwn(source, key))) return false;
9350
9350
  return Object.entries(source).every(([key, value]) => Object.hasOwn(bag, key) ? keptElementCorroborates(value, bag[key], secrets, depth + 1) : arrayElementDrop(value) === "always" || arrayElementDrop(value) === "maybe");
9351
9351
  }
@@ -9355,12 +9355,12 @@ function corroboratesWhateverResolves(source, depth = 0) {
9355
9355
  if (source === null || typeof source !== "object") return true;
9356
9356
  if (isIntrinsicNode(source)) return true;
9357
9357
  if (Array.isArray(source)) return source.every((element) => arrayElementDrop(element) === "never" && corroboratesWhateverResolves(element, depth + 1));
9358
- if (!isPlainObject$7(source)) return false;
9358
+ if (!isPlainObject$9(source)) return false;
9359
9359
  if (Object.keys(source).some((key) => key === "Ref" || key.startsWith("Fn::"))) return false;
9360
9360
  return Object.values(source).every((value) => arrayElementDrop(value) !== "unknown" && corroboratesWhateverResolves(value, depth + 1));
9361
9361
  }
9362
9362
  function arrayPairsWhateverDrops(source) {
9363
- if (!source.some((element) => isPlainObject$7(element) && (Object.hasOwn(element, "Fn::If") || element["Ref"] === "AWS::NoValue" || Array.isArray(element["Fn::FindInMap"]) && element["Fn::FindInMap"].length > 3))) return true;
9363
+ if (!source.some((element) => isPlainObject$9(element) && (Object.hasOwn(element, "Fn::If") || element["Ref"] === "AWS::NoValue" || Array.isArray(element["Fn::FindInMap"]) && element["Fn::FindInMap"].length > 3))) return true;
9364
9364
  return source.every((element) => corroboratesWhateverResolves(element));
9365
9365
  }
9366
9366
  function redactByPath(bag, source, secrets, rules, secretExpressions, bagIsSameGeneration) {
@@ -9377,13 +9377,13 @@ function redactByPath(bag, source, secrets, rules, secretExpressions, bagIsSameG
9377
9377
  }
9378
9378
  return positionByEmbeddedSpan(bag, source, secrets, bagIsSameGeneration);
9379
9379
  }
9380
- if ((typeof bag === "string" || Array.isArray(bag)) && isPlainObject$7(source)) {
9380
+ if ((typeof bag === "string" || Array.isArray(bag)) && isPlainObject$9(source)) {
9381
9381
  const inherited = positionByInheritedParameter(bag, source, secrets);
9382
9382
  if (inherited !== void 0) return inherited;
9383
9383
  const reread = positionByParameterReread(bag, source, secrets);
9384
9384
  if (reread !== void 0) return reread;
9385
9385
  }
9386
- if (typeof bag === "string" && isPlainObject$7(source)) {
9386
+ if (typeof bag === "string" && isPlainObject$9(source)) {
9387
9387
  const certified = positionByCrossStackSource(bag, source, secrets);
9388
9388
  if (certified !== void 0) return certified;
9389
9389
  const placeheld = positionByParameterPlaceholders(bag, source, secrets);
@@ -9393,7 +9393,7 @@ function redactByPath(bag, source, secrets, rules, secretExpressions, bagIsSameG
9393
9393
  const framed = positionByIntrinsicFrame(bag, source, secrets, secretExpressions, bagIsSameGeneration);
9394
9394
  if (framed !== void 0) return framed;
9395
9395
  }
9396
- if (Array.isArray(bag) && isPlainObject$7(source)) {
9396
+ if (Array.isArray(bag) && isPlainObject$9(source)) {
9397
9397
  const positionedList = positionListByCrossStackSource(bag, source, secrets);
9398
9398
  if (positionedList !== void 0) return positionedList;
9399
9399
  }
@@ -9428,7 +9428,7 @@ function redactByPath(bag, source, secrets, rules, secretExpressions, bagIsSameG
9428
9428
  if (kept !== void 0 && keptLiteralsCorroborate(kept, bag, secrets)) return bag.map((item, i) => redactByPath(item, kept[i], secrets, rules, secretExpressions, bagIsSameGeneration));
9429
9429
  }
9430
9430
  }
9431
- if (isPlainObject$7(bag) && hasPlainPrototype(bag) && isPlainObject$7(source)) {
9431
+ if (isPlainObject$9(bag) && hasPlainPrototype(bag) && isPlainObject$9(source)) {
9432
9432
  const out = Object.create(null);
9433
9433
  for (const [k, v] of Object.entries(bag)) {
9434
9434
  out[k] = Object.hasOwn(source, k) ? redactByPath(v, source[k], secrets, rules, secretExpressions, bagIsSameGeneration) : redactForState(v, {
@@ -9450,7 +9450,7 @@ function isReadbackProjectedFromState(rules) {
9450
9450
  function subtreeHasDynamicReference(value) {
9451
9451
  if (isDynamicReferenceString(value)) return true;
9452
9452
  if (Array.isArray(value)) return value.some(subtreeHasDynamicReference);
9453
- if (isPlainObject$7(value)) return Object.values(value).some(subtreeHasDynamicReference);
9453
+ if (isPlainObject$9(value)) return Object.values(value).some(subtreeHasDynamicReference);
9454
9454
  return false;
9455
9455
  }
9456
9456
  function pathCrossesDottedKey(bag, path) {
@@ -9487,7 +9487,7 @@ function nameScalarSecrets(value, secrets) {
9487
9487
  return secrets.has(String(node)) || byValue.has(node) ? "***" : node;
9488
9488
  }
9489
9489
  if (Array.isArray(node)) return node.map(walk);
9490
- if (isPlainObject$7(node) && hasPlainPrototype(node)) {
9490
+ if (isPlainObject$9(node) && hasPlainPrototype(node)) {
9491
9491
  const out = Object.create(null);
9492
9492
  for (const [k, v] of Object.entries(node)) out[k] = walk(v);
9493
9493
  return out;
@@ -9504,13 +9504,13 @@ function substitutionIsSecret(value) {
9504
9504
  function sentinelDefinitionOf(source) {
9505
9505
  const subs = source["DefinitionSubstitutions"];
9506
9506
  const values = /* @__PURE__ */ new Map();
9507
- if (isPlainObject$7(subs)) {
9507
+ if (isPlainObject$9(subs)) {
9508
9508
  for (const [name, value] of Object.entries(subs)) if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") values.set(name, String(value));
9509
9509
  }
9510
9510
  for (const key of ["DefinitionString", "Definition"]) {
9511
9511
  if (!Object.hasOwn(source, key)) continue;
9512
9512
  const raw = source[key];
9513
- const body = typeof raw === "string" ? raw : isPlainObject$7(raw) ? JSON.stringify(raw) : void 0;
9513
+ const body = typeof raw === "string" ? raw : isPlainObject$9(raw) ? JSON.stringify(raw) : void 0;
9514
9514
  if (body === void 0) continue;
9515
9515
  if (body.includes(SENTINEL_IN_STRING) || body.includes(SENTINEL_OUT_OF_STRING) || /\\u[eE]00[01]/.test(body)) continue;
9516
9516
  const names = [];
@@ -9581,7 +9581,7 @@ function sentinelDefinitionOf(source) {
9581
9581
  node.forEach((item, i) => walk(item, [...path, i], [...shapes, node.length]));
9582
9582
  return;
9583
9583
  }
9584
- if (isPlainObject$7(node)) {
9584
+ if (isPlainObject$9(node)) {
9585
9585
  const own = new Set(Object.keys(node).map(written));
9586
9586
  for (const [k, v] of Object.entries(node)) {
9587
9587
  if (!marked(k)) keys.add(k);
@@ -9609,7 +9609,7 @@ function alignedSecretLeaf(root, leaf) {
9609
9609
  if (!Array.isArray(cursor) || cursor.length !== shape) return void 0;
9610
9610
  cursor = cursor[segment];
9611
9611
  } else {
9612
- if (!isPlainObject$7(cursor)) return void 0;
9612
+ if (!isPlainObject$9(cursor)) return void 0;
9613
9613
  const own = Object.keys(cursor);
9614
9614
  if (own.length !== shape.size || own.some((k) => !shape.has(k))) return void 0;
9615
9615
  if (!Object.hasOwn(cursor, segment)) return void 0;
@@ -9620,7 +9620,7 @@ function alignedSecretLeaf(root, leaf) {
9620
9620
  }
9621
9621
  function collectObjectKeys(value, into) {
9622
9622
  if (Array.isArray(value)) for (const item of value) collectObjectKeys(item, into);
9623
- else if (isPlainObject$7(value)) for (const [k, v] of Object.entries(value)) {
9623
+ else if (isPlainObject$9(value)) for (const [k, v] of Object.entries(value)) {
9624
9624
  into.add(k);
9625
9625
  collectObjectKeys(v, into);
9626
9626
  }
@@ -9633,7 +9633,7 @@ function spelledKeysOf(properties) {
9633
9633
  }
9634
9634
  function someKeyIsUnspelled(value, spelled) {
9635
9635
  if (Array.isArray(value)) return value.some((item) => someKeyIsUnspelled(item, spelled));
9636
- if (isPlainObject$7(value)) return Object.entries(value).some(([k, v]) => !spelled(k) || someKeyIsUnspelled(v, spelled));
9636
+ if (isPlainObject$9(value)) return Object.entries(value).some(([k, v]) => !spelled(k) || someKeyIsUnspelled(v, spelled));
9637
9637
  return false;
9638
9638
  }
9639
9639
  function nameDefinitionSecrets(value, source, secrets) {
@@ -9728,8 +9728,8 @@ function deepEqualJsonValue(a, b) {
9728
9728
  if (!Array.isArray(b) || a.length !== b.length) return false;
9729
9729
  return a.every((item, i) => deepEqualJsonValue(item, b[i]));
9730
9730
  }
9731
- if (isPlainObject$7(a)) {
9732
- if (!isPlainObject$7(b)) return false;
9731
+ if (isPlainObject$9(a)) {
9732
+ if (!isPlainObject$9(b)) return false;
9733
9733
  if (!hasPlainPrototype(a) || !hasPlainPrototype(b)) return false;
9734
9734
  const keys = Object.keys(a);
9735
9735
  if (keys.length !== Object.keys(b).length) return false;
@@ -9746,7 +9746,7 @@ function renderedDefinitionLiterals(source) {
9746
9746
  const keyKeep = /* @__PURE__ */ new Set();
9747
9747
  const subs = source["DefinitionSubstitutions"];
9748
9748
  const scalars = [];
9749
- if (isPlainObject$7(subs)) {
9749
+ if (isPlainObject$9(subs)) {
9750
9750
  for (const [name, value] of Object.entries(subs)) if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
9751
9751
  scalars.push([name, String(value)]);
9752
9752
  if (typeof value === "string") keep.add(value);
@@ -9758,7 +9758,7 @@ function renderedDefinitionLiterals(source) {
9758
9758
  if (!Object.hasOwn(source, key)) continue;
9759
9759
  const body = source[key];
9760
9760
  if (typeof body === "string") bodies.push(body);
9761
- else if (isPlainObject$7(body)) bodies.push(JSON.stringify(body));
9761
+ else if (isPlainObject$9(body)) bodies.push(JSON.stringify(body));
9762
9762
  }
9763
9763
  for (const body of bodies) {
9764
9764
  let rendered = body;
@@ -9809,7 +9809,7 @@ function collectScalarLeaves(value, into) {
9809
9809
  return;
9810
9810
  }
9811
9811
  if (Array.isArray(value)) for (const item of value) collectScalarLeaves(item, into);
9812
- else if (isPlainObject$7(value)) for (const item of Object.values(value)) collectScalarLeaves(item, into);
9812
+ else if (isPlainObject$9(value)) for (const item of Object.values(value)) collectScalarLeaves(item, into);
9813
9813
  }
9814
9814
  function refuseUncertifiedSubtree(value, sourceLiterals, mark, scalarLiterals, seen = /* @__PURE__ */ new Map()) {
9815
9815
  if (scalarLiterals !== void 0 && (typeof value === "number" || typeof value === "boolean") && !scalarLiterals.has(value)) return mark ? POSITION_UNCERTIFIED : "***";
@@ -9827,7 +9827,7 @@ function refuseUncertifiedSubtree(value, sourceLiterals, mark, scalarLiterals, s
9827
9827
  for (const item of value) out.push(refuseUncertifiedSubtree(item, sourceLiterals, mark, scalarLiterals, seen));
9828
9828
  return out;
9829
9829
  }
9830
- if (isPlainObject$7(value) && hasPlainPrototype(value)) {
9830
+ if (isPlainObject$9(value) && hasPlainPrototype(value)) {
9831
9831
  const out = Object.create(null);
9832
9832
  seen.set(value, out);
9833
9833
  for (const [k, v] of Object.entries(value)) out[k] = refuseUncertifiedSubtree(v, sourceLiterals, mark, scalarLiterals, seen);
@@ -9854,7 +9854,7 @@ function refuseUncertifiedReadbackPositions(bag, source, secrets, failClosed, le
9854
9854
  if (learn) learnMixedLeafNeedle(learn, bag, source);
9855
9855
  return mark ? POSITION_DECIDED : source;
9856
9856
  }
9857
- if (failClosed === true && isPlainObject$7(bag) && hasPlainPrototype(bag) && isPlainObject$7(source) && Object.keys(bag).some((k) => RENDERED_DEFINITION_KEYS.has(k)) && definitionSourceCarriesSecret(source)) {
9857
+ if (failClosed === true && isPlainObject$9(bag) && hasPlainPrototype(bag) && isPlainObject$9(source) && Object.keys(bag).some((k) => RENDERED_DEFINITION_KEYS.has(k)) && definitionSourceCarriesSecret(source)) {
9858
9858
  const keep = renderedDefinitionLiterals(source);
9859
9859
  const out = Object.create(null);
9860
9860
  const rest = Object.create(null);
@@ -9888,7 +9888,7 @@ function refuseUncertifiedReadbackPositions(bag, source, secrets, failClosed, le
9888
9888
  return out;
9889
9889
  }
9890
9890
  if (!subtreeHasDynamicReference(source)) return bag;
9891
- if (isPlainObject$7(bag) && hasPlainPrototype(bag) && isPlainObject$7(source)) {
9891
+ if (isPlainObject$9(bag) && hasPlainPrototype(bag) && isPlainObject$9(source)) {
9892
9892
  const out = Object.create(null);
9893
9893
  for (const [k, v] of Object.entries(bag)) out[k] = Object.hasOwn(source, k) ? refuseUncertifiedReadbackPositions(v, source[k], secrets, failClosed, learn, mark) : v;
9894
9894
  return out;
@@ -9915,14 +9915,14 @@ function refuseUncertifiedReadbackPositions(bag, source, secrets, failClosed, le
9915
9915
  function isDistinguishingAnchor(value) {
9916
9916
  if (typeof value === "string") return value !== "";
9917
9917
  if (Array.isArray(value)) return value.some(isDistinguishingAnchor);
9918
- if (isPlainObject$7(value)) return Object.values(value).some(isDistinguishingAnchor);
9918
+ if (isPlainObject$9(value)) return Object.values(value).some(isDistinguishingAnchor);
9919
9919
  return false;
9920
9920
  }
9921
9921
  const ANCHOR_REFERENCE_MASK = "<ref>";
9922
9922
  function anchorSignature(source) {
9923
9923
  if (isDynamicReferenceString(source)) return ANCHOR_REFERENCE_MASK;
9924
9924
  if (Array.isArray(source)) return `[${source.map(anchorSignature).sort().join(",")}]`;
9925
- if (isPlainObject$7(source)) return `{${Object.keys(source).sort().map((k) => `${JSON.stringify(k)}:${anchorSignature(source[k])}`).join(",")}}`;
9925
+ if (isPlainObject$9(source)) return `{${Object.keys(source).sort().map((k) => `${JSON.stringify(k)}:${anchorSignature(source[k])}`).join(",")}}`;
9926
9926
  return JSON.stringify(source) ?? "undefined";
9927
9927
  }
9928
9928
  function anchorsCorroboratePairing(bag, source, anchors) {
@@ -9932,8 +9932,8 @@ function anchorsCorroboratePairing(bag, source, anchors) {
9932
9932
  return true;
9933
9933
  }
9934
9934
  if (isDynamicReferenceString(source)) return typeof bag === "string";
9935
- if (isPlainObject$7(source)) {
9936
- if (!isPlainObject$7(bag)) return false;
9935
+ if (isPlainObject$9(source)) {
9936
+ if (!isPlainObject$9(bag)) return false;
9937
9937
  return Object.keys(source).every((k) => Object.hasOwn(bag, k) && anchorsCorroboratePairing(bag[k], source[k], anchors));
9938
9938
  }
9939
9939
  if (Array.isArray(source)) {
@@ -10024,13 +10024,13 @@ function learnMixedLeafNeedle(collector, bag, source) {
10024
10024
  learnNeedle(collector, plaintext, token);
10025
10025
  }
10026
10026
  function asChild(marks, key) {
10027
- return isPlainObject$7(marks) && hasPlainPrototype(marks) ? marks[key] : void 0;
10027
+ return isPlainObject$9(marks) && hasPlainPrototype(marks) ? marks[key] : void 0;
10028
10028
  }
10029
10029
  function asIndex(marks, index) {
10030
10030
  return Array.isArray(marks) ? marks[index] : void 0;
10031
10031
  }
10032
10032
  function preferPositionDecisions(scanned, refused, bag, marks, inferred) {
10033
- if (isPlainObject$7(bag) && hasPlainPrototype(bag) && isPlainObject$7(refused) && isPlainObject$7(scanned)) {
10033
+ if (isPlainObject$9(bag) && hasPlainPrototype(bag) && isPlainObject$9(refused) && isPlainObject$9(scanned)) {
10034
10034
  const out = Object.create(null);
10035
10035
  for (const [k, v] of Object.entries(refused)) out[k] = preferPositionDecisions(scanned[k], v, bag[k], asChild(marks, k), inferred);
10036
10036
  return out;
@@ -11520,7 +11520,7 @@ function readsNoEchoSource(node, sources) {
11520
11520
  if (typeof argument === "string") return subStringReadsNoEcho(argument, void 0, sources);
11521
11521
  if (Array.isArray(argument)) {
11522
11522
  const [text, variables] = argument;
11523
- const vars = isPlainObject$7(variables) ? variables : void 0;
11523
+ const vars = isPlainObject$9(variables) ? variables : void 0;
11524
11524
  if (typeof text === "string" && subStringReadsNoEcho(text, vars, sources)) return true;
11525
11525
  return vars !== void 0 && Object.values(vars).some(walk);
11526
11526
  }
@@ -11554,7 +11554,7 @@ function noEchoCoordinatesOf(template, resolved, sources, onCoordinate) {
11554
11554
  parameters: sources.parameters,
11555
11555
  ...sources.conditions !== void 0 && { conditions: sources.conditions }
11556
11556
  };
11557
- const isBareDeclaredGetAtt = (node) => isPlainObject$7(node) && intrinsicKeyOf(node) === "Fn::GetAtt" && getAttReadsNoEcho(node["Fn::GetAtt"], sources);
11557
+ const isBareDeclaredGetAtt = (node) => isPlainObject$9(node) && intrinsicKeyOf(node) === "Fn::GetAtt" && getAttReadsNoEcho(node["Fn::GetAtt"], sources);
11558
11558
  const walk = (source, value, path) => {
11559
11559
  if (value === void 0) return;
11560
11560
  if (source === null || typeof source !== "object") return;
@@ -11570,7 +11570,7 @@ function noEchoCoordinatesOf(template, resolved, sources, onCoordinate) {
11570
11570
  const record = source;
11571
11571
  const intrinsic = intrinsicKeyOf(record);
11572
11572
  if (intrinsic === void 0) {
11573
- if (!isPlainObject$7(value)) {
11573
+ if (!isPlainObject$9(value)) {
11574
11574
  if (readsNoEchoSource(record, parametersOnly)) push(path, source);
11575
11575
  return;
11576
11576
  }
@@ -11619,7 +11619,7 @@ function noEchoParameterNodesAt(templateProperties, shape, noEchoParameters, con
11619
11619
  noEchoCoordinatesOf(templateProperties ?? {}, shape, {
11620
11620
  parameters: noEchoParameters,
11621
11621
  ...conditions !== void 0 && { conditions }
11622
- }, (coordinate, node) => nodes.set(canonicalJson$3(coordinate), {
11622
+ }, (coordinate, node) => nodes.set(canonicalJson$4(coordinate), {
11623
11623
  coordinate,
11624
11624
  node
11625
11625
  }));
@@ -11631,7 +11631,7 @@ function recordedNoEchoValuesOf(templateProperties, record, noEchoParameterNames
11631
11631
  if (properties === null || typeof properties !== "object") return bag;
11632
11632
  const coordinates = /* @__PURE__ */ new Map();
11633
11633
  if (noEchoParameterNames.size > 0 && templateProperties !== void 0) for (const [key, { coordinate }] of noEchoParameterNodesAt(templateProperties, properties, noEchoParameterNames, conditions)) coordinates.set(key, coordinate);
11634
- for (const coordinate of noEchoLeavesOf(record ?? {}) ?? []) coordinates.set(canonicalJson$3(coordinate), coordinate);
11634
+ for (const coordinate of noEchoLeavesOf(record ?? {}) ?? []) coordinates.set(canonicalJson$4(coordinate), coordinate);
11635
11635
  const recordLeaf = (leaf) => {
11636
11636
  if (typeof leaf === "string") {
11637
11637
  if (leaf === "***" || leaf.includes("{{resolve:")) return;
@@ -11655,7 +11655,7 @@ function maskWholeValue(value) {
11655
11655
  if (value === null || value === void 0) return value;
11656
11656
  if (typeof value === "string" && isSingleDynamicReferenceToken(value)) return value;
11657
11657
  if (Array.isArray(value)) return value.map(maskWholeValue);
11658
- if (isPlainObject$7(value)) {
11658
+ if (isPlainObject$9(value)) {
11659
11659
  const out = {};
11660
11660
  for (const [key, child] of Object.entries(value)) Object.defineProperty(out, key, {
11661
11661
  value: maskWholeValue(child),
@@ -11678,7 +11678,7 @@ function readAt(bag, coordinate) {
11678
11678
  node = node[segment];
11679
11679
  continue;
11680
11680
  }
11681
- if (!isPlainObject$7(node) || !Object.hasOwn(node, segment)) return {
11681
+ if (!isPlainObject$9(node) || !Object.hasOwn(node, segment)) return {
11682
11682
  found: false,
11683
11683
  value: void 0
11684
11684
  };
@@ -11694,7 +11694,7 @@ function valueAtCoordinate(bag, coordinate) {
11694
11694
  }
11695
11695
  function cloneContainer(node) {
11696
11696
  if (Array.isArray(node)) return [...node];
11697
- if (isPlainObject$7(node)) return { ...node };
11697
+ if (isPlainObject$9(node)) return { ...node };
11698
11698
  return node;
11699
11699
  }
11700
11700
  function maskAtCoordinates(bag, coordinates) {
@@ -11761,20 +11761,20 @@ function readbackPathFor(readback, properties, coordinate) {
11761
11761
  if (!Array.isArray(live)) return path.length === 0 ? void 0 : path;
11762
11762
  const key = Array.isArray(desired) ? identityKeyFor(live, desired) : void 0;
11763
11763
  const element = Array.isArray(desired) ? desired[segment] : void 0;
11764
- if (key === void 0 || !isPlainObject$7(element)) return path;
11764
+ if (key === void 0 || !isPlainObject$9(element)) return path;
11765
11765
  const identity = element[key];
11766
- const index = live.findIndex((item) => isPlainObject$7(item) && item[key] === identity);
11766
+ const index = live.findIndex((item) => isPlainObject$9(item) && item[key] === identity);
11767
11767
  if (index < 0) return path;
11768
11768
  path.push(index);
11769
11769
  live = live[index];
11770
11770
  desired = element;
11771
11771
  continue;
11772
11772
  }
11773
- if (!isPlainObject$7(live)) return path.length === 0 ? void 0 : path;
11773
+ if (!isPlainObject$9(live)) return path.length === 0 ? void 0 : path;
11774
11774
  if (!Object.hasOwn(live, segment)) return void 0;
11775
11775
  path.push(segment);
11776
11776
  live = live[segment];
11777
- desired = isPlainObject$7(desired) ? desired[segment] : void 0;
11777
+ desired = isPlainObject$9(desired) ? desired[segment] : void 0;
11778
11778
  }
11779
11779
  return path;
11780
11780
  }
@@ -11803,7 +11803,7 @@ function witnessNormalize(stored, today, v11) {
11803
11803
  const confirmed = [];
11804
11804
  const differing = [];
11805
11805
  const walk = (s, t, v, path) => {
11806
- if (v !== "***" && containsMask(v) && (Array.isArray(v) ? !Array.isArray(s) || s.length !== v.length : isPlainObject$7(v) ? !isPlainObject$7(s) : false)) {
11806
+ if (v !== "***" && containsMask(v) && (Array.isArray(v) ? !Array.isArray(s) || s.length !== v.length : isPlainObject$9(v) ? !isPlainObject$9(s) : false)) {
11807
11807
  if (s === void 0 || containsMask(s)) return s;
11808
11808
  if (jsonEqual(s, t)) {
11809
11809
  confirmed.push(path);
@@ -11832,8 +11832,8 @@ function witnessNormalize(stored, today, v11) {
11832
11832
  });
11833
11833
  return changed ? out : s;
11834
11834
  }
11835
- if (isPlainObject$7(v) && isPlainObject$7(s)) {
11836
- const tt = isPlainObject$7(t) ? t : {};
11835
+ if (isPlainObject$9(v) && isPlainObject$9(s)) {
11836
+ const tt = isPlainObject$9(t) ? t : {};
11837
11837
  let out;
11838
11838
  for (const key of Object.keys(v)) {
11839
11839
  if (!Object.hasOwn(s, key)) continue;
@@ -11856,13 +11856,13 @@ function witnessNormalize(stored, today, v11) {
11856
11856
  function containsMask(value) {
11857
11857
  if (value === "***") return true;
11858
11858
  if (Array.isArray(value)) return value.some(containsMask);
11859
- if (isPlainObject$7(value)) return Object.values(value).some(containsMask);
11859
+ if (isPlainObject$9(value)) return Object.values(value).some(containsMask);
11860
11860
  return false;
11861
11861
  }
11862
11862
  function jsonEqual(a, b) {
11863
- return canonicalJson$3(a) === canonicalJson$3(b);
11863
+ return canonicalJson$4(a) === canonicalJson$4(b);
11864
11864
  }
11865
- function canonicalJson$3(value) {
11865
+ function canonicalJson$4(value) {
11866
11866
  return JSON.stringify(value, (_key, node) => {
11867
11867
  if (node === null || typeof node !== "object" || Array.isArray(node)) return node;
11868
11868
  const sorted = Object.create(null);
@@ -11900,7 +11900,7 @@ function noEchoComparison(options) {
11900
11900
  const out = node.map(walk);
11901
11901
  return out.some((item, i) => item !== node[i]) ? out : node;
11902
11902
  }
11903
- if (isPlainObject$7(node)) {
11903
+ if (isPlainObject$9(node)) {
11904
11904
  let out;
11905
11905
  for (const [key, child] of Object.entries(node)) {
11906
11906
  const next = walk(child);
@@ -11943,8 +11943,8 @@ function noEchoOutputsComparison(templateValues, sources) {
11943
11943
  return (current, desired) => {
11944
11944
  const coordinates = noEchoCoordinatesOf(templateValues, desired, sources);
11945
11945
  const maskedKeys = new Set(coordinates.map((coordinate) => coordinate[0]).filter((key) => typeof key === "string"));
11946
- const maskedValues = new Set([...maskedKeys].map((key) => canonicalJson$3(desired[key])));
11947
- for (const key of Object.keys(desired)) if (!Object.hasOwn(templateValues, key) && maskedValues.has(canonicalJson$3(desired[key]))) maskedKeys.add(key);
11946
+ const maskedValues = new Set([...maskedKeys].map((key) => canonicalJson$4(desired[key])));
11947
+ for (const key of Object.keys(desired)) if (!Object.hasOwn(templateValues, key) && maskedValues.has(canonicalJson$4(desired[key]))) maskedKeys.add(key);
11948
11948
  if (maskedKeys.size === 0) return {
11949
11949
  current,
11950
11950
  desired,
@@ -11958,7 +11958,7 @@ function noEchoOutputsComparison(templateValues, sources) {
11958
11958
  const stored = current[key];
11959
11959
  if (containsMask(stored)) continue;
11960
11960
  normalized = { ...normalized ?? {} };
11961
- normalized[key] = canonicalJson$3(stored) === canonicalJson$3(desired[key]) ? maskedDesired[key] : PREVIOUS_NOECHO_VALUE;
11961
+ normalized[key] = canonicalJson$4(stored) === canonicalJson$4(desired[key]) ? maskedDesired[key] : PREVIOUS_NOECHO_VALUE;
11962
11962
  }
11963
11963
  return {
11964
11964
  current: normalized,
@@ -12617,6 +12617,36 @@ function glueTableNameChanged(oldValue, newValue) {
12617
12617
  function natZoneAddressesAddedToAutomaticGateway(oldValue, newValue) {
12618
12618
  return oldValue == null && newValue != null;
12619
12619
  }
12620
+ function ecsServiceLaunchTypeSetOrChanged(oldValue, newValue) {
12621
+ return newValue != null && !isDeepStrictEqual(oldValue, newValue);
12622
+ }
12623
+ const EMR_INSTANCES_IN_PLACE_MEMBERS = ["TerminationProtected", "UnhealthyNodeReplacement"];
12624
+ const EMR_GROUP_IN_PLACE_MEMBERS = ["InstanceCount", "AutoScalingPolicy"];
12625
+ const EMR_FLEET_IN_PLACE_MEMBERS = ["TargetOnDemandCapacity", "TargetSpotCapacity"];
12626
+ function withoutKeys(value, keys) {
12627
+ if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
12628
+ const copy = { ...value };
12629
+ for (const key of keys) delete copy[key];
12630
+ return copy;
12631
+ }
12632
+ function emrInstancesReplacingPart(value) {
12633
+ if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
12634
+ const instances = withoutKeys(value, EMR_INSTANCES_IN_PLACE_MEMBERS);
12635
+ const strip = (key, keys) => {
12636
+ if (!(key in instances)) return;
12637
+ const member = instances[key];
12638
+ instances[key] = Array.isArray(member) ? member.map((entry) => withoutKeys(entry, keys)) : withoutKeys(member, keys);
12639
+ };
12640
+ strip("CoreInstanceGroup", EMR_GROUP_IN_PLACE_MEMBERS);
12641
+ strip("TaskInstanceGroups", EMR_GROUP_IN_PLACE_MEMBERS);
12642
+ strip("CoreInstanceFleet", EMR_FLEET_IN_PLACE_MEMBERS);
12643
+ strip("TaskInstanceFleets", EMR_FLEET_IN_PLACE_MEMBERS);
12644
+ return instances;
12645
+ }
12646
+ function emrClusterInstancesReplaced(oldValue, newValue) {
12647
+ if (oldValue === void 0 && newValue === void 0) return true;
12648
+ return !isDeepStrictEqual(emrInstancesReplacingPart(oldValue), emrInstancesReplacingPart(newValue));
12649
+ }
12620
12650
  var ReplacementRulesRegistry = class {
12621
12651
  logger = getLogger().child("ReplacementRulesRegistry");
12622
12652
  rules = /* @__PURE__ */ new Map();
@@ -12974,6 +13004,14 @@ var ReplacementRulesRegistry = class {
12974
13004
  "TaskRoleArn",
12975
13005
  "Volumes"
12976
13006
  ]) });
13007
+ this.rules.set("AWS::ECS::Service", {
13008
+ replacementProperties: /* @__PURE__ */ new Set(),
13009
+ conditionalReplacements: /* @__PURE__ */ new Map([["LaunchType", ecsServiceLaunchTypeSetOrChanged]])
13010
+ });
13011
+ this.rules.set("AWS::EMR::Cluster", {
13012
+ replacementProperties: /* @__PURE__ */ new Set(),
13013
+ conditionalReplacements: /* @__PURE__ */ new Map([["Instances", emrClusterInstancesReplaced]])
13014
+ });
12977
13015
  this.rules.set("AWS::ElasticLoadBalancingV2::ListenerRule", { replacementProperties: /* @__PURE__ */ new Set(["ListenerArn"]) });
12978
13016
  this.logger.debug(`Initialized replacement rules for ${this.rules.size} resource types`);
12979
13017
  }
@@ -14853,7 +14891,7 @@ function probeFoundSameId(resourceType, a, b) {
14853
14891
  //#region src/provisioning/config-shape.ts
14854
14892
  function readConfigString(container, key, fallback, containerPath, options) {
14855
14893
  if (container === void 0 || container === null) return fallback;
14856
- if (!isPlainObject$6(container) || isUnresolvedIntrinsicContainer(container)) {
14894
+ if (!isPlainObject$8(container) || isUnresolvedIntrinsicContainer(container)) {
14857
14895
  const detail = malformedShapeDetail(container);
14858
14896
  if (options?.onUnusable) {
14859
14897
  const named = fallback === "" ? "" : ` (${fallback})`;
@@ -14893,7 +14931,7 @@ function requireConfigArray(value, path, options) {
14893
14931
  return value;
14894
14932
  }
14895
14933
  function requireConfigObject(value, path, options) {
14896
- if (!isPlainObject$6(value) || isUnresolvedIntrinsicContainer(value)) {
14934
+ if (!isPlainObject$8(value) || isUnresolvedIntrinsicContainer(value)) {
14897
14935
  const detail = malformedShapeDetail(value);
14898
14936
  if (options?.onUnusable) {
14899
14937
  options.onUnusable(`${path} must be an object ${detail}. Leaving this configuration unapplied here; the same value is REFUSED on a template-path create.`);
@@ -14905,7 +14943,7 @@ function requireConfigObject(value, path, options) {
14905
14943
  }
14906
14944
  function configStringRefusal(container, key, fallback, containerPath, options) {
14907
14945
  if (container === void 0 || container === null) return void 0;
14908
- if (!isPlainObject$6(container) || isUnresolvedIntrinsicContainer(container)) return `${containerPath} must be an object ${malformedShapeDetail(container)}`;
14946
+ if (!isPlainObject$8(container) || isUnresolvedIntrinsicContainer(container)) return `${containerPath} must be an object ${malformedShapeDetail(container)}`;
14909
14947
  return configValueRefusal(container[key], fallback, `${containerPath}.${key}`, options);
14910
14948
  }
14911
14949
  function coerceCfnBoolean(value) {
@@ -14918,7 +14956,7 @@ function coerceCfnBoolean(value) {
14918
14956
  }
14919
14957
  function configBooleanRefusal(container, key, containerPath) {
14920
14958
  if (container === void 0 || container === null) return void 0;
14921
- if (!isPlainObject$6(container) || isUnresolvedIntrinsicContainer(container)) return `${containerPath} must be an object ${malformedShapeDetail(container)}`;
14959
+ if (!isPlainObject$8(container) || isUnresolvedIntrinsicContainer(container)) return `${containerPath} must be an object ${malformedShapeDetail(container)}`;
14922
14960
  const value = container[key];
14923
14961
  if (value === void 0) return void 0;
14924
14962
  if (coerceCfnBoolean(value) !== void 0) return void 0;
@@ -14932,7 +14970,7 @@ function coerceCfnInteger(value) {
14932
14970
  }
14933
14971
  function configIntegerRefusal(container, key, containerPath, min, max) {
14934
14972
  if (container === void 0 || container === null) return void 0;
14935
- if (!isPlainObject$6(container) || isUnresolvedIntrinsicContainer(container)) return `${containerPath} must be an object ${malformedShapeDetail(container)}`;
14973
+ if (!isPlainObject$8(container) || isUnresolvedIntrinsicContainer(container)) return `${containerPath} must be an object ${malformedShapeDetail(container)}`;
14936
14974
  const value = container[key];
14937
14975
  if (value === void 0) return void 0;
14938
14976
  const n = coerceCfnInteger(value);
@@ -14946,10 +14984,10 @@ function configValueRefusal(value, fallback, path, options) {
14946
14984
  if (typeof value !== "string" || value.trim() === "") return `${path} must be a non-empty string ${malformedShapeDetail(value)}`;
14947
14985
  }
14948
14986
  function malformedShapeDetail(value) {
14949
- if (isPlainObject$6(value) && isUnresolvedIntrinsicContainer(value)) return `(got ${describe(value)} — nothing substituted it before this call)`;
14987
+ if (isPlainObject$8(value) && isUnresolvedIntrinsicContainer(value)) return `(got ${describe(value)} — nothing substituted it before this call)`;
14950
14988
  return `(got ${describe(value)}) — check for an unresolved intrinsic or a mis-nested template value`;
14951
14989
  }
14952
- function isPlainObject$6(value) {
14990
+ function isPlainObject$8(value) {
14953
14991
  return typeof value === "object" && value !== null && !Array.isArray(value);
14954
14992
  }
14955
14993
  const NAMEABLE_INTRINSIC_KEYS = /* @__PURE__ */ new Set([
@@ -14976,7 +15014,7 @@ function describe(value) {
14976
15014
  if (value === null) return "null";
14977
15015
  if (Array.isArray(value)) return "an array";
14978
15016
  if (typeof value === "string") return value.trim() === "" ? "a blank string" : "a string";
14979
- if (isPlainObject$6(value) && isUnresolvedIntrinsicContainer(value)) {
15017
+ if (isPlainObject$8(value) && isUnresolvedIntrinsicContainer(value)) {
14980
15018
  const key = Object.keys(value)[0];
14981
15019
  return NAMEABLE_INTRINSIC_KEYS.has(key) ? `an unresolved ${key} intrinsic` : "an unresolved intrinsic";
14982
15020
  }
@@ -15153,6 +15191,7 @@ const STATEFUL_TYPES = /* @__PURE__ */ new Set([
15153
15191
  "AWS::AppConfig::ConfigurationProfile",
15154
15192
  "AWS::AIOps::InvestigationGroup",
15155
15193
  "AWS::IoTSiteWise::Workspace",
15194
+ "AWS::CloudWatch::Space",
15156
15195
  "AWS::Rbin::Rule",
15157
15196
  "AWS::SMSVOICE::PhoneNumber",
15158
15197
  "AWS::SMSVOICE::SenderId"
@@ -17013,19 +17052,14 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
17013
17052
  ["AWS::EFS::MountTarget", {
17014
17053
  handled: /* @__PURE__ */ new Set([
17015
17054
  "FileSystemId",
17016
- "SecurityGroups",
17017
- "SubnetId"
17018
- ]),
17019
- silentDrop: /* @__PURE__ */ new Map([
17020
- ["IpAddress", "not yet implemented by cdkd"],
17021
- ["IpAddressType", "not yet implemented by cdkd"],
17022
- ["Ipv6Address", "not yet implemented by cdkd"]
17023
- ]),
17024
- createOnlyDrops: /* @__PURE__ */ new Set([
17025
17055
  "IpAddress",
17026
17056
  "IpAddressType",
17027
- "Ipv6Address"
17057
+ "Ipv6Address",
17058
+ "SecurityGroups",
17059
+ "SubnetId"
17028
17060
  ]),
17061
+ silentDrop: /* @__PURE__ */ new Map(),
17062
+ createOnlyDrops: /* @__PURE__ */ new Set(),
17029
17063
  readOnly: /* @__PURE__ */ new Set(["Id"]),
17030
17064
  ccRouteUnavailable: false
17031
17065
  }],
@@ -18249,6 +18283,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
18249
18283
  }],
18250
18284
  ["AWS::Route53::HostedZone", {
18251
18285
  handled: /* @__PURE__ */ new Set([
18286
+ "DelegationSetId",
18252
18287
  "HostedZoneConfig",
18253
18288
  "HostedZoneFeatures",
18254
18289
  "HostedZoneTags",
@@ -18256,8 +18291,8 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
18256
18291
  "QueryLoggingConfig",
18257
18292
  "VPCs"
18258
18293
  ]),
18259
- silentDrop: /* @__PURE__ */ new Map([["DelegationSetId", "not yet implemented by cdkd"]]),
18260
- createOnlyDrops: /* @__PURE__ */ new Set(["DelegationSetId"]),
18294
+ silentDrop: /* @__PURE__ */ new Map(),
18295
+ createOnlyDrops: /* @__PURE__ */ new Set(),
18261
18296
  readOnly: /* @__PURE__ */ new Set(["Id", "NameServers"]),
18262
18297
  ccRouteUnavailable: false
18263
18298
  }],
@@ -19981,12 +20016,12 @@ function declaresNoEcho(definition) {
19981
20016
  //#region src/deployment/masked-property-fingerprints.ts
19982
20017
  const FINGERPRINT_LAYOUT$1 = 1;
19983
20018
  const INPUT_FINGERPRINT_LAYOUT = 2;
19984
- function canonicalJson$2(value) {
20019
+ function canonicalJson$3(value) {
19985
20020
  if (value === void 0) return "null";
19986
- if (Array.isArray(value)) return `[${value.map(canonicalJson$2).join(",")}]`;
20021
+ if (Array.isArray(value)) return `[${value.map(canonicalJson$3).join(",")}]`;
19987
20022
  if (value !== null && typeof value === "object") {
19988
20023
  const record = value;
19989
- return `{${Object.keys(record).filter((key) => record[key] !== void 0).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson$2(record[key])}`).join(",")}}`;
20024
+ return `{${Object.keys(record).filter((key) => record[key] !== void 0).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson$3(record[key])}`).join(",")}}`;
19990
20025
  }
19991
20026
  return JSON.stringify(value) ?? "null";
19992
20027
  }
@@ -20007,7 +20042,7 @@ function splitInputFingerprint(entry) {
20007
20042
  };
20008
20043
  }
20009
20044
  function templateCarriesNeedle(templateValue, secrets) {
20010
- const text = canonicalJson$2(templateValue);
20045
+ const text = canonicalJson$3(templateValue);
20011
20046
  for (const needle of printingCorpusOf(secrets).keys()) {
20012
20047
  if (needle.length < 4) continue;
20013
20048
  if (text.includes(needle) || text.includes(JSON.stringify(needle).slice(1, -1))) return true;
@@ -20015,14 +20050,14 @@ function templateCarriesNeedle(templateValue, secrets) {
20015
20050
  return false;
20016
20051
  }
20017
20052
  function maskedPropertyFingerprint(templateValue) {
20018
- const digest = createHash("sha256").update(canonicalJson$2({
20053
+ const digest = createHash("sha256").update(canonicalJson$3({
20019
20054
  layout: FINGERPRINT_LAYOUT$1,
20020
20055
  value: templateValue
20021
20056
  })).digest("hex");
20022
20057
  return `${FINGERPRINT_PREFIX}${digest}`;
20023
20058
  }
20024
20059
  var UnknownInput = class extends Error {};
20025
- function isPlainObject$5(value) {
20060
+ function isPlainObject$7(value) {
20026
20061
  return value !== null && typeof value === "object" && !Array.isArray(value);
20027
20062
  }
20028
20063
  const DYNAMIC_REFERENCE_OPEN = "{{resolve:";
@@ -20030,7 +20065,7 @@ const NESTED_STACK_TYPE$4 = "AWS::CloudFormation::Stack";
20030
20065
  const NESTED_OUTPUT_PREFIX = "Outputs.";
20031
20066
  function carriesSecretValue(value, corpora) {
20032
20067
  if (carriesSecretMask(value)) return true;
20033
- const text = canonicalJson$2(value);
20068
+ const text = canonicalJson$3(value);
20034
20069
  if (text.includes(DYNAMIC_REFERENCE_OPEN)) return true;
20035
20070
  for (const corpus of corpora) {
20036
20071
  if (corpus === void 0) continue;
@@ -20042,7 +20077,7 @@ function carriesSecretValue(value, corpora) {
20042
20077
  return false;
20043
20078
  }
20044
20079
  function parameterInputsFor(args) {
20045
- const declared = isPlainObject$5(args.template.Parameters) ? args.template.Parameters : {};
20080
+ const declared = isPlainObject$7(args.template.Parameters) ? args.template.Parameters : {};
20046
20081
  const values = args.values ?? {};
20047
20082
  const inputs = /* @__PURE__ */ new Map();
20048
20083
  const bound = {};
@@ -20053,7 +20088,7 @@ function parameterInputsFor(args) {
20053
20088
  continue;
20054
20089
  }
20055
20090
  const value = values[name];
20056
- let secret = isPlainObject$5(definition) && declaresNoEcho(definition) || carriesSecretValue(value, []);
20091
+ let secret = isPlainObject$7(definition) && declaresNoEcho(definition) || carriesSecretValue(value, []);
20057
20092
  if (!secret && args.nestedChild === true && args.supplied !== void 0) {
20058
20093
  if (Object.hasOwn(args.supplied, name)) {
20059
20094
  const passed = args.passedClasses?.get(name);
@@ -20104,7 +20139,7 @@ function intrinsicKey(value) {
20104
20139
  const OPAQUE_ATTRIBUTE_TYPES = /* @__PURE__ */ new Set(["AWS::CloudFormation::CustomResource", NESTED_STACK_TYPE$4]);
20105
20140
  function hasOpaqueAttributes(logicalId, walk) {
20106
20141
  const definition = walk.resources[logicalId];
20107
- const type = isPlainObject$5(definition) ? definition["Type"] : void 0;
20142
+ const type = isPlainObject$7(definition) ? definition["Type"] : void 0;
20108
20143
  return typeof type === "string" && (type.startsWith("Custom::") || OPAQUE_ATTRIBUTE_TYPES.has(type));
20109
20144
  }
20110
20145
  function getAttTarget(operand) {
@@ -20129,7 +20164,7 @@ function taintOf(logicalId, walk) {
20129
20164
  const visit = (value) => {
20130
20165
  if (typeof value === "string") return value.includes(DYNAMIC_REFERENCE_OPEN);
20131
20166
  if (Array.isArray(value)) return value.some(visit);
20132
- if (!isPlainObject$5(value)) return false;
20167
+ if (!isPlainObject$7(value)) return false;
20133
20168
  const key = intrinsicKey(value);
20134
20169
  const operand = key === void 0 ? void 0 : value[key];
20135
20170
  let verdict = "clean";
@@ -20141,7 +20176,7 @@ function taintOf(logicalId, walk) {
20141
20176
  else if (key === "Fn::FindInMap" && mapReadClass(operand, walk.sources.template) !== "clean") verdict = "tainted";
20142
20177
  else if (key === "Fn::Sub") {
20143
20178
  const text = Array.isArray(operand) ? operand[0] : operand;
20144
- const vars = Array.isArray(operand) && isPlainObject$5(operand[1]) ? operand[1] : {};
20179
+ const vars = Array.isArray(operand) && isPlainObject$7(operand[1]) ? operand[1] : {};
20145
20180
  if (typeof text === "string") for (const name of subPlaceholders(text)) {
20146
20181
  if (Object.hasOwn(vars, name)) continue;
20147
20182
  const owner = name.includes(".") ? name.split(".")[0] : name;
@@ -20155,7 +20190,7 @@ function taintOf(logicalId, walk) {
20155
20190
  return Object.values(value).some(visit);
20156
20191
  };
20157
20192
  const definition = walk.resources[logicalId];
20158
- const result = visit(isPlainObject$5(definition) ? definition["Properties"] : void 0) ? "tainted" : unknown ? "unknown" : "clean";
20193
+ const result = visit(isPlainObject$7(definition) ? definition["Properties"] : void 0) ? "tainted" : unknown ? "unknown" : "clean";
20159
20194
  walk.inProgress.delete(logicalId);
20160
20195
  walk.taint.set(logicalId, result);
20161
20196
  return result;
@@ -20171,7 +20206,7 @@ function conditionInput(name, walk) {
20171
20206
  return typeof verdict === "boolean" ? verdict : "unknown";
20172
20207
  }
20173
20208
  function conditionClosure(name, walk) {
20174
- const definitions = isPlainObject$5(walk.sources.template.Conditions) ? walk.sources.template.Conditions : {};
20209
+ const definitions = isPlainObject$7(walk.sources.template.Conditions) ? walk.sources.template.Conditions : {};
20175
20210
  let secret = false;
20176
20211
  let unknown = false;
20177
20212
  let unread = false;
@@ -20186,7 +20221,7 @@ function conditionClosure(name, walk) {
20186
20221
  value.forEach(visit);
20187
20222
  return;
20188
20223
  }
20189
- if (!isPlainObject$5(value)) return;
20224
+ if (!isPlainObject$7(value)) return;
20190
20225
  const keys = Object.keys(value);
20191
20226
  if (keys.length === 1 && keys[0] === "Condition" && typeof value["Condition"] === "string") {
20192
20227
  pending.push(value["Condition"]);
@@ -20219,7 +20254,7 @@ function conditionClosure(name, walk) {
20219
20254
  if (key === "Fn::Sub") {
20220
20255
  const operand = value["Fn::Sub"];
20221
20256
  const text = Array.isArray(operand) ? operand[0] : operand;
20222
- const vars = Array.isArray(operand) && isPlainObject$5(operand[1]) ? operand[1] : {};
20257
+ const vars = Array.isArray(operand) && isPlainObject$7(operand[1]) ? operand[1] : {};
20223
20258
  if (typeof text === "string") for (const name of subPlaceholders(text)) {
20224
20259
  if (Object.hasOwn(vars, name)) continue;
20225
20260
  if (name.includes(".") && !name.startsWith("AWS::")) secret = true;
@@ -20248,8 +20283,8 @@ function mapReadClass(operand, template) {
20248
20283
  const mapName = Array.isArray(operand) ? operand[0] : void 0;
20249
20284
  if (typeof mapName !== "string") return "unknown";
20250
20285
  const mappings = template.Mappings;
20251
- const map = isPlainObject$5(mappings) && Object.hasOwn(mappings, mapName) ? mappings[mapName] : void 0;
20252
- if (!isPlainObject$5(map)) return "unknown";
20286
+ const map = isPlainObject$7(mappings) && Object.hasOwn(mappings, mapName) ? mappings[mapName] : void 0;
20287
+ if (!isPlainObject$7(map)) return "unknown";
20253
20288
  return carriesSecretValue(map, []) ? "secret" : "clean";
20254
20289
  }
20255
20290
  async function resolvedInput(node, walk) {
@@ -20317,7 +20352,7 @@ async function inputForm(value, walk) {
20317
20352
  concrete: parts.every((p) => p.concrete)
20318
20353
  };
20319
20354
  }
20320
- if (!isPlainObject$5(value)) return {
20355
+ if (!isPlainObject$7(value)) return {
20321
20356
  form: value,
20322
20357
  concrete: true
20323
20358
  };
@@ -20380,7 +20415,7 @@ async function inputForm(value, walk) {
20380
20415
  concrete: false
20381
20416
  };
20382
20417
  }
20383
- const explicit = Array.isArray(operand) && isPlainObject$5(operand[1]) ? operand[1] : {};
20418
+ const explicit = Array.isArray(operand) && isPlainObject$7(operand[1]) ? operand[1] : {};
20384
20419
  const vars = await inputForm(explicit, walk);
20385
20420
  const placeholders = [];
20386
20421
  let concrete = vars.concrete && !text.includes(DYNAMIC_REFERENCE_OPEN);
@@ -20433,8 +20468,8 @@ function newWalk(sources, nested = {
20433
20468
  }) {
20434
20469
  return {
20435
20470
  sources,
20436
- resources: isPlainObject$5(sources.template.Resources) ? sources.template.Resources : {},
20437
- parameters: isPlainObject$5(sources.template.Parameters) ? sources.template.Parameters : {},
20471
+ resources: isPlainObject$7(sources.template.Resources) ? sources.template.Resources : {},
20472
+ parameters: isPlainObject$7(sources.template.Parameters) ? sources.template.Parameters : {},
20438
20473
  taint: /* @__PURE__ */ new Map(),
20439
20474
  inProgress: /* @__PURE__ */ new Set(),
20440
20475
  stackChain: nested.stackChain,
@@ -20458,34 +20493,34 @@ function passedKey(passed) {
20458
20493
  function isNestedStackRow(logicalId, walk) {
20459
20494
  if (!Object.hasOwn(walk.resources, logicalId)) return false;
20460
20495
  const definition = walk.resources[logicalId];
20461
- return isPlainObject$5(definition) && definition["Type"] === NESTED_STACK_TYPE$4;
20496
+ return isPlainObject$7(definition) && definition["Type"] === NESTED_STACK_TYPE$4;
20462
20497
  }
20463
20498
  function getAttAttribute(operand, target) {
20464
20499
  if (Array.isArray(operand)) return operand.length === 2 && typeof operand[1] === "string" ? operand[1] : void 0;
20465
20500
  return typeof operand === "string" ? operand.slice(target.length + 1) : void 0;
20466
20501
  }
20467
20502
  function rowParameters(definition) {
20468
- const properties = isPlainObject$5(definition) ? definition["Properties"] : void 0;
20503
+ const properties = isPlainObject$7(definition) ? definition["Properties"] : void 0;
20469
20504
  if (properties === void 0) return {};
20470
- if (!isPlainObject$5(properties)) return "unknown";
20505
+ if (!isPlainObject$7(properties)) return "unknown";
20471
20506
  const parameters = properties["Parameters"];
20472
20507
  if (parameters === void 0) return {};
20473
- if (!isPlainObject$5(parameters) || intrinsicKey(parameters) !== void 0) return "unknown";
20508
+ if (!isPlainObject$7(parameters) || intrinsicKey(parameters) !== void 0) return "unknown";
20474
20509
  return parameters;
20475
20510
  }
20476
20511
  function childParameterInputs(template, passed) {
20477
- const declared = isPlainObject$5(template.Parameters) ? template.Parameters : {};
20512
+ const declared = isPlainObject$7(template.Parameters) ? template.Parameters : {};
20478
20513
  const inputs = /* @__PURE__ */ new Map();
20479
20514
  for (const name of Object.keys(declared)) {
20480
20515
  const definition = declared[name];
20481
- if (isPlainObject$5(definition) && declaresNoEcho(definition)) inputs.set(name, { kind: "secret" });
20516
+ if (isPlainObject$7(definition) && declaresNoEcho(definition)) inputs.set(name, { kind: "secret" });
20482
20517
  else if (passed.has(name)) {
20483
20518
  const passedClass = passed.get(name);
20484
20519
  inputs.set(name, passedClass === "clean" ? {
20485
20520
  kind: "value",
20486
20521
  value: void 0
20487
20522
  } : passedClass === "unknown" ? { kind: "unknown" } : { kind: "secret" });
20488
- } else if (isPlainObject$5(definition) && Object.hasOwn(definition, "Default") && !carriesSecretValue(definition["Default"], [])) inputs.set(name, {
20523
+ } else if (isPlainObject$7(definition) && Object.hasOwn(definition, "Default") && !carriesSecretValue(definition["Default"], [])) inputs.set(name, {
20489
20524
  kind: "value",
20490
20525
  value: definition["Default"]
20491
20526
  });
@@ -20502,7 +20537,7 @@ function closureClass(closure) {
20502
20537
  return closure.unread ? "unread" : "clean";
20503
20538
  }
20504
20539
  async function childOutputClass(loaded, outputName, passed, chain, shared) {
20505
- if (loaded === void 0 || !isPlainObject$5(loaded.template)) return "unknown";
20540
+ if (loaded === void 0 || !isPlainObject$7(loaded.template)) return "unknown";
20506
20541
  const scopeKey = JSON.stringify([loaded.identity, passedKey(passed)]);
20507
20542
  const memoKey = JSON.stringify([scopeKey, outputName]);
20508
20543
  const memo = shared.outputs.get(memoKey);
@@ -20515,8 +20550,8 @@ async function classifyChildOutput(loaded, outputName, passed, chain, shared, sc
20515
20550
  if (++shared.steps > MAX_NESTED_OUTPUT_STEPS) return "unknown";
20516
20551
  if (chain.includes(loaded.identity) || chain.length >= MAX_NESTED_OUTPUT_DEPTH) return "unknown";
20517
20552
  const template = loaded.template;
20518
- const output = (isPlainObject$5(template.Outputs) ? template.Outputs : {})[outputName];
20519
- if (!isPlainObject$5(output) || !Object.hasOwn(output, "Value")) return "unknown";
20553
+ const output = (isPlainObject$7(template.Outputs) ? template.Outputs : {})[outputName];
20554
+ if (!isPlainObject$7(output) || !Object.hasOwn(output, "Value")) return "unknown";
20520
20555
  const scope = {
20521
20556
  walk: newWalk({
20522
20557
  template,
@@ -20588,7 +20623,7 @@ async function expressionClass(value, scope) {
20588
20623
  return result;
20589
20624
  };
20590
20625
  if (Array.isArray(value)) return all(value);
20591
- if (!isPlainObject$5(value)) return "clean";
20626
+ if (!isPlainObject$7(value)) return "clean";
20592
20627
  const key = intrinsicKey(value);
20593
20628
  if (key === void 0) return all(Object.values(value));
20594
20629
  const operand = value[key];
@@ -20603,7 +20638,7 @@ async function expressionClass(value, scope) {
20603
20638
  case "Fn::Sub": {
20604
20639
  const text = Array.isArray(operand) ? operand[0] : operand;
20605
20640
  if (typeof text !== "string") return worseOf("unknown", await expressionClass(operand, scope));
20606
- const vars = Array.isArray(operand) && isPlainObject$5(operand[1]) ? operand[1] : {};
20641
+ const vars = Array.isArray(operand) && isPlainObject$7(operand[1]) ? operand[1] : {};
20607
20642
  let result = text.includes(DYNAMIC_REFERENCE_OPEN) ? "secret" : "clean";
20608
20643
  result = worseOf(result, await all(Object.values(vars)));
20609
20644
  for (const name of subPlaceholders(text)) {
@@ -20667,7 +20702,7 @@ async function maskedInputFingerprint(templateValue, sources) {
20667
20702
  if (error instanceof UnknownInput) return void 0;
20668
20703
  throw error;
20669
20704
  }
20670
- const digest = createHash("sha256").update(canonicalJson$2({
20705
+ const digest = createHash("sha256").update(canonicalJson$3({
20671
20706
  layout: INPUT_FINGERPRINT_LAYOUT,
20672
20707
  value: form
20673
20708
  })).digest("hex");
@@ -20681,7 +20716,7 @@ async function classifyPassedParameters(parameters, sources) {
20681
20716
  }
20682
20717
  async function classifyPassed(parameters, sources, nested) {
20683
20718
  const classes = /* @__PURE__ */ new Map();
20684
- if (!isPlainObject$5(parameters)) return classes;
20719
+ if (!isPlainObject$7(parameters)) return classes;
20685
20720
  for (const [name, expression] of Object.entries(parameters)) {
20686
20721
  let passedClass;
20687
20722
  try {
@@ -20722,13 +20757,13 @@ function possiblyMaskedKeys(resolvedProps, corpora) {
20722
20757
  const wholeShortLeaf = (value) => {
20723
20758
  if (typeof value === "string") return short.includes(value);
20724
20759
  if (Array.isArray(value)) return value.some(wholeShortLeaf);
20725
- if (isPlainObject$5(value)) return Object.values(value).some(wholeShortLeaf);
20760
+ if (isPlainObject$7(value)) return Object.values(value).some(wholeShortLeaf);
20726
20761
  return false;
20727
20762
  };
20728
20763
  return Object.keys(resolvedProps).filter((key) => {
20729
20764
  const value = resolvedProps[key];
20730
20765
  if (carriesSecretMask(value) || wholeShortLeaf(value)) return true;
20731
- const text = canonicalJson$2(value);
20766
+ const text = canonicalJson$3(value);
20732
20767
  return long.some((needle) => text.includes(needle) || text.includes(JSON.stringify(needle).slice(1, -1)));
20733
20768
  });
20734
20769
  }
@@ -20753,7 +20788,7 @@ function maskedPropertyFingerprintsOf(record) {
20753
20788
  const read = /* @__PURE__ */ new Map();
20754
20789
  if (record === null || typeof record !== "object") return read;
20755
20790
  const field = record.maskedPropertyFingerprints;
20756
- if (!isPlainObject$5(field)) return read;
20791
+ if (!isPlainObject$7(field)) return read;
20757
20792
  for (const [key, value] of Object.entries(field)) if (typeof value === "string" && value.startsWith(FINGERPRINT_PREFIX)) read.set(key, value);
20758
20793
  return read;
20759
20794
  }
@@ -20761,7 +20796,7 @@ function maskedPropertyInputFingerprintsOf(record) {
20761
20796
  const read = /* @__PURE__ */ new Map();
20762
20797
  if (record === null || typeof record !== "object") return read;
20763
20798
  const field = record.maskedPropertyInputFingerprints;
20764
- if (!isPlainObject$5(field)) return read;
20799
+ if (!isPlainObject$7(field)) return read;
20765
20800
  const text = maskedPropertyFingerprintsOf(record);
20766
20801
  for (const [key, value] of Object.entries(field)) {
20767
20802
  if (typeof value !== "string" || !value.startsWith(INPUT_FINGERPRINT_PREFIX)) continue;
@@ -20808,7 +20843,7 @@ async function movedMaskedProperties(record, templateProps, fingerprinter, onReb
20808
20843
  function withRebaselinedFingerprints(record, fingerprints) {
20809
20844
  const text = maskedPropertyFingerprintsOf(record);
20810
20845
  const field = record.maskedPropertyInputFingerprints;
20811
- const next = isPlainObject$5(field) ? Object.entries(field) : [];
20846
+ const next = isPlainObject$7(field) ? Object.entries(field) : [];
20812
20847
  let changed = false;
20813
20848
  for (const [key, value] of Object.entries(fingerprints)) {
20814
20849
  if (text.get(key) !== splitInputFingerprint(value).text) continue;
@@ -20841,10 +20876,10 @@ function withMaskedPropertyFingerprints(scrubbed, writtenBag, templateProps, sec
20841
20876
  fingerprints = maskedPropertyFingerprintsFor(scrubbed.properties, templateProps);
20842
20877
  inputs = boundInputFingerprints(fingerprints, inputFingerprints);
20843
20878
  } else {
20844
- if (!isPlainObject$5(previous)) return scrubbed;
20879
+ if (!isPlainObject$7(previous)) return scrubbed;
20845
20880
  if (corpora.length === 0) return scrubbed;
20846
20881
  fingerprints = { ...previous };
20847
- inputs = isPlainObject$5(previousInputs) ? { ...previousInputs } : void 0;
20882
+ inputs = isPlainObject$7(previousInputs) ? { ...previousInputs } : void 0;
20848
20883
  }
20849
20884
  if (fingerprints !== void 0 && corpora.length > 0) {
20850
20885
  const refused = Object.keys(fingerprints).filter((key) => Object.hasOwn(templateProps, key) && corpora.some((corpus) => templateCarriesNeedle(templateProps[key], corpus)));
@@ -22185,11 +22220,11 @@ function validReferenceRegion(region) {
22185
22220
  if (typeof region !== "string") return void 0;
22186
22221
  return canonicalizeRegion(region) === region && isClientSafeRegion(region) ? region : void 0;
22187
22222
  }
22188
- function isPlainObject$4(value) {
22223
+ function isPlainObject$6(value) {
22189
22224
  return value !== null && typeof value === "object" && !Array.isArray(value);
22190
22225
  }
22191
22226
  function validateReferenceProvenance(token, raw) {
22192
- if (!isSingleDynamicReferenceToken(token) || !isPlainObject$4(raw)) return void 0;
22227
+ if (!isSingleDynamicReferenceToken(token) || !isPlainObject$6(raw)) return void 0;
22193
22228
  const versionsRaw = Object.hasOwn(raw, "versions") ? raw["versions"] : void 0;
22194
22229
  const readRaw = Object.hasOwn(raw, "readVersions") ? raw["readVersions"] : void 0;
22195
22230
  if (readRaw !== void 0) {
@@ -22207,11 +22242,11 @@ function validateReferenceProvenance(token, raw) {
22207
22242
  return out;
22208
22243
  }
22209
22244
  function referenceProvenanceOf(record) {
22210
- if (!isPlainObject$4(record) || !Object.hasOwn(record, "referenceProvenance")) return void 0;
22245
+ if (!isPlainObject$6(record) || !Object.hasOwn(record, "referenceProvenance")) return void 0;
22211
22246
  return validatedBag(record["referenceProvenance"]);
22212
22247
  }
22213
22248
  function validatedBag(field) {
22214
- if (!isPlainObject$4(field)) return void 0;
22249
+ if (!isPlainObject$6(field)) return void 0;
22215
22250
  const out = Object.create(null);
22216
22251
  for (const [token, raw] of Object.entries(field)) {
22217
22252
  const entry = validateReferenceProvenance(token, raw);
@@ -22220,9 +22255,9 @@ function validatedBag(field) {
22220
22255
  return { ...out };
22221
22256
  }
22222
22257
  function recordedProvenanceOf(record, token) {
22223
- if (!isPlainObject$4(record) || !Object.hasOwn(record, "referenceProvenance")) return void 0;
22258
+ if (!isPlainObject$6(record) || !Object.hasOwn(record, "referenceProvenance")) return void 0;
22224
22259
  const field = record["referenceProvenance"];
22225
- if (!isPlainObject$4(field) || !Object.hasOwn(field, token)) return void 0;
22260
+ if (!isPlainObject$6(field) || !Object.hasOwn(field, token)) return void 0;
22226
22261
  return validateReferenceProvenance(token, field[token]);
22227
22262
  }
22228
22263
  function recordedReferenceRegions(record) {
@@ -22244,7 +22279,7 @@ function regionsOf(field) {
22244
22279
  function keepHeldTokenProvenance(record) {
22245
22280
  if (!hasReferenceProvenanceField(record)) return record;
22246
22281
  const field = record.referenceProvenance;
22247
- if (!isPlainObject$4(field)) return record;
22282
+ if (!isPlainObject$6(field)) return record;
22248
22283
  const held = recordReferenceTokens(record);
22249
22284
  const keys = Object.keys(field);
22250
22285
  if (keys.every((token) => held.has(token))) return record;
@@ -22256,12 +22291,12 @@ function keepHeldTokenProvenance(record) {
22256
22291
  };
22257
22292
  }
22258
22293
  function hasReferenceProvenanceField(record) {
22259
- return isPlainObject$4(record) && Object.hasOwn(record, "referenceProvenance") && record["referenceProvenance"] !== void 0;
22294
+ return isPlainObject$6(record) && Object.hasOwn(record, "referenceProvenance") && record["referenceProvenance"] !== void 0;
22260
22295
  }
22261
22296
  function outputReferenceProvenanceOf(state, outputKey) {
22262
- if (!isPlainObject$4(state) || !Object.hasOwn(state, "outputReferenceProvenance")) return;
22297
+ if (!isPlainObject$6(state) || !Object.hasOwn(state, "outputReferenceProvenance")) return;
22263
22298
  const field = state["outputReferenceProvenance"];
22264
- if (!isPlainObject$4(field) || !Object.hasOwn(field, outputKey)) return void 0;
22299
+ if (!isPlainObject$6(field) || !Object.hasOwn(field, outputKey)) return void 0;
22265
22300
  return validatedBag(field[outputKey]);
22266
22301
  }
22267
22302
  function persistable(token, entry) {
@@ -22279,7 +22314,7 @@ function tokensUnderPaths(properties, paths) {
22279
22314
  for (const item of value) descend(item, path, next);
22280
22315
  return;
22281
22316
  }
22282
- if (isPlainObject$4(value) && Object.hasOwn(value, path[at])) descend(value[path[at]], path, at + 1);
22317
+ if (isPlainObject$6(value) && Object.hasOwn(value, path[at])) descend(value[path[at]], path, at + 1);
22283
22318
  };
22284
22319
  for (const path of paths) descend(properties, path, 0);
22285
22320
  return out;
@@ -22322,7 +22357,7 @@ function unionWithPrevious(pass, before) {
22322
22357
  }
22323
22358
  function outputProvenanceForPersist(args) {
22324
22359
  const { outputs, resolvedThisRun, carriedFrom, sinkOf } = args;
22325
- if (!resolvedThisRun) return carriedFrom !== void 0 && isPlainObject$4(carriedFrom.outputReferenceProvenance) ? carriedFrom.outputReferenceProvenance : void 0;
22360
+ if (!resolvedThisRun) return carriedFrom !== void 0 && isPlainObject$6(carriedFrom.outputReferenceProvenance) ? carriedFrom.outputReferenceProvenance : void 0;
22326
22361
  let out;
22327
22362
  for (const [outputKey, value] of Object.entries(outputs)) {
22328
22363
  const sink = sinkOf(outputKey);
@@ -25844,17 +25879,17 @@ var IntrinsicFunctionResolver = class IntrinsicFunctionResolver {
25844
25879
 
25845
25880
  //#endregion
25846
25881
  //#region src/analyzer/read-provenance-promotion.ts
25847
- function isPlainObject$3(value) {
25882
+ function isPlainObject$5(value) {
25848
25883
  return value !== null && typeof value === "object" && !Array.isArray(value);
25849
25884
  }
25850
25885
  function readsAcrossStacks(value) {
25851
25886
  if (Array.isArray(value)) return value.some(readsAcrossStacks);
25852
- if (!isPlainObject$3(value)) return false;
25887
+ if (!isPlainObject$5(value)) return false;
25853
25888
  if (Object.hasOwn(value, "Fn::ImportValue") || Object.hasOwn(value, "Fn::GetStackOutput")) return true;
25854
25889
  return Object.values(value).some(readsAcrossStacks);
25855
25890
  }
25856
25891
  function recordedReadVersions(record) {
25857
- if (!isPlainObject$3(record) || !Object.hasOwn(record, "referenceProvenance")) return void 0;
25892
+ if (!isPlainObject$5(record) || !Object.hasOwn(record, "referenceProvenance")) return void 0;
25858
25893
  const field = referenceProvenanceOf(record);
25859
25894
  if (field === void 0) return void 0;
25860
25895
  let out;
@@ -25865,7 +25900,7 @@ async function readProvenancePromotions(args) {
25865
25900
  const { currentState, desiredTemplate, sources } = args;
25866
25901
  const parser = args.parser ?? new TemplateParser();
25867
25902
  const records = currentState.resources;
25868
- const parameters = isPlainObject$3(desiredTemplate.Parameters) ? desiredTemplate.Parameters : void 0;
25903
+ const parameters = isPlainObject$5(desiredTemplate.Parameters) ? desiredTemplate.Parameters : void 0;
25869
25904
  const out = [];
25870
25905
  for (const { logicalId, changeType } of args.rows) {
25871
25906
  if (changeType !== "NO_CHANGE" && changeType !== "UPDATE") continue;
@@ -25873,7 +25908,7 @@ async function readProvenancePromotions(args) {
25873
25908
  const readVersions = recordedReadVersions(record);
25874
25909
  if (readVersions === void 0) continue;
25875
25910
  const resource = Object.hasOwn(desiredTemplate.Resources, logicalId) ? desiredTemplate.Resources[logicalId] : void 0;
25876
- const properties = isPlainObject$3(resource?.Properties) ? resource.Properties : {};
25911
+ const properties = isPlainObject$5(resource?.Properties) ? resource.Properties : {};
25877
25912
  const reads = [];
25878
25913
  for (const [key, value] of Object.entries(properties)) {
25879
25914
  const referenced = [...parser.extractReferences(value)].filter((id) => id !== logicalId);
@@ -25916,7 +25951,7 @@ async function readProvenancePromotions(args) {
25916
25951
  if (recorded.some((version) => !domain.has(version))) moved.push(token);
25917
25952
  }
25918
25953
  if (moved.length === 0) continue;
25919
- const recordProperties = isPlainObject$3(record?.properties) ? record.properties : {};
25954
+ const recordProperties = isPlainObject$5(record?.properties) ? record.properties : {};
25920
25955
  const keys = [];
25921
25956
  for (const r of reads) {
25922
25957
  if (!Object.hasOwn(recordProperties, r.key)) continue;
@@ -27489,8 +27524,8 @@ function compare(desired, previous, mask) {
27489
27524
  if (!Array.isArray(desired) || desired.length !== previous.length) return "differs";
27490
27525
  return combine(previous.map((item, i) => compare(desired[i], item, mask)));
27491
27526
  }
27492
- if (isPlainObject$2(previous)) {
27493
- if (!isPlainObject$2(desired)) return "differs";
27527
+ if (isPlainObject$4(previous)) {
27528
+ if (!isPlainObject$4(desired)) return "differs";
27494
27529
  if (!Object.keys(desired).every((k) => Object.prototype.hasOwnProperty.call(previous, k))) return "differs";
27495
27530
  return combine(Object.keys(previous).map((k) => compare(desired[k], previous[k], mask)));
27496
27531
  }
@@ -27516,7 +27551,7 @@ function resolvesReference(desired, previous, mask) {
27516
27551
  const pattern = literals.map(escapeRegExp$1).join("[\\s\\S]*");
27517
27552
  return new RegExp(`^${pattern}$`).test(desired);
27518
27553
  }
27519
- function isPlainObject$2(value) {
27554
+ function isPlainObject$4(value) {
27520
27555
  return typeof value === "object" && value !== null && !Array.isArray(value);
27521
27556
  }
27522
27557
  function escapeRegExp$1(text) {
@@ -27908,6 +27943,7 @@ const SLOW_CC_OPERATION_TIMEOUTS = {
27908
27943
  },
27909
27944
  "AWS::ElastiCache::CacheCluster": {
27910
27945
  create: 60 * MINUTE_MS,
27946
+ update: 60 * MINUTE_MS,
27911
27947
  delete: 60 * MINUTE_MS
27912
27948
  },
27913
27949
  "AWS::RDS::DBInstance": {
@@ -28466,7 +28502,7 @@ var CloudControlProvider = class {
28466
28502
  const indeterminateGuard = await this.confirmDeleteTargetIdentity(logicalId, resourceType, physicalId, context);
28467
28503
  if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
28468
28504
  this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
28469
- const { ASGProvider } = await import("./asg-provider-oKlrkJeO.js");
28505
+ const { ASGProvider } = await import("./asg-provider-CsRMe_zh.js");
28470
28506
  const delegateRegion = ambientRegion();
28471
28507
  let asgProvider = this.asgDeleteDelegates.get(delegateRegion);
28472
28508
  if (asgProvider === void 0) {
@@ -28575,7 +28611,7 @@ var CloudControlProvider = class {
28575
28611
  const family = SDK_DELETE_FAMILIES.get(resourceType);
28576
28612
  const cached = this.sdkDeleteDelegates.get(family);
28577
28613
  if (cached !== void 0 && cached.region === ccRegion) return cached.provider;
28578
- const provider = family === "rds" ? new (await (import("./rds-provider-DcBsBQLi.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-DvuvSkfJ.js"))).NeptuneProvider({ region: ccRegion });
28614
+ const provider = family === "rds" ? new (await (import("./rds-provider-BPs9JSk_.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-p59T8CFv.js"))).NeptuneProvider({ region: ccRegion });
28579
28615
  this.sdkDeleteDelegates.set(family, {
28580
28616
  region: ccRegion,
28581
28617
  provider
@@ -29731,11 +29767,11 @@ function applyNoEchoDeleteValues(properties, recordedLeaves, values) {
29731
29767
  payload: properties,
29732
29768
  unresolved: []
29733
29769
  };
29734
- const byKey = new Map((values?.leaves ?? []).map((leaf) => [canonicalJson$3(leaf.coordinate), leaf]));
29770
+ const byKey = new Map((values?.leaves ?? []).map((leaf) => [canonicalJson$4(leaf.coordinate), leaf]));
29735
29771
  const entries = [];
29736
29772
  const unresolved = [];
29737
29773
  for (const coordinate of masked) {
29738
- const leaf = byKey.get(canonicalJson$3(coordinate));
29774
+ const leaf = byKey.get(canonicalJson$4(coordinate));
29739
29775
  if (leaf === void 0) unresolved.push(coordinate);
29740
29776
  else entries.push({
29741
29777
  coordinate,
@@ -29786,7 +29822,7 @@ async function noEchoDeleteValuesFromResolved(options) {
29786
29822
  const fingerprinter = options.inputSources === void 0 ? void 0 : inputFingerprinter(templateProps, options.inputSources);
29787
29823
  const leaves = [];
29788
29824
  for (const coordinate of masked) {
29789
- if (!nodes.has(canonicalJson$3(coordinate))) continue;
29825
+ if (!nodes.has(canonicalJson$4(coordinate))) continue;
29790
29826
  if (!await fingerprintsUnchanged(record, templateProps, coordinate, fingerprinter)) continue;
29791
29827
  const value = valueAtCoordinate(resolvedProperties, coordinate);
29792
29828
  if (value === void 0 || carriesSecretMask(value)) continue;
@@ -29965,7 +30001,7 @@ var TemplateNoEchoReresolver = class TemplateNoEchoReresolver {
29965
30001
  const bag = await this.noEchoNeedles();
29966
30002
  const leaves = [];
29967
30003
  for (const coordinate of masked) {
29968
- const key = canonicalJson$3(coordinate);
30004
+ const key = canonicalJson$4(coordinate);
29969
30005
  if (!nodes.has(key)) continue;
29970
30006
  const node = nodes.get(key)?.node;
29971
30007
  if (!readsParametersOnly(node, declared, refused)) continue;
@@ -37056,7 +37092,7 @@ const DEFAULT_RESOURCE_TIMEOUT_MS = 18e5;
37056
37092
 
37057
37093
  //#endregion
37058
37094
  //#region src/analyzer/skipped-outputs.ts
37059
- function canonicalJson$1(value) {
37095
+ function canonicalJson$2(value) {
37060
37096
  return JSON.stringify(value, (_key, v) => {
37061
37097
  if (v !== null && typeof v === "object" && !Array.isArray(v)) {
37062
37098
  const sorted = Object.create(null);
@@ -37086,7 +37122,7 @@ function skippedOutputDigest(template, outputKey) {
37086
37122
  sections[section] = section === "Parameters" ? withNoEchoDefaultsMasked(body) : body;
37087
37123
  }
37088
37124
  const entry = template.Outputs?.[outputKey];
37089
- return createHash("sha256").update(canonicalJson$1({
37125
+ return createHash("sha256").update(canonicalJson$2({
37090
37126
  output: entry,
37091
37127
  template: sections
37092
37128
  })).digest("hex");
@@ -38959,7 +38995,7 @@ function maskRestoredNoEchoRecord(record, baseline, substituted = []) {
38959
38995
  const marked = noEchoLeavesOf(baseline) ?? [];
38960
38996
  const names = declaredNoEchoAttributeNames(baseline);
38961
38997
  if (marked.length === 0 && names.length === 0 && substituted.length === 0) return record;
38962
- const echoes = (name, value) => value !== record.physicalId && substituted.some((leaf) => leaf.coordinate[0] === name && canonicalJson$3(leaf.value) === canonicalJson$3(value));
38998
+ const echoes = (name, value) => value !== record.physicalId && substituted.some((leaf) => leaf.coordinate[0] === name && canonicalJson$4(leaf.value) === canonicalJson$4(value));
38963
38999
  let attributes = record.attributes;
38964
39000
  if (attributes !== void 0 && attributes !== null && typeof attributes === "object") for (const [name, value] of Object.entries(attributes)) {
38965
39001
  if (!names.includes(name) && !echoes(name, value)) continue;
@@ -38970,7 +39006,7 @@ function maskRestoredNoEchoRecord(record, baseline, substituted = []) {
38970
39006
  const list = coordinate.findIndex((segment) => typeof segment === "number");
38971
39007
  if (list < 0) return false;
38972
39008
  const path = coordinate.slice(0, list);
38973
- return canonicalJson$3(valueAtCoordinate(byIndex, path)) !== canonicalJson$3(valueAtCoordinate(baseline.properties, path));
39009
+ return canonicalJson$4(valueAtCoordinate(byIndex, path)) !== canonicalJson$4(valueAtCoordinate(baseline.properties, path));
38974
39010
  });
38975
39011
  const properties = reshaped.length === 0 ? byIndex : maskReadbackAtCoordinates(byIndex, baseline.properties, reshaped);
38976
39012
  const widened = reshaped.map((coordinate) => readbackPathFor(byIndex, baseline.properties, coordinate)).filter((path, i) => path !== void 0 && path.length < reshaped[i].length);
@@ -44819,18 +44855,18 @@ function conditionInputsFrom(args) {
44819
44855
  };
44820
44856
  }
44821
44857
  const FINGERPRINT_LAYOUT = 1;
44822
- function isPlainObject$1(value) {
44858
+ function isPlainObject$3(value) {
44823
44859
  return value !== null && typeof value === "object" && !Array.isArray(value);
44824
44860
  }
44825
- function canonicalJson(value) {
44826
- if (Array.isArray(value)) return `[${value.map(canonicalJson).join(",")}]`;
44827
- if (isPlainObject$1(value)) return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson(value[key])}`).join(",")}}`;
44861
+ function canonicalJson$1(value) {
44862
+ if (Array.isArray(value)) return `[${value.map(canonicalJson$1).join(",")}]`;
44863
+ if (isPlainObject$3(value)) return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson$1(value[key])}`).join(",")}}`;
44828
44864
  const encoded = JSON.stringify(value);
44829
44865
  return encoded === void 0 ? "undefined" : encoded;
44830
44866
  }
44831
44867
  function walkModelledDefinition(value, declaredParameters, parameters, conditions) {
44832
44868
  if (typeof value === "string") return !carriesDynamicReference(value);
44833
- if (!isPlainObject$1(value)) return false;
44869
+ if (!isPlainObject$3(value)) return false;
44834
44870
  const keys = Object.keys(value);
44835
44871
  if (keys.length !== 1) return false;
44836
44872
  const [key] = keys;
@@ -44853,8 +44889,8 @@ function walkModelledDefinition(value, declaredParameters, parameters, condition
44853
44889
  }
44854
44890
  function conditionFingerprint(template, name, inputOf) {
44855
44891
  const definitions = template.Conditions;
44856
- if (!isPlainObject$1(definitions)) return void 0;
44857
- const declared = isPlainObject$1(template.Parameters) ? template.Parameters : {};
44892
+ if (!isPlainObject$3(definitions)) return void 0;
44893
+ const declared = isPlainObject$3(template.Parameters) ? template.Parameters : {};
44858
44894
  const declaredNames = new Set(Object.keys(declared));
44859
44895
  const closure = nullPrototypeRecord();
44860
44896
  const parameters = /* @__PURE__ */ new Set();
@@ -44876,7 +44912,7 @@ function conditionFingerprint(template, name, inputOf) {
44876
44912
  let hasToken = false;
44877
44913
  for (const parameter of parameters) {
44878
44914
  const definition = declared[parameter];
44879
- const type = isPlainObject$1(definition) ? definition["Type"] : void 0;
44915
+ const type = isPlainObject$3(definition) ? definition["Type"] : void 0;
44880
44916
  if (typeof type !== "string") return void 0;
44881
44917
  const input = inputOf(parameter);
44882
44918
  if (input === void 0) return void 0;
@@ -44894,7 +44930,7 @@ function conditionFingerprint(template, name, inputOf) {
44894
44930
  }
44895
44931
  }
44896
44932
  return {
44897
- fingerprint: `sha256:${createHash("sha256").update(canonicalJson({
44933
+ fingerprint: `sha256:${createHash("sha256").update(canonicalJson$1({
44898
44934
  layout: FINGERPRINT_LAYOUT,
44899
44935
  conditions: closure,
44900
44936
  parameters: inputs
@@ -44907,7 +44943,7 @@ function collectIfConditionNames(value, names, conditions) {
44907
44943
  for (const element of value) collectIfConditionNames(element, names, conditions);
44908
44944
  return;
44909
44945
  }
44910
- if (!isPlainObject$1(value)) return;
44946
+ if (!isPlainObject$3(value)) return;
44911
44947
  const ifArgs = value["Fn::If"];
44912
44948
  if (Array.isArray(ifArgs) && typeof ifArgs[0] === "string") {
44913
44949
  names.add(ifArgs[0]);
@@ -44921,9 +44957,9 @@ function collectIfConditionNames(value, names, conditions) {
44921
44957
  function conditionsReadByDiff(template, conditions) {
44922
44958
  const names = /* @__PURE__ */ new Set();
44923
44959
  for (const section of [template.Resources, template.Outputs]) {
44924
- if (!isPlainObject$1(section)) continue;
44960
+ if (!isPlainObject$3(section)) continue;
44925
44961
  for (const entry of Object.values(section)) {
44926
- if (!isPlainObject$1(entry)) continue;
44962
+ if (!isPlainObject$3(entry)) continue;
44927
44963
  const gate = entry["Condition"];
44928
44964
  if (typeof gate === "string") {
44929
44965
  names.add(gate);
@@ -44955,10 +44991,10 @@ function buildConditionVerdictRecord(template, conditions, inputOf) {
44955
44991
  function readRecordedConditionVerdicts(state) {
44956
44992
  const read = nullPrototypeRecord();
44957
44993
  const field = state?.conditionVerdicts;
44958
- if (!isPlainObject$1(field)) return read;
44994
+ if (!isPlainObject$3(field)) return read;
44959
44995
  for (const name of Object.keys(field)) {
44960
44996
  const entry = field[name];
44961
- if (isPlainObject$1(entry) && typeof entry["verdict"] === "boolean" && typeof entry["fingerprint"] === "string") read[name] = {
44997
+ if (isPlainObject$3(entry) && typeof entry["verdict"] === "boolean" && typeof entry["fingerprint"] === "string") read[name] = {
44962
44998
  verdict: entry["verdict"],
44963
44999
  fingerprint: entry["fingerprint"]
44964
45000
  };
@@ -45004,11 +45040,11 @@ function deployConditionInputs(parameterValues, inheritedSecrets, shadowedBy = /
45004
45040
  function parentSuppliedValues(template, supplied, tokens) {
45005
45041
  const names = /* @__PURE__ */ new Set();
45006
45042
  if (supplied === void 0) return names;
45007
- const declared = isPlainObject$1(template.Parameters) ? template.Parameters : {};
45043
+ const declared = isPlainObject$3(template.Parameters) ? template.Parameters : {};
45008
45044
  for (const [name, value] of Object.entries(supplied)) {
45009
45045
  if (tokens.has(name)) continue;
45010
45046
  const definition = declared[name];
45011
- const fallback = isPlainObject$1(definition) ? definition["Default"] : void 0;
45047
+ const fallback = isPlainObject$3(definition) ? definition["Default"] : void 0;
45012
45048
  if (fallback === void 0 || String(fallback) !== String(value)) names.add(name);
45013
45049
  }
45014
45050
  return names;
@@ -45343,7 +45379,7 @@ function deferredServiceTokenWarning(row) {
45343
45379
 
45344
45380
  //#endregion
45345
45381
  //#region src/deployment/read-provenance-sources.ts
45346
- function isPlainObject(value) {
45382
+ function isPlainObject$2(value) {
45347
45383
  return value !== null && typeof value === "object" && !Array.isArray(value);
45348
45384
  }
45349
45385
  function crossStackNodes(value, into = []) {
@@ -45351,7 +45387,7 @@ function crossStackNodes(value, into = []) {
45351
45387
  for (const item of value) crossStackNodes(item, into);
45352
45388
  return into;
45353
45389
  }
45354
- if (!isPlainObject(value)) return into;
45390
+ if (!isPlainObject$2(value)) return into;
45355
45391
  const keys = Object.keys(value);
45356
45392
  if (keys.length === 1 && (keys[0] === "Fn::ImportValue" || keys[0] === "Fn::GetStackOutput")) into.push(value);
45357
45393
  for (const item of Object.values(value)) crossStackNodes(item, into);
@@ -45375,11 +45411,11 @@ function crossStackOutputProvenanceSource(reads, scope, stateBackend) {
45375
45411
  function inheritedProvenanceForChildDiff(args) {
45376
45412
  const { row, rowRecord, parentRecords, parentTemplate } = args;
45377
45413
  if (!args.rowProvisioned || rowRecord === void 0) return void 0;
45378
- const recordedParameters = isPlainObject(rowRecord.properties) ? rowRecord.properties["Parameters"] : void 0;
45414
+ const recordedParameters = isPlainObject$2(rowRecord.properties) ? rowRecord.properties["Parameters"] : void 0;
45379
45415
  const tokens = referenceTokensIn(recordedParameters);
45380
45416
  if (tokens.size === 0) return void 0;
45381
45417
  const own = referenceProvenanceOf(rowRecord);
45382
- const upstreams = [...new TemplateParser().extractReferences(isPlainObject(row.Properties) ? row.Properties["Parameters"] : void 0)].filter((id) => Object.hasOwn(parentTemplate.Resources, id) && Object.hasOwn(parentRecords, id));
45418
+ const upstreams = [...new TemplateParser().extractReferences(isPlainObject$2(row.Properties) ? row.Properties["Parameters"] : void 0)].filter((id) => Object.hasOwn(parentTemplate.Resources, id) && Object.hasOwn(parentRecords, id));
45383
45419
  const out = /* @__PURE__ */ new Map();
45384
45420
  for (const token of tokens) {
45385
45421
  const versions = /* @__PURE__ */ new Set();
@@ -46210,6 +46246,41 @@ function isTruthyCfnBoolean(value) {
46210
46246
  return value === true || value === "true";
46211
46247
  }
46212
46248
 
46249
+ //#endregion
46250
+ //#region src/provisioning/dynamodb-ttl.ts
46251
+ function readTtlSpec(spec) {
46252
+ if (spec === void 0 || spec === null) return {
46253
+ enabled: false,
46254
+ attributeName: void 0
46255
+ };
46256
+ const s = spec;
46257
+ const rawName = s["AttributeName"];
46258
+ const attributeName = typeof rawName === "string" && rawName !== "" ? rawName : void 0;
46259
+ const rawEnabled = s["Enabled"];
46260
+ return {
46261
+ enabled: rawEnabled === void 0 ? true : typeof rawEnabled === "string" ? rawEnabled.toLowerCase() === "true" : Boolean(rawEnabled),
46262
+ attributeName
46263
+ };
46264
+ }
46265
+ function planTimeToLive(spec, previousSpec, mode) {
46266
+ const desired = readTtlSpec(spec);
46267
+ if (spec !== void 0 && spec !== null && desired.enabled) return desired.attributeName ? {
46268
+ kind: "enable",
46269
+ attributeName: desired.attributeName
46270
+ } : { kind: "none" };
46271
+ if (mode === "create") return { kind: "none" };
46272
+ const previousPresent = previousSpec !== void 0 && previousSpec !== null;
46273
+ const previous = readTtlSpec(previousSpec);
46274
+ if (previousPresent && previous.enabled && previous.attributeName) return {
46275
+ kind: "disable",
46276
+ attributeName: previous.attributeName
46277
+ };
46278
+ return { kind: "disable-live" };
46279
+ }
46280
+ function isTtlAlreadyDisabled(awsDetail) {
46281
+ return /TimeToLive is already disabled/i.test(awsDetail);
46282
+ }
46283
+
46213
46284
  //#endregion
46214
46285
  //#region src/provisioning/dynamodb-index-busy-delete.ts
46215
46286
  function maskedLogger(logger, maskSecrets, name) {
@@ -46428,6 +46499,718 @@ function isResourceNotFoundError(error) {
46428
46499
  return typeof error === "object" && error !== null && error.name === "ResourceNotFoundException";
46429
46500
  }
46430
46501
 
46502
+ //#endregion
46503
+ //#region src/provisioning/dynamodb-contributor-insights.ts
46504
+ const CONTRIBUTOR_INSIGHTS_KEY = "ContributorInsightsSpecification";
46505
+ function readContributorInsightsSpec(value, path) {
46506
+ if (value === void 0 || value === null) return { kind: "absent" };
46507
+ const refusal = configBooleanRefusal(value, "Enabled", path) ?? configStringRefusal(value, "Mode", "", path);
46508
+ if (refusal !== void 0) return {
46509
+ kind: "unusable",
46510
+ reason: refusal
46511
+ };
46512
+ const block = value;
46513
+ const enabled = coerceCfnBoolean(block["Enabled"]) ?? false;
46514
+ const mode = block["Mode"];
46515
+ return typeof mode === "string" && mode.length > 0 ? {
46516
+ kind: "usable",
46517
+ enabled,
46518
+ mode
46519
+ } : {
46520
+ kind: "usable",
46521
+ enabled
46522
+ };
46523
+ }
46524
+ function planContributorInsightsOp(desired, previous, onUnusable) {
46525
+ if (desired.kind === "unusable") {
46526
+ onUnusable(desired.reason);
46527
+ return;
46528
+ }
46529
+ if (desired.kind === "absent") return previous.kind === "absent" ? void 0 : { action: "DISABLE" };
46530
+ if (previous.kind === "usable" && previous.enabled === desired.enabled && (!desired.enabled || previous.mode === desired.mode)) return;
46531
+ if (!desired.enabled) return { action: "DISABLE" };
46532
+ return desired.mode === void 0 ? { action: "ENABLE" } : {
46533
+ action: "ENABLE",
46534
+ mode: desired.mode
46535
+ };
46536
+ }
46537
+ const INDEX_CONTRIBUTOR_INSIGHTS_PATH = `GlobalSecondaryIndexes[].${CONTRIBUTOR_INSIGHTS_KEY}`;
46538
+ function indexEntriesByName(value) {
46539
+ const byName = /* @__PURE__ */ new Map();
46540
+ if (!Array.isArray(value)) return byName;
46541
+ for (const entry of value) {
46542
+ if (typeof entry !== "object" || entry === null || Array.isArray(entry)) continue;
46543
+ const name = entry["IndexName"];
46544
+ if (typeof name === "string") byName.set(name, entry);
46545
+ }
46546
+ return byName;
46547
+ }
46548
+ function planIndexContributorInsightsOps(desiredIndexes, previousIndexes, onUnusable) {
46549
+ const previousByName = indexEntriesByName(previousIndexes);
46550
+ const ops = [];
46551
+ for (const [indexName, entry] of indexEntriesByName(desiredIndexes)) {
46552
+ const path = INDEX_CONTRIBUTOR_INSIGHTS_PATH;
46553
+ const op = planContributorInsightsOp(readContributorInsightsSpec(entry[CONTRIBUTOR_INSIGHTS_KEY], path), readContributorInsightsSpec(previousByName.get(indexName)?.[CONTRIBUTOR_INSIGHTS_KEY], path), (reason) => onUnusable(indexName, reason));
46554
+ if (op !== void 0) ops.push({
46555
+ indexName,
46556
+ ...op
46557
+ });
46558
+ }
46559
+ return ops;
46560
+ }
46561
+ function contributorInsightsRefusals(tableBlock, indexes) {
46562
+ const refusals = [];
46563
+ const table = readContributorInsightsSpec(tableBlock, CONTRIBUTOR_INSIGHTS_KEY);
46564
+ if (table.kind === "unusable") refusals.push(table.reason);
46565
+ if (!Array.isArray(indexes)) return refusals;
46566
+ indexes.forEach((entry, position) => {
46567
+ if (typeof entry !== "object" || entry === null || Array.isArray(entry)) return;
46568
+ const read = readContributorInsightsSpec(entry[CONTRIBUTOR_INSIGHTS_KEY], `GlobalSecondaryIndexes[${position}].${CONTRIBUTOR_INSIGHTS_KEY}`);
46569
+ if (read.kind === "unusable") refusals.push(read.reason);
46570
+ });
46571
+ return refusals;
46572
+ }
46573
+ function stripIndexContributorInsights(entry) {
46574
+ if (typeof entry !== "object" || entry === null || Array.isArray(entry)) return entry;
46575
+ if (!("ContributorInsightsSpecification" in entry)) return entry;
46576
+ const { [CONTRIBUTOR_INSIGHTS_KEY]: _stripped, ...rest } = entry;
46577
+ return rest;
46578
+ }
46579
+ function indexDeclaresContributorInsights(desiredEntry) {
46580
+ return readContributorInsightsSpec(desiredEntry?.[CONTRIBUTOR_INSIGHTS_KEY], "").kind === "usable";
46581
+ }
46582
+ function enabledForStatus(status, transientAsTarget) {
46583
+ if (status === "ENABLED" || transientAsTarget && status === "ENABLING") return true;
46584
+ if (status === "DISABLED" || transientAsTarget && status === "DISABLING") return false;
46585
+ }
46586
+ function reverseMapTableContributorInsights(status, mode) {
46587
+ const enabled = enabledForStatus(status, false);
46588
+ if (enabled === void 0) return void 0;
46589
+ const block = { Enabled: enabled };
46590
+ if (enabled && mode !== void 0) block["Mode"] = mode;
46591
+ return block;
46592
+ }
46593
+ function reverseMapIndexContributorInsights(status, mode, declaredBlock) {
46594
+ const declared = readContributorInsightsSpec(declaredBlock, INDEX_CONTRIBUTOR_INSIGHTS_PATH);
46595
+ if (declared.kind !== "usable") return void 0;
46596
+ const enabled = enabledForStatus(status, true);
46597
+ if (enabled === void 0) return void 0;
46598
+ const declaredEnabled = declaredBlock["Enabled"];
46599
+ const block = { Enabled: typeof declaredEnabled !== "string" ? enabled : declared.enabled === enabled ? declaredEnabled : String(enabled) };
46600
+ if (enabled && declared.mode !== void 0) {
46601
+ const liveMode = mode ?? (status === "ENABLING" ? declared.mode : void 0);
46602
+ if (liveMode !== void 0) block["Mode"] = liveMode;
46603
+ }
46604
+ return block;
46605
+ }
46606
+
46607
+ //#endregion
46608
+ //#region src/provisioning/dynamodb-replica-settings.ts
46609
+ const PITR_KEY = "PointInTimeRecoverySpecification";
46610
+ const KINESIS_KEY = "KinesisStreamSpecification";
46611
+ const TABLE_POLICY_KEY = "ResourcePolicy";
46612
+ const REPLICA_STREAM_KEY = "ReplicaStreamSpecification";
46613
+ const DEFAULT_RECOVERY_PERIOD_DAYS = 35;
46614
+ const DEFAULT_KINESIS_PRECISION = "MILLISECOND";
46615
+ const PITR_PATH = `Replicas[].${PITR_KEY}`;
46616
+ const CI_PATH = `Replicas[].${CONTRIBUTOR_INSIGHTS_KEY}`;
46617
+ const KINESIS_PATH = `Replicas[].${KINESIS_KEY}`;
46618
+ const TABLE_POLICY_PATH = `Replicas[].${TABLE_POLICY_KEY}`;
46619
+ const STREAM_POLICY_PATH = `Replicas[].${REPLICA_STREAM_KEY}.ResourcePolicy`;
46620
+ function isPlainObject$1(value) {
46621
+ return typeof value === "object" && value !== null && !Array.isArray(value);
46622
+ }
46623
+ function readPitrSpec(value) {
46624
+ if (value === void 0 || value === null) return { kind: "absent" };
46625
+ const refusal = configBooleanRefusal(value, "PointInTimeRecoveryEnabled", PITR_PATH) ?? configIntegerRefusal(value, "RecoveryPeriodInDays", PITR_PATH, 1, 35);
46626
+ if (refusal !== void 0) return {
46627
+ kind: "unusable",
46628
+ reason: refusal
46629
+ };
46630
+ const block = value;
46631
+ const enabled = coerceCfnBoolean(block["PointInTimeRecoveryEnabled"]) ?? false;
46632
+ const period = enabled ? coerceCfnInteger(block["RecoveryPeriodInDays"]) : void 0;
46633
+ return period === void 0 ? {
46634
+ kind: "usable",
46635
+ enabled
46636
+ } : {
46637
+ kind: "usable",
46638
+ enabled,
46639
+ recoveryPeriodInDays: period
46640
+ };
46641
+ }
46642
+ function readKinesisSpec(value) {
46643
+ if (value === void 0 || value === null) return { kind: "absent" };
46644
+ const refusal = configStringRefusal(value, "StreamArn", "required", KINESIS_PATH) ?? configStringRefusal(value, "ApproximateCreationDateTimePrecision", "", KINESIS_PATH);
46645
+ if (refusal !== void 0) return {
46646
+ kind: "unusable",
46647
+ reason: refusal
46648
+ };
46649
+ const block = value;
46650
+ const streamArn = block["StreamArn"];
46651
+ if (typeof streamArn !== "string") return {
46652
+ kind: "unusable",
46653
+ reason: `${KINESIS_PATH}.StreamArn is required`
46654
+ };
46655
+ const precision = block["ApproximateCreationDateTimePrecision"];
46656
+ return typeof precision === "string" && precision.length > 0 ? {
46657
+ kind: "usable",
46658
+ streamArn,
46659
+ precision
46660
+ } : {
46661
+ kind: "usable",
46662
+ streamArn
46663
+ };
46664
+ }
46665
+ function readPolicyBlock(value, path) {
46666
+ if (value === void 0 || value === null) return { kind: "absent" };
46667
+ if (!isPlainObject$1(value)) return {
46668
+ kind: "unusable",
46669
+ reason: `${path} must be an object with a PolicyDocument`
46670
+ };
46671
+ const document = value["PolicyDocument"];
46672
+ if (typeof document === "string") return document.trim() === "" ? {
46673
+ kind: "unusable",
46674
+ reason: `${path}.PolicyDocument must not be a blank string`
46675
+ } : {
46676
+ kind: "usable",
46677
+ document
46678
+ };
46679
+ if (!isPlainObject$1(document)) return {
46680
+ kind: "unusable",
46681
+ reason: `${path}.PolicyDocument must be a policy object or a JSON string`
46682
+ };
46683
+ const keys = Object.keys(document);
46684
+ if (keys.length === 1 && (keys[0] === "Ref" || keys[0].startsWith("Fn::"))) return {
46685
+ kind: "unusable",
46686
+ reason: `${path}.PolicyDocument is an unresolved intrinsic`
46687
+ };
46688
+ return {
46689
+ kind: "usable",
46690
+ document: JSON.stringify(document)
46691
+ };
46692
+ }
46693
+ function readTablePolicy(replica) {
46694
+ return readPolicyBlock(replica?.[TABLE_POLICY_KEY], TABLE_POLICY_PATH);
46695
+ }
46696
+ function readStreamPolicy$1(replica) {
46697
+ const stream = replica?.[REPLICA_STREAM_KEY];
46698
+ if (stream === void 0 || stream === null) return { kind: "absent" };
46699
+ if (!isPlainObject$1(stream)) return {
46700
+ kind: "unusable",
46701
+ reason: `Replicas[].${REPLICA_STREAM_KEY} must be an object`
46702
+ };
46703
+ return readPolicyBlock(stream["ResourcePolicy"], STREAM_POLICY_PATH);
46704
+ }
46705
+ function replicaSettingRefusals(replica) {
46706
+ return [
46707
+ readPitrSpec(replica?.[PITR_KEY]),
46708
+ readContributorInsightsSpec(replica?.[CONTRIBUTOR_INSIGHTS_KEY], CI_PATH),
46709
+ readKinesisSpec(replica?.[KINESIS_KEY]),
46710
+ readTablePolicy(replica),
46711
+ readStreamPolicy$1(replica)
46712
+ ].flatMap((read) => read.kind === "unusable" ? [read.reason] : []);
46713
+ }
46714
+ function settingOf(op) {
46715
+ switch (op.kind) {
46716
+ case "pitr": return "pitr";
46717
+ case "contributorInsights": return "contributorInsights";
46718
+ case "kinesisDisable":
46719
+ case "kinesisEnable":
46720
+ case "kinesisPrecision": return "kinesis";
46721
+ case "deleteTablePolicy":
46722
+ case "putTablePolicy": return "tablePolicy";
46723
+ case "deleteStreamPolicy":
46724
+ case "putStreamPolicy": return "streamPolicy";
46725
+ }
46726
+ }
46727
+ const SETTING_MEMBER = {
46728
+ pitr: PITR_KEY,
46729
+ contributorInsights: CONTRIBUTOR_INSIGHTS_KEY,
46730
+ kinesis: KINESIS_KEY,
46731
+ tablePolicy: TABLE_POLICY_KEY,
46732
+ streamPolicy: `${REPLICA_STREAM_KEY}.ResourcePolicy`
46733
+ };
46734
+ function samePolicyDocument$1(left, right) {
46735
+ if (left === right) return true;
46736
+ try {
46737
+ return JSON.stringify(JSON.parse(left)) === JSON.stringify(JSON.parse(right));
46738
+ } catch {
46739
+ return false;
46740
+ }
46741
+ }
46742
+ function planReplicaSettingOps(desired, previous, options, onUnusable) {
46743
+ const prev = options.fresh ? void 0 : previous;
46744
+ const ops = [];
46745
+ const removes = (setting) => options.keepOnRemoval?.has(setting) !== true;
46746
+ const pitr = readPitrSpec(desired?.[PITR_KEY]);
46747
+ const prevPitr = readPitrSpec(prev?.[PITR_KEY]);
46748
+ if (pitr.kind === "unusable") onUnusable(pitr.reason);
46749
+ else if (pitr.kind === "absent") {
46750
+ if (prevPitr.kind !== "absent" && removes("pitr")) ops.push({
46751
+ kind: "pitr",
46752
+ enabled: false
46753
+ });
46754
+ } else {
46755
+ const unchanged = prevPitr.kind === "usable" && prevPitr.enabled === pitr.enabled && prevPitr.recoveryPeriodInDays === pitr.recoveryPeriodInDays;
46756
+ const noop = options.fresh && !pitr.enabled;
46757
+ if (!unchanged && !noop) ops.push(pitr.recoveryPeriodInDays === void 0 ? {
46758
+ kind: "pitr",
46759
+ enabled: pitr.enabled
46760
+ } : {
46761
+ kind: "pitr",
46762
+ enabled: pitr.enabled,
46763
+ recoveryPeriodInDays: pitr.recoveryPeriodInDays
46764
+ });
46765
+ }
46766
+ const desiredCi = readContributorInsightsSpec(desired?.[CONTRIBUTOR_INSIGHTS_KEY], CI_PATH);
46767
+ const ci = planContributorInsightsOp(desiredCi, readContributorInsightsSpec(prev?.[CONTRIBUTOR_INSIGHTS_KEY], CI_PATH), onUnusable);
46768
+ if (ci !== void 0 && !(options.fresh && ci.action === "DISABLE") && !(desiredCi.kind === "absent" && !removes("contributorInsights"))) ops.push(ci.mode === void 0 ? {
46769
+ kind: "contributorInsights",
46770
+ action: ci.action
46771
+ } : {
46772
+ kind: "contributorInsights",
46773
+ action: ci.action,
46774
+ mode: ci.mode
46775
+ });
46776
+ const kinesis = readKinesisSpec(desired?.[KINESIS_KEY]);
46777
+ const prevKinesis = readKinesisSpec(prev?.[KINESIS_KEY]);
46778
+ if (kinesis.kind === "unusable") onUnusable(kinesis.reason);
46779
+ else if (kinesis.kind === "absent") {
46780
+ if (prevKinesis.kind === "usable" && removes("kinesis")) ops.push({
46781
+ kind: "kinesisDisable",
46782
+ streamArn: prevKinesis.streamArn
46783
+ });
46784
+ } else if (prevKinesis.kind === "usable" && prevKinesis.streamArn === kinesis.streamArn) {
46785
+ if (kinesis.precision !== void 0 && kinesis.precision !== prevKinesis.precision) ops.push({
46786
+ kind: "kinesisPrecision",
46787
+ streamArn: kinesis.streamArn,
46788
+ precision: kinesis.precision
46789
+ });
46790
+ else if (kinesis.precision === void 0 && prevKinesis.precision !== void 0 && prevKinesis.precision !== DEFAULT_KINESIS_PRECISION && removes("kinesis")) ops.push({
46791
+ kind: "kinesisPrecision",
46792
+ streamArn: kinesis.streamArn,
46793
+ precision: DEFAULT_KINESIS_PRECISION
46794
+ });
46795
+ } else {
46796
+ if (prevKinesis.kind === "usable") ops.push({
46797
+ kind: "kinesisDisable",
46798
+ streamArn: prevKinesis.streamArn
46799
+ });
46800
+ ops.push(kinesis.precision === void 0 ? {
46801
+ kind: "kinesisEnable",
46802
+ streamArn: kinesis.streamArn
46803
+ } : {
46804
+ kind: "kinesisEnable",
46805
+ streamArn: kinesis.streamArn,
46806
+ precision: kinesis.precision
46807
+ });
46808
+ }
46809
+ const policyOps = (want, had, replaced, put, del, setting) => {
46810
+ if (want.kind === "unusable") {
46811
+ onUnusable(want.reason);
46812
+ return;
46813
+ }
46814
+ if (want.kind === "absent") {
46815
+ if (had.kind !== "absent" && removes(setting)) ops.push(del);
46816
+ return;
46817
+ }
46818
+ if (!replaced && had.kind === "usable" && samePolicyDocument$1(had.document, want.document)) return;
46819
+ ops.push(put(want.document));
46820
+ };
46821
+ policyOps(readTablePolicy(desired), readTablePolicy(prev), false, (document) => ({
46822
+ kind: "putTablePolicy",
46823
+ document
46824
+ }), { kind: "deleteTablePolicy" }, "tablePolicy");
46825
+ policyOps(readStreamPolicy$1(desired), readStreamPolicy$1(prev), options.streamReplaced === true, (document) => ({
46826
+ kind: "putStreamPolicy",
46827
+ document
46828
+ }), { kind: "deleteStreamPolicy" }, "streamPolicy");
46829
+ return ops;
46830
+ }
46831
+ function planReplicaSettingCorrections(desired, live, only) {
46832
+ const ops = [];
46833
+ const pitr = readPitrSpec(desired?.[PITR_KEY]);
46834
+ if (only.has("pitr") && pitr.kind === "usable" && live.pitr !== void 0) {
46835
+ if (pitr.enabled && !live.pitr.enabled) ops.push(pitr.recoveryPeriodInDays === void 0 ? {
46836
+ kind: "pitr",
46837
+ enabled: pitr.enabled
46838
+ } : {
46839
+ kind: "pitr",
46840
+ enabled: pitr.enabled,
46841
+ recoveryPeriodInDays: pitr.recoveryPeriodInDays
46842
+ });
46843
+ }
46844
+ const ci = readContributorInsightsSpec(desired?.[CONTRIBUTOR_INSIGHTS_KEY], CI_PATH);
46845
+ if (only.has("contributorInsights") && ci.kind === "usable" && live.contributorInsightsEnabled !== void 0 && live.contributorInsightsEnabled !== ci.enabled) ops.push(!ci.enabled ? {
46846
+ kind: "contributorInsights",
46847
+ action: "DISABLE"
46848
+ } : ci.mode === void 0 ? {
46849
+ kind: "contributorInsights",
46850
+ action: "ENABLE"
46851
+ } : {
46852
+ kind: "contributorInsights",
46853
+ action: "ENABLE",
46854
+ mode: ci.mode
46855
+ });
46856
+ const kinesis = readKinesisSpec(desired?.[KINESIS_KEY]);
46857
+ if (only.has("kinesis") && kinesis.kind === "usable" && live.kinesisStreamArns !== void 0 && !live.kinesisStreamArns.has(kinesis.streamArn)) ops.push(kinesis.precision === void 0 ? {
46858
+ kind: "kinesisEnable",
46859
+ streamArn: kinesis.streamArn
46860
+ } : {
46861
+ kind: "kinesisEnable",
46862
+ streamArn: kinesis.streamArn,
46863
+ precision: kinesis.precision
46864
+ });
46865
+ const tablePolicy = readTablePolicy(desired);
46866
+ if (only.has("tablePolicy") && tablePolicy.kind === "usable" && live.hasTablePolicy === false) ops.push({
46867
+ kind: "putTablePolicy",
46868
+ document: tablePolicy.document
46869
+ });
46870
+ const streamPolicy = readStreamPolicy$1(desired);
46871
+ if (only.has("streamPolicy") && streamPolicy.kind === "usable" && live.hasStreamPolicy === false) ops.push({
46872
+ kind: "putStreamPolicy",
46873
+ document: streamPolicy.document
46874
+ });
46875
+ return ops;
46876
+ }
46877
+ function declaredReplicaSettings(desired) {
46878
+ const declared = /* @__PURE__ */ new Set();
46879
+ if (readPitrSpec(desired?.["PointInTimeRecoverySpecification"]).kind === "usable") declared.add("pitr");
46880
+ if (readContributorInsightsSpec(desired?.["ContributorInsightsSpecification"], CI_PATH).kind === "usable") declared.add("contributorInsights");
46881
+ if (readKinesisSpec(desired?.["KinesisStreamSpecification"]).kind === "usable") declared.add("kinesis");
46882
+ if (readTablePolicy(desired).kind === "usable") declared.add("tablePolicy");
46883
+ if (readStreamPolicy$1(desired).kind === "usable") declared.add("streamPolicy");
46884
+ return declared;
46885
+ }
46886
+ function enabledForReadStatus(status) {
46887
+ if (status === "ENABLED" || status === "ENABLING") return true;
46888
+ if (status === "DISABLED" || status === "DISABLING") return false;
46889
+ }
46890
+ function reverseMapReplicaPitr(status, recoveryPeriodInDays, declaredBlock) {
46891
+ const enabled = enabledForReadStatus(status);
46892
+ if (enabled === void 0) return void 0;
46893
+ const block = { PointInTimeRecoveryEnabled: enabled };
46894
+ if (!enabled) return block;
46895
+ const declared = readPitrSpec(declaredBlock);
46896
+ const period = recoveryPeriodInDays ?? (status === "ENABLING" ? (declared.kind === "usable" ? declared.recoveryPeriodInDays : void 0) ?? DEFAULT_RECOVERY_PERIOD_DAYS : void 0);
46897
+ if (period !== void 0) block["RecoveryPeriodInDays"] = period;
46898
+ return block;
46899
+ }
46900
+ function reverseMapReplicaContributorInsights(status, mode, declaredBlock) {
46901
+ const enabled = enabledForReadStatus(status);
46902
+ if (enabled === void 0) return void 0;
46903
+ const block = { Enabled: enabled };
46904
+ const declared = readContributorInsightsSpec(declaredBlock, CI_PATH);
46905
+ if (enabled && declared.kind === "usable" && declared.mode !== void 0) {
46906
+ const liveMode = mode ?? (status === "ENABLING" ? declared.mode : void 0);
46907
+ if (liveMode !== void 0) block["Mode"] = liveMode;
46908
+ }
46909
+ return block;
46910
+ }
46911
+ const READBACK_5381_MEMBERS = [
46912
+ "SSESpecification",
46913
+ "TableClass",
46914
+ "DeletionProtectionEnabled",
46915
+ TABLE_POLICY_KEY,
46916
+ REPLICA_STREAM_KEY
46917
+ ];
46918
+ const READBACK_5381_NESTED = [[
46919
+ PITR_KEY,
46920
+ "RecoveryPeriodInDays",
46921
+ "PointInTimeRecoveryEnabled"
46922
+ ], [
46923
+ CONTRIBUTOR_INSIGHTS_KEY,
46924
+ "Mode",
46925
+ "Enabled"
46926
+ ]];
46927
+ function isPre5381ReplicaBaseline(baseline) {
46928
+ if ("TableClass" in baseline || "DeletionProtectionEnabled" in baseline) return true;
46929
+ const replicas = baseline["Replicas"];
46930
+ return Array.isArray(replicas) && replicas.some((r) => isPlainObject$1(r) && "KMSMasterKeyId" in r);
46931
+ }
46932
+ function canonicalizePre5381ReplicaBaseline(baseline, aws, localRegion, localFromReadback = false) {
46933
+ if (!isPre5381ReplicaBaseline(baseline)) return baseline;
46934
+ const result = { ...baseline };
46935
+ const topLevel = {};
46936
+ for (const key of ["TableClass", "DeletionProtectionEnabled"]) if (key in result) {
46937
+ topLevel[key] = result[key];
46938
+ delete result[key];
46939
+ }
46940
+ const replicas = result["Replicas"];
46941
+ if (!Array.isArray(replicas)) return result;
46942
+ const awsReplicas = Array.isArray(aws["Replicas"]) ? aws["Replicas"] : [];
46943
+ result["Replicas"] = replicas.map((element) => {
46944
+ if (!isPlainObject$1(element)) return element;
46945
+ const region = element["Region"];
46946
+ const entry = { ...element };
46947
+ if (region === localRegion && localRegion !== "") {
46948
+ for (const [key, value] of Object.entries(topLevel)) if (localFromReadback || !(key in entry)) entry[key] = value;
46949
+ }
46950
+ if ("KMSMasterKeyId" in entry) {
46951
+ const key = entry["KMSMasterKeyId"];
46952
+ delete entry["KMSMasterKeyId"];
46953
+ if (!("SSESpecification" in entry)) entry["SSESpecification"] = { KMSMasterKeyId: key };
46954
+ }
46955
+ const live = awsReplicas.find((r) => isPlainObject$1(r) && r["Region"] === region);
46956
+ if (live !== void 0) {
46957
+ for (const member of READBACK_5381_MEMBERS) if (!(member in entry) && member in live) entry[member] = structuredClone(live[member]);
46958
+ for (const [block, member, flag] of READBACK_5381_NESTED) {
46959
+ const mine = entry[block];
46960
+ const theirs = live[block];
46961
+ if (isPlainObject$1(mine) && isPlainObject$1(theirs) && !(member in mine) && member in theirs && mine[flag] === theirs[flag]) entry[block] = {
46962
+ ...mine,
46963
+ [member]: theirs[member]
46964
+ };
46965
+ }
46966
+ }
46967
+ return entry;
46968
+ });
46969
+ return result;
46970
+ }
46971
+ const UNREAD_REPLICA_MEMBERS = [
46972
+ "TableClass",
46973
+ "DeletionProtectionEnabled",
46974
+ "SSESpecification"
46975
+ ];
46976
+ function keepUnreadReplicaMembers(desired, previous) {
46977
+ const replicas = desired["Replicas"];
46978
+ const prevReplicas = previous["Replicas"];
46979
+ if (!Array.isArray(replicas) || !Array.isArray(prevReplicas)) return desired;
46980
+ const sse = desired["SSESpecification"];
46981
+ const sseOn = isPlainObject$1(sse) && coerceCfnBoolean(sse["SSEEnabled"]) !== false;
46982
+ let changed = false;
46983
+ const completed = replicas.map((element) => {
46984
+ if (!isPlainObject$1(element)) return element;
46985
+ const live = prevReplicas.find((r) => isPlainObject$1(r) && r["Region"] === element["Region"]);
46986
+ if (live === void 0) return element;
46987
+ const entry = { ...element };
46988
+ let touched = false;
46989
+ for (const member of UNREAD_REPLICA_MEMBERS) {
46990
+ if (member === "SSESpecification" && !sseOn) continue;
46991
+ if (!(member in entry) && member in live) {
46992
+ entry[member] = structuredClone(live[member]);
46993
+ touched = true;
46994
+ }
46995
+ }
46996
+ const pitr = entry[PITR_KEY];
46997
+ const wantPitr = readPitrSpec(pitr);
46998
+ const livePitr = readPitrSpec(live[PITR_KEY]);
46999
+ if (isPlainObject$1(pitr) && wantPitr.kind === "usable" && wantPitr.enabled && wantPitr.recoveryPeriodInDays === void 0 && livePitr.kind === "usable" && livePitr.enabled && livePitr.recoveryPeriodInDays !== void 0) {
47000
+ entry[PITR_KEY] = {
47001
+ ...pitr,
47002
+ RecoveryPeriodInDays: livePitr.recoveryPeriodInDays
47003
+ };
47004
+ touched = true;
47005
+ }
47006
+ if (!touched) return element;
47007
+ changed = true;
47008
+ return entry;
47009
+ });
47010
+ return changed ? {
47011
+ ...desired,
47012
+ Replicas: completed
47013
+ } : desired;
47014
+ }
47015
+
47016
+ //#endregion
47017
+ //#region src/provisioning/dynamodb-stream-members.ts
47018
+ const STREAM_SPECIFICATION_KEY$1 = "StreamSpecification";
47019
+ const STREAM_POLICY_KEY = "ResourcePolicy";
47020
+ const STREAM_TAGS_KEY = "Tags";
47021
+ const POLICY_PATH = `${STREAM_SPECIFICATION_KEY$1}.${STREAM_POLICY_KEY}`;
47022
+ const TAGS_PATH = `${STREAM_SPECIFICATION_KEY$1}.${STREAM_TAGS_KEY}`;
47023
+ function isPlainObject(value) {
47024
+ return typeof value === "object" && value !== null && !Array.isArray(value);
47025
+ }
47026
+ function refusalOf(guard) {
47027
+ try {
47028
+ guard();
47029
+ return;
47030
+ } catch (error) {
47031
+ return describeAwsFailure(error).detail;
47032
+ }
47033
+ }
47034
+ function blockMembers(block) {
47035
+ return isPlainObject(block) ? block : {};
47036
+ }
47037
+ function readStreamPolicy(block) {
47038
+ const value = blockMembers(block)[STREAM_POLICY_KEY];
47039
+ if (value === void 0 || value === null) return { kind: "absent" };
47040
+ const containerRefusal = refusalOf(() => requireConfigObject(value, POLICY_PATH));
47041
+ if (containerRefusal !== void 0) return {
47042
+ kind: "unusable",
47043
+ reason: containerRefusal
47044
+ };
47045
+ const documentPath = `${POLICY_PATH}.PolicyDocument`;
47046
+ const document = value["PolicyDocument"];
47047
+ if (typeof document === "string") return document.trim() === "" ? {
47048
+ kind: "unusable",
47049
+ reason: `${documentPath} must not be a blank string`
47050
+ } : {
47051
+ kind: "usable",
47052
+ document
47053
+ };
47054
+ if (document === void 0 || document === null) return {
47055
+ kind: "unusable",
47056
+ reason: `${documentPath} is required when ${POLICY_PATH} is declared`
47057
+ };
47058
+ const documentRefusal = refusalOf(() => requireConfigObject(document, documentPath));
47059
+ if (documentRefusal !== void 0) return {
47060
+ kind: "unusable",
47061
+ reason: documentRefusal
47062
+ };
47063
+ return {
47064
+ kind: "usable",
47065
+ document: JSON.stringify(document)
47066
+ };
47067
+ }
47068
+ function readStreamTags(block) {
47069
+ const value = blockMembers(block)[STREAM_TAGS_KEY];
47070
+ if (value === void 0 || value === null) return { kind: "absent" };
47071
+ if (!Array.isArray(value)) return {
47072
+ kind: "unusable",
47073
+ reason: `${TAGS_PATH} must be an array of {Key, Value} entries`
47074
+ };
47075
+ const tags = /* @__PURE__ */ new Map();
47076
+ for (const [position, entry] of value.entries()) {
47077
+ const entryPath = `${TAGS_PATH}[${position}]`;
47078
+ const refusal = refusalOf(() => requireConfigObject(entry, entryPath)) ?? configStringRefusal(entry, "Key", "required", entryPath) ?? configStringRefusal(entry, "Value", "", entryPath);
47079
+ if (refusal !== void 0) return {
47080
+ kind: "unusable",
47081
+ reason: refusal
47082
+ };
47083
+ const { Key: key, Value: tagValue } = entry;
47084
+ if (typeof key !== "string") return {
47085
+ kind: "unusable",
47086
+ reason: `${entryPath}.Key is required`
47087
+ };
47088
+ tags.set(key, typeof tagValue === "string" ? tagValue : "");
47089
+ }
47090
+ return {
47091
+ kind: "usable",
47092
+ tags
47093
+ };
47094
+ }
47095
+ function streamMemberRefusals(block) {
47096
+ const refusals = [];
47097
+ const policy = readStreamPolicy(block);
47098
+ if (policy.kind === "unusable") refusals.push(policy.reason);
47099
+ const tags = readStreamTags(block);
47100
+ if (tags.kind === "unusable") refusals.push(tags.reason);
47101
+ return refusals;
47102
+ }
47103
+ function planStreamMemberOps(desiredBlock, previousBlock, options, onUnusable) {
47104
+ let desiredPolicy = readStreamPolicy(desiredBlock);
47105
+ let desiredTags = readStreamTags(desiredBlock);
47106
+ if (desiredPolicy.kind === "unusable") onUnusable(desiredPolicy.reason);
47107
+ if (desiredTags.kind === "unusable") onUnusable(desiredTags.reason);
47108
+ let previousPolicy = readStreamPolicy(previousBlock);
47109
+ let previousTags = readStreamTags(previousBlock);
47110
+ if (options.freshStream) {
47111
+ if (desiredPolicy.kind === "unusable" && previousPolicy.kind === "usable") desiredPolicy = previousPolicy;
47112
+ if (desiredTags.kind === "unusable" && previousTags.kind === "usable") desiredTags = previousTags;
47113
+ previousPolicy = { kind: "absent" };
47114
+ previousTags = { kind: "absent" };
47115
+ } else if (options.contentsUnknown === true) {
47116
+ previousPolicy = {
47117
+ kind: "unusable",
47118
+ reason: ""
47119
+ };
47120
+ previousTags = { kind: "absent" };
47121
+ }
47122
+ const tagOps = [];
47123
+ if (desiredTags.kind !== "unusable") {
47124
+ const desired = desiredTags.kind === "usable" ? desiredTags.tags : /* @__PURE__ */ new Map();
47125
+ const previous = previousTags.kind === "usable" ? previousTags.tags : /* @__PURE__ */ new Map();
47126
+ const keysToRemove = [...previous.keys()].filter((key) => !desired.has(key));
47127
+ if (keysToRemove.length > 0) tagOps.push({
47128
+ kind: "untag",
47129
+ keys: keysToRemove
47130
+ });
47131
+ const tagsToSet = [...desired].filter(([key, value]) => previous.get(key) !== value).map(([Key, Value]) => ({
47132
+ Key,
47133
+ Value
47134
+ }));
47135
+ if (tagsToSet.length > 0) tagOps.push({
47136
+ kind: "tag",
47137
+ tags: tagsToSet
47138
+ });
47139
+ }
47140
+ const policyPut = desiredPolicy.kind === "usable" && !(previousPolicy.kind === "usable" && samePolicyDocument(previousPolicy.document, desiredPolicy.document));
47141
+ const policyDelete = previousPolicy.kind !== "absent" && (desiredPolicy.kind === "absent" || policyPut && tagOps.length > 0);
47142
+ const ops = [];
47143
+ if (policyDelete) ops.push({ kind: "deletePolicy" });
47144
+ ops.push(...tagOps);
47145
+ if (policyPut && desiredPolicy.kind === "usable") ops.push({
47146
+ kind: "putPolicy",
47147
+ document: desiredPolicy.document
47148
+ });
47149
+ return ops;
47150
+ }
47151
+ function samePolicyDocument(left, right) {
47152
+ if (left === right) return true;
47153
+ try {
47154
+ return canonicalJson(JSON.parse(left)) === canonicalJson(JSON.parse(right));
47155
+ } catch {
47156
+ return false;
47157
+ }
47158
+ }
47159
+ function streamDeclaresPolicy(desiredBlock) {
47160
+ return readStreamPolicy(desiredBlock).kind === "usable";
47161
+ }
47162
+ function streamDeclaresTags(desiredBlock) {
47163
+ return readStreamTags(desiredBlock).kind === "usable";
47164
+ }
47165
+ function reverseMapStreamPolicy(livePolicy, desiredBlock) {
47166
+ if (livePolicy === void 0 || livePolicy === "") return void 0;
47167
+ const declared = blockMembers(blockMembers(desiredBlock)[STREAM_POLICY_KEY])["PolicyDocument"];
47168
+ let parsed;
47169
+ try {
47170
+ parsed = JSON.parse(livePolicy);
47171
+ } catch {
47172
+ return { PolicyDocument: livePolicy };
47173
+ }
47174
+ if (typeof declared !== "string") return { PolicyDocument: parsed };
47175
+ let declaredParsed;
47176
+ try {
47177
+ declaredParsed = JSON.parse(declared);
47178
+ } catch {
47179
+ return { PolicyDocument: livePolicy };
47180
+ }
47181
+ return { PolicyDocument: canonicalJson(declaredParsed) === canonicalJson(parsed) ? declared : livePolicy };
47182
+ }
47183
+ function streamPolicyMatchesDeclared(livePolicy, desiredBlock) {
47184
+ const declared = readStreamPolicy(desiredBlock);
47185
+ if (declared.kind !== "usable" || livePolicy === void 0) return false;
47186
+ try {
47187
+ return canonicalJson(JSON.parse(livePolicy)) === canonicalJson(JSON.parse(declared.document));
47188
+ } catch {
47189
+ return false;
47190
+ }
47191
+ }
47192
+ function declaredStreamPolicyMember(desiredBlock) {
47193
+ const declared = readStreamPolicy(desiredBlock);
47194
+ return declared.kind === "usable" ? reverseMapStreamPolicy(declared.document, desiredBlock) : void 0;
47195
+ }
47196
+ function declaredStreamTagsMember(desiredBlock) {
47197
+ const declared = readStreamTags(desiredBlock);
47198
+ return declared.kind === "usable" ? [...declared.tags].map(([Key, Value]) => ({
47199
+ Key,
47200
+ Value
47201
+ })) : void 0;
47202
+ }
47203
+ function streamTagsMatchDeclared(liveTags, desiredBlock) {
47204
+ const declared = readStreamTags(desiredBlock);
47205
+ if (declared.kind !== "usable" || liveTags.length !== declared.tags.size) return false;
47206
+ return liveTags.every((tag) => declared.tags.get(tag.Key) === tag.Value);
47207
+ }
47208
+ function canonicalJson(value) {
47209
+ if (Array.isArray(value)) return `[${value.map(canonicalJson).join(",")}]`;
47210
+ if (isPlainObject(value)) return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson(value[key])}`).join(",")}}`;
47211
+ return JSON.stringify(value) ?? "null";
47212
+ }
47213
+
46431
47214
  //#endregion
46432
47215
  //#region src/provisioning/providers/dynamodb-globaltable-provider.ts
46433
47216
  function isTableName(id) {
@@ -46668,6 +47451,8 @@ var DynamoDBGlobalTableProvider = class {
46668
47451
  if (!onReplay) throw new ProvisioningError(log.mask(`AWS::DynamoDB::GlobalTable ${logicalId}: ${sseEnabledRefusal}. Nothing was created; fix the template value`), resourceType, logicalId);
46669
47452
  onReplay(`${sseEnabledRefusal}. Encryption is enabled, the block's default.`);
46670
47453
  }
47454
+ const replicaSettingRefusal = replicaSettingsRefusal(properties, void 0, currentRegion);
47455
+ if (replicaSettingRefusal !== void 0 && !replayWarn(log, context).onUnusable) throw new ProvisioningError(log.mask(`AWS::DynamoDB::GlobalTable ${logicalId}: ${replicaSettingRefusal}. Nothing was created; fix the template value`), resourceType, logicalId);
46671
47456
  if (properties["SSESpecification"]) createParams.SSESpecification = toSdkTableSseSpecification(properties["SSESpecification"], readReplicaKmsMasterKeyId(localReplicaEntry(properties, currentRegion)));
46672
47457
  const dpeResolved = extractLocalDeletionProtection(properties, currentRegion);
46673
47458
  if (dpeResolved !== void 0) createParams.DeletionProtectionEnabled = dpeResolved;
@@ -46715,18 +47500,15 @@ var DynamoDBGlobalTableProvider = class {
46715
47500
  if (!replicaTags || replicaTags.length === 0) continue;
46716
47501
  await this.applyCrossRegionReplicaTagsDiff(tableInfo.tableArn, region, void 0, replicaTags, resourceType, logicalId, tableName, maskSecrets);
46717
47502
  }
46718
- if (properties["TimeToLiveSpecification"]) {
46719
- const ttl = properties["TimeToLiveSpecification"];
46720
- const attributeName = ttl["AttributeName"];
46721
- const enabled = ttl["Enabled"] !== void 0 ? Boolean(ttl["Enabled"]) : true;
46722
- if (attributeName) await this.dynamoDBClient.send(new UpdateTimeToLiveCommand({
46723
- TableName: tableName,
46724
- TimeToLiveSpecification: {
46725
- Enabled: enabled,
46726
- AttributeName: attributeName
46727
- }
46728
- }));
46729
- }
47503
+ await this.applyReplicaSettings(tableName, logicalId, currentRegion, wiringProperties, void 0, /* @__PURE__ */ new Set(), false, replayWarn(log, context).onUnusable !== void 0, /* @__PURE__ */ new Set(), void 0, warn, maskSecrets);
47504
+ const createTtl = planTimeToLive(properties["TimeToLiveSpecification"], void 0, "create");
47505
+ if (createTtl.kind === "enable") await this.dynamoDBClient.send(new UpdateTimeToLiveCommand({
47506
+ TableName: tableName,
47507
+ TimeToLiveSpecification: {
47508
+ Enabled: true,
47509
+ AttributeName: createTtl.attributeName
47510
+ }
47511
+ }));
46730
47512
  if (billingMode === "PROVISIONED") try {
46731
47513
  await this.reconcileAutoScalingTargets(tableName, [], collectAutoScalingTargets(wiringProperties, currentRegion), currentRegion, void 0, maskSecrets);
46732
47514
  } catch (autoScalingErr) {
@@ -46859,7 +47641,7 @@ var DynamoDBGlobalTableProvider = class {
46859
47641
  }
46860
47642
  throw new ProvisioningError(maskSecrets(`DeletionProtectionEnabled=${enabled} on the ${region} replica of ${tableName} did not settle within ${wait.pollsRun} polls${wait.note()}`), "AWS::DynamoDB::GlobalTable", logicalId, tableName);
46861
47643
  }
46862
- async convergeReplicaDeletionProtection(tableName, logicalId, currentRegion, previousProperties, properties, addedRegions, warn, maskSecrets) {
47644
+ async convergeReplicaDeletionProtection(tableName, logicalId, currentRegion, previousProperties, properties, addedRegions, desiredFromReadback, warn, maskSecrets) {
46863
47645
  const desired = Array.isArray(properties["Replicas"]) ? properties["Replicas"] : [];
46864
47646
  for (const entry of desired) {
46865
47647
  const replica = asRecord(entry);
@@ -46867,6 +47649,7 @@ var DynamoDBGlobalTableProvider = class {
46867
47649
  if (typeof region !== "string" || region === currentRegion || addedRegions.has(region)) continue;
46868
47650
  const declared = readReplicaDeletionProtection(replica, region, warn);
46869
47651
  if (declared === UNUSABLE) continue;
47652
+ if (declared === void 0 && desiredFromReadback) continue;
46870
47653
  const previous = readReplicaDeletionProtection(localReplicaEntry(previousProperties, region), region);
46871
47654
  const newDpe = declared ?? false;
46872
47655
  const oldDpe = previous === UNUSABLE ? void 0 : previous ?? false;
@@ -46997,6 +47780,227 @@ var DynamoDBGlobalTableProvider = class {
46997
47780
  ReplicaUpdates: entries
46998
47781
  };
46999
47782
  }
47783
+ async applyReplicaSettings(tableName, logicalId, currentRegion, properties, previousProperties, freshRegions, streamReplaced, replaying, keepOnRemoval, previousLocalStreamArn, warn, maskSecrets) {
47784
+ const desired = Array.isArray(properties["Replicas"]) ? properties["Replicas"] : [];
47785
+ for (const entry of desired) {
47786
+ const replica = asRecord(entry);
47787
+ const region = replica?.["Region"];
47788
+ if (typeof region !== "string" || region === "") continue;
47789
+ const fresh = previousProperties === void 0 || freshRegions.has(region);
47790
+ const previous = previousProperties === void 0 ? void 0 : localReplicaEntry(previousProperties, region);
47791
+ const ops = planReplicaSettingOps(replica, previous, {
47792
+ fresh,
47793
+ streamReplaced,
47794
+ keepOnRemoval
47795
+ }, (reason) => warn(`The ${region} replica of ${tableName}: ${reason}, so that setting was left as it is. ` + (replaying ? `The value came from a recorded state, which a template edit cannot reach.` : `Fix the template value and re-deploy.`)));
47796
+ if (!fresh && keepOnRemoval.has("pitr") && replica?.["PointInTimeRecoverySpecification"] == null && (() => {
47797
+ const prior = readPitrSpec(previous?.["PointInTimeRecoverySpecification"]);
47798
+ return prior.kind === "usable" && prior.enabled;
47799
+ })()) warn(`The ${region} replica of ${tableName}: point-in-time recovery was not turned off, although the properties being applied (a rollback's recorded state, or a drift --revert read-back) declare none — turning it off would delete every recovery point. Turn it off by hand if that is intended.`);
47800
+ const unchanged = fresh ? /* @__PURE__ */ new Set() : declaredReplicaSettings(replica);
47801
+ for (const op of ops) unchanged.delete(settingOf(op));
47802
+ if (ops.length === 0 && unchanged.size === 0) continue;
47803
+ const client = region === currentRegion ? this.dynamoDBClient : this.getRegionalClient(region);
47804
+ await this.waitForGlobalTableSettled(tableName, logicalId, maskSecrets, { ...region !== currentRegion && { region } });
47805
+ let arns;
47806
+ const describe = async () => {
47807
+ if (arns === void 0) {
47808
+ const described = await client.send(new DescribeTableCommand({ TableName: tableName }));
47809
+ arns = {
47810
+ ...described.Table?.TableArn !== void 0 && { tableArn: described.Table.TableArn },
47811
+ ...described.Table?.LatestStreamArn !== void 0 && { streamArn: described.Table.LatestStreamArn }
47812
+ };
47813
+ }
47814
+ return arns;
47815
+ };
47816
+ for (const op of ops) try {
47817
+ await this.sendReplicaSettingOp(client, tableName, region, logicalId, op, describe, maskSecrets);
47818
+ } catch (error) {
47819
+ if (!replaying || !fresh || op.kind !== "putTablePolicy" || isInterruptedWaitError(error)) throw error;
47820
+ warn(`The ${region} replica of ${tableName} was created without its ResourcePolicy: ${describeAwsFailure(error).summary}. The next deploy that updates this table puts it.`);
47821
+ }
47822
+ const priorStreamPolicy = readStreamPolicy$1(previous);
47823
+ const desiredStreamPolicy = readStreamPolicy$1(replica);
47824
+ const streamPolicyChanged = priorStreamPolicy.kind !== "absent" && desiredStreamPolicy.kind !== "unusable" && !(desiredStreamPolicy.kind === "absent" && keepOnRemoval.has("streamPolicy")) && !(priorStreamPolicy.kind === "usable" && desiredStreamPolicy.kind === "usable" && samePolicyDocument$1(priorStreamPolicy.document, desiredStreamPolicy.document));
47825
+ if (region === currentRegion && streamReplaced && previousLocalStreamArn !== void 0 && streamPolicyChanged && (await describe()).streamArn !== previousLocalStreamArn) await this.deleteOldStreamPolicy(client, previousLocalStreamArn, tableName, warn, maskSecrets);
47826
+ if (unchanged.size === 0) continue;
47827
+ const live = await this.readLiveReplicaSettings(client, tableName, region, unchanged, describe, maskSecrets);
47828
+ for (const op of planReplicaSettingCorrections(replica, live, unchanged)) {
47829
+ const member = SETTING_MEMBER[settingOf(op)];
47830
+ this.logger.debug(maskSecrets(`Bringing the ${region} replica of ${tableName} to its declared ${member}`));
47831
+ try {
47832
+ await this.sendReplicaSettingOp(client, tableName, region, logicalId, op, describe, maskSecrets);
47833
+ } catch (convergeError) {
47834
+ if (isInterruptedWaitError(convergeError)) throw convergeError;
47835
+ this.logger.debug(maskSecrets(`Could not bring the ${region} replica of ${tableName} to its declared ${member}: ` + describeAwsFailure(convergeError).detail));
47836
+ this.logger.warn(maskSecrets(`The ${region} replica of ${tableName} does not hold its declared ${member}, and setting it failed (${describeAwsFailure(convergeError).summary}). The next deploy that updates this table tries again.`));
47837
+ }
47838
+ }
47839
+ }
47840
+ }
47841
+ async readLiveReplicaSettings(client, tableName, region, wanted, describe, maskSecrets) {
47842
+ const live = {};
47843
+ const attempt = async (what, read) => {
47844
+ try {
47845
+ await read();
47846
+ } catch (readError) {
47847
+ this.logger.debug(maskSecrets(`Could not read ${what} of the ${region} replica of ${tableName}: ` + describeAwsFailure(readError).detail));
47848
+ }
47849
+ };
47850
+ if (wanted.has("pitr")) await attempt("point-in-time recovery", async () => {
47851
+ const pitr = (await client.send(new DescribeContinuousBackupsCommand({ TableName: tableName }))).ContinuousBackupsDescription?.PointInTimeRecoveryDescription;
47852
+ const status = pitr?.PointInTimeRecoveryStatus;
47853
+ if (status === "ENABLED" || status === "DISABLED") live.pitr = {
47854
+ enabled: status === "ENABLED",
47855
+ ...pitr?.RecoveryPeriodInDays !== void 0 && { recoveryPeriodInDays: pitr.RecoveryPeriodInDays }
47856
+ };
47857
+ });
47858
+ if (wanted.has("contributorInsights")) await attempt("Contributor Insights", async () => {
47859
+ const status = (await client.send(new DescribeContributorInsightsCommand({ TableName: tableName }))).ContributorInsightsStatus;
47860
+ if (status === "ENABLED" || status === "ENABLING") live.contributorInsightsEnabled = true;
47861
+ else if (status === "DISABLED" || status === "DISABLING") live.contributorInsightsEnabled = false;
47862
+ });
47863
+ if (wanted.has("kinesis")) await attempt("the Kinesis streaming destination", async () => {
47864
+ live.kinesisStreamArns = await this.activeKinesisStreamArns(client, tableName);
47865
+ });
47866
+ const hasPolicy = async (arn) => {
47867
+ if (arn === void 0) return void 0;
47868
+ try {
47869
+ await client.send(new GetResourcePolicyCommand({ ResourceArn: arn }));
47870
+ return true;
47871
+ } catch (error) {
47872
+ if (error instanceof PolicyNotFoundException) return false;
47873
+ throw error;
47874
+ }
47875
+ };
47876
+ if (wanted.has("tablePolicy")) await attempt("the resource policy", async () => {
47877
+ const answer = await hasPolicy((await describe()).tableArn);
47878
+ if (answer !== void 0) live.hasTablePolicy = answer;
47879
+ });
47880
+ if (wanted.has("streamPolicy")) await attempt("the stream resource policy", async () => {
47881
+ const answer = await hasPolicy((await describe()).streamArn);
47882
+ if (answer !== void 0) live.hasStreamPolicy = answer;
47883
+ });
47884
+ return live;
47885
+ }
47886
+ async deleteOldStreamPolicy(client, streamArn, tableName, warn, maskSecrets) {
47887
+ try {
47888
+ await this.retrySettlingRefusal(() => client.send(new DeleteResourcePolicyCommand({ ResourceArn: streamArn })), `delete the policy of the retired stream of ${tableName}`, maskSecrets);
47889
+ } catch (error) {
47890
+ if (isInterruptedWaitError(error)) throw error;
47891
+ if (error instanceof PolicyNotFoundException || error instanceof ResourceNotFoundException$1) return;
47892
+ warn(`The previous stream of ${tableName} (retired by the StreamViewType change) keeps its old resource policy until it expires: deleting it failed (${describeAwsFailure(error).summary}).`);
47893
+ }
47894
+ }
47895
+ async kinesisStreaming(client, tableName, streamArn, refusal) {
47896
+ if (isInterruptedWaitError(refusal)) throw refusal;
47897
+ try {
47898
+ return (await this.activeKinesisStreamArns(client, tableName)).has(streamArn);
47899
+ } catch {
47900
+ throw refusal;
47901
+ }
47902
+ }
47903
+ async activeKinesisStreamArns(client, tableName) {
47904
+ const out = await client.send(new DescribeKinesisStreamingDestinationCommand({ TableName: tableName }));
47905
+ return new Set((out.KinesisDataStreamDestinations ?? []).filter((d) => d.DestinationStatus === "ACTIVE" || d.DestinationStatus === "ENABLING").flatMap((d) => d.StreamArn !== void 0 ? [d.StreamArn] : []));
47906
+ }
47907
+ async sendReplicaSettingOp(client, tableName, region, logicalId, op, describe, maskSecrets) {
47908
+ const scope = `the ${region} replica of ${tableName}`;
47909
+ const arnFor = async (which) => {
47910
+ const arn = (await describe())[which];
47911
+ if (arn === void 0 || arn === "") throw new ProvisioningError(maskSecrets(`Cannot apply ${SETTING_MEMBER[settingOf(op)]} to ${scope}: DescribeTable returned no ${which === "tableArn" ? "TableArn" : "LatestStreamArn (the table has no stream)"}`), "AWS::DynamoDB::GlobalTable", logicalId, tableName);
47912
+ return arn;
47913
+ };
47914
+ const send = (call) => this.retrySettlingRefusal(call, `${op.kind} on ${scope}`, maskSecrets);
47915
+ switch (op.kind) {
47916
+ case "pitr":
47917
+ await send(() => client.send(new UpdateContinuousBackupsCommand({
47918
+ TableName: tableName,
47919
+ PointInTimeRecoverySpecification: {
47920
+ PointInTimeRecoveryEnabled: op.enabled,
47921
+ ...op.recoveryPeriodInDays !== void 0 && { RecoveryPeriodInDays: op.recoveryPeriodInDays }
47922
+ }
47923
+ })));
47924
+ break;
47925
+ case "contributorInsights":
47926
+ await send(() => client.send(new UpdateContributorInsightsCommand({
47927
+ TableName: tableName,
47928
+ ContributorInsightsAction: op.action,
47929
+ ...op.mode !== void 0 && { ContributorInsightsMode: op.mode }
47930
+ })));
47931
+ break;
47932
+ case "kinesisEnable":
47933
+ if (await this.activeKinesisStreamArns(client, tableName).then((arns) => arns.has(op.streamArn), () => false)) break;
47934
+ try {
47935
+ await send(() => client.send(new EnableKinesisStreamingDestinationCommand({
47936
+ TableName: tableName,
47937
+ StreamArn: op.streamArn,
47938
+ ...op.precision !== void 0 && { EnableKinesisStreamingConfiguration: { ApproximateCreationDateTimePrecision: op.precision } }
47939
+ })));
47940
+ } catch (error) {
47941
+ if (!await this.kinesisStreaming(client, tableName, op.streamArn, error)) throw error;
47942
+ }
47943
+ break;
47944
+ case "kinesisDisable":
47945
+ try {
47946
+ await send(() => client.send(new DisableKinesisStreamingDestinationCommand({
47947
+ TableName: tableName,
47948
+ StreamArn: op.streamArn
47949
+ })));
47950
+ } catch (error) {
47951
+ if (await this.kinesisStreaming(client, tableName, op.streamArn, error)) throw error;
47952
+ }
47953
+ break;
47954
+ case "kinesisPrecision":
47955
+ await send(() => client.send(new UpdateKinesisStreamingDestinationCommand({
47956
+ TableName: tableName,
47957
+ StreamArn: op.streamArn,
47958
+ UpdateKinesisStreamingConfiguration: { ApproximateCreationDateTimePrecision: op.precision }
47959
+ })));
47960
+ break;
47961
+ case "putTablePolicy":
47962
+ case "putStreamPolicy": {
47963
+ const arn = await arnFor(op.kind === "putTablePolicy" ? "tableArn" : "streamArn");
47964
+ await send(() => client.send(new PutResourcePolicyCommand({
47965
+ ResourceArn: arn,
47966
+ Policy: op.document
47967
+ })));
47968
+ break;
47969
+ }
47970
+ case "deleteTablePolicy":
47971
+ case "deleteStreamPolicy": {
47972
+ if (op.kind === "deleteStreamPolicy" && (await describe()).streamArn === void 0) break;
47973
+ const arn = await arnFor(op.kind === "deleteTablePolicy" ? "tableArn" : "streamArn");
47974
+ try {
47975
+ await send(() => client.send(new DeleteResourcePolicyCommand({ ResourceArn: arn })));
47976
+ } catch (error) {
47977
+ if (!(error instanceof PolicyNotFoundException)) throw error;
47978
+ }
47979
+ break;
47980
+ }
47981
+ }
47982
+ this.logger.debug(maskSecrets(`Applied ${op.kind} to ${scope}`));
47983
+ }
47984
+ async retrySettlingRefusal(call, label, maskSecrets) {
47985
+ const watch = startInterruptWatch(maskSecrets(`DynamoDB ${label}`));
47986
+ try {
47987
+ let delayMs = SETTLING_RETRY_INITIAL_MS;
47988
+ for (let attempt = 1;; attempt++) try {
47989
+ await call();
47990
+ return;
47991
+ } catch (error) {
47992
+ const detail = describeAwsFailure(error).detail;
47993
+ const name = error instanceof Error ? error.name : "";
47994
+ if (!(/being enabled|being updated|please retry later|backups are being/i.test(detail) || name === "ResourceInUseException" || name === "LimitExceededException") || attempt >= 8) throw error;
47995
+ this.logger.debug(maskSecrets(`Transient refusal of ${label} (attempt ${attempt}/${8}): ${detail} - retrying in ${delayMs}ms`));
47996
+ await new Promise((resolve) => setTimeout(resolve, delayMs));
47997
+ if (watch.isInterrupted()) throw watch.onInterrupted();
47998
+ delayMs = Math.min(delayMs * 2, 3e4);
47999
+ }
48000
+ } finally {
48001
+ watch.dispose();
48002
+ }
48003
+ }
47000
48004
  async sendLocalSettingUpdate(input, fromTemplate, what, tableName, logicalId, maskSecrets) {
47001
48005
  try {
47002
48006
  await this.dynamoDBClient.send(new UpdateTableCommand(input));
@@ -47105,6 +48109,7 @@ var DynamoDBGlobalTableProvider = class {
47105
48109
  }
47106
48110
  }
47107
48111
  async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
48112
+ if (context?.desiredFromAwsReadback === true) properties = keepUnreadReplicaMembers(properties, previousProperties);
47108
48113
  const log = this.operationSinks(context, [[properties["TableName"], physicalId], [previousProperties["TableName"], physicalId]]);
47109
48114
  const maskSecrets = log.mask;
47110
48115
  const warn = log.warn;
@@ -47170,6 +48175,7 @@ var DynamoDBGlobalTableProvider = class {
47170
48175
  if (refusal === void 0 && !deepEqual(properties["StreamSpecification"], previousProperties["StreamSpecification"])) refusal = configStringRefusal(properties["StreamSpecification"], "StreamViewType", "NEW_AND_OLD_IMAGES", "AWS::DynamoDB::GlobalTable StreamSpecification");
47171
48176
  if (refusal === void 0 && (changed("SSESpecification") || !deepEqual(replicaKeyBlocks(properties), replicaKeyBlocks(previousProperties)))) refusal = configBooleanRefusal(properties["SSESpecification"], "SSEEnabled", "AWS::DynamoDB::GlobalTable SSESpecification");
47172
48177
  if (refusal === void 0 && changed("GlobalSecondaryIndexes")) refusal = globalSecondaryIndexesShapeDetail(properties["GlobalSecondaryIndexes"], maskSecrets);
48178
+ if (refusal === void 0) refusal = replicaSettingsRefusal(properties, previousProperties);
47173
48179
  if (refusal !== void 0) refuse(refusal);
47174
48180
  } else {
47175
48181
  const sseEnabledRefusal = configBooleanRefusal(properties["SSESpecification"], "SSEEnabled", "AWS::DynamoDB::GlobalTable SSESpecification");
@@ -47484,9 +48490,16 @@ var DynamoDBGlobalTableProvider = class {
47484
48490
  await this.waitForReplicaActive(physicalId, region, logicalId, void 0, maskSecrets);
47485
48491
  }
47486
48492
  const addedReplicaRegions = new Set(replicaDiff.added.map((r) => r["Region"]));
47487
- await this.convergeReplicaDeletionProtection(physicalId, logicalId, currentRegion, previousProperties, properties, addedReplicaRegions, warn, maskSecrets);
48493
+ await this.convergeReplicaDeletionProtection(physicalId, logicalId, currentRegion, previousProperties, properties, addedReplicaRegions, context?.desiredFromAwsReadback === true, warn, maskSecrets);
47488
48494
  await this.convergeReplicaSettings(physicalId, logicalId, currentRegion, properties, addedReplicaRegions, maskSecrets);
47489
48495
  await this.applyReplicaKeys(physicalId, logicalId, currentRegion, properties, previousProperties, addedReplicaRegions, deferredSseUpdate, deferredSseFromTemplate, keylessSseFromTemplate, maskSecrets);
48496
+ await this.applyReplicaSettings(physicalId, logicalId, currentRegion, properties, previousProperties, addedReplicaRegions, !deepEqual(asRecord(properties["StreamSpecification"])?.["StreamViewType"], asRecord(previousProperties["StreamSpecification"])?.["StreamViewType"]), context?.replayingState === true || context?.desiredFromAwsReadback === true, new Set(context?.desiredFromAwsReadback === true ? [
48497
+ "pitr",
48498
+ "contributorInsights",
48499
+ "kinesis",
48500
+ "tablePolicy",
48501
+ "streamPolicy"
48502
+ ] : context?.replayingState === true ? ["pitr"] : []), describeResp.Table?.LatestStreamArn, warn, maskSecrets);
47490
48503
  const previousTranslatedIndexes = toSdkGlobalSecondaryIndexes(previousProperties, currentRegion, oldBilling, "min", void 0, onUnusablePreviousGsiBlock, maskSecrets);
47491
48504
  const previousSdkIndexes = previousGsiUnusable ? buildLiveRecoveryGsiBaseline(desiredSdkIndexes, describeResp.Table?.GlobalSecondaryIndexes, {
47492
48505
  carryLiveValues: oldBilling === newBilling && liveBillingMode === newBilling,
@@ -47584,28 +48597,39 @@ var DynamoDBGlobalTableProvider = class {
47584
48597
  try {
47585
48598
  await this.dynamoDBClient.send(cmd);
47586
48599
  } catch (ttlErr) {
47587
- if (describeAwsFailure(ttlErr).detail.includes("Time to live has been modified multiple times")) throw this.wrapMaskedError(log, ttlErr, (text) => new ProvisioningError(`AWS rejected TimeToLive update on ${log.value(physicalId)}: ${sentence(text)} AWS enforces a ~4-hour rate limit on TTL changes per table; wait and redeploy, or keep the previous TTL state in this deploy.`, resourceType, logicalId, physicalId, ttlErr instanceof Error ? ttlErr : void 0));
48600
+ const msg = describeAwsFailure(ttlErr).detail;
48601
+ if (cmd.input.TimeToLiveSpecification?.Enabled === false && isTtlAlreadyDisabled(msg)) {
48602
+ this.logger.debug(maskSecrets(`TimeToLive already disabled on ${physicalId}`));
48603
+ return;
48604
+ }
48605
+ if (msg.includes("Time to live has been modified multiple times")) throw this.wrapMaskedError(log, ttlErr, (text) => new ProvisioningError(`AWS rejected TimeToLive update on ${log.value(physicalId)}: ${sentence(text)} AWS rate-limits TTL changes per table (the interval can last up to about an hour); wait and redeploy, or keep the previous TTL state in this deploy.`, resourceType, logicalId, physicalId, ttlErr instanceof Error ? ttlErr : void 0));
47588
48606
  throw ttlErr;
47589
48607
  }
47590
48608
  };
47591
- const ttl = properties["TimeToLiveSpecification"];
47592
- if (ttl?.["AttributeName"]) await sendTtl(new UpdateTimeToLiveCommand({
48609
+ const ttlPlan = planTimeToLive(properties["TimeToLiveSpecification"], previousProperties["TimeToLiveSpecification"], "update");
48610
+ let ttlTarget;
48611
+ if (ttlPlan.kind === "enable" || ttlPlan.kind === "disable") ttlTarget = {
48612
+ enabled: ttlPlan.kind === "enable",
48613
+ attributeName: ttlPlan.attributeName
48614
+ };
48615
+ else if (ttlPlan.kind === "disable-live") {
48616
+ let live;
48617
+ await this.retrySettlingRefusal(async () => {
48618
+ live = (await this.dynamoDBClient.send(new DescribeTimeToLiveCommand({ TableName: physicalId }))).TimeToLiveDescription;
48619
+ }, `TimeToLive read on ${physicalId}`, maskSecrets);
48620
+ const status = live?.TimeToLiveStatus;
48621
+ if ((status === "ENABLED" || status === "ENABLING") && live?.AttributeName) ttlTarget = {
48622
+ enabled: false,
48623
+ attributeName: live.AttributeName
48624
+ };
48625
+ }
48626
+ if (ttlTarget) await sendTtl(new UpdateTimeToLiveCommand({
47593
48627
  TableName: physicalId,
47594
48628
  TimeToLiveSpecification: {
47595
- Enabled: ttl["Enabled"] !== void 0 ? Boolean(ttl["Enabled"]) : true,
47596
- AttributeName: ttl["AttributeName"]
48629
+ Enabled: ttlTarget.enabled,
48630
+ AttributeName: ttlTarget.attributeName
47597
48631
  }
47598
48632
  }));
47599
- else if (previousProperties["TimeToLiveSpecification"]) {
47600
- const prevTtl = previousProperties["TimeToLiveSpecification"];
47601
- if (prevTtl["AttributeName"]) await sendTtl(new UpdateTimeToLiveCommand({
47602
- TableName: physicalId,
47603
- TimeToLiveSpecification: {
47604
- Enabled: false,
47605
- AttributeName: prevTtl["AttributeName"]
47606
- }
47607
- }));
47608
- }
47609
48633
  }
47610
48634
  const finalDescribe = await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: physicalId }));
47611
48635
  const impliedStream = replicationImpliedStreamSpecification(properties);
@@ -48088,7 +49112,8 @@ var DynamoDBGlobalTableProvider = class {
48088
49112
  throw err;
48089
49113
  }
48090
49114
  }
48091
- async readCurrentState(physicalId, _logicalId, _resourceType) {
49115
+ async readCurrentState(physicalId, _logicalId, _resourceType, properties, context) {
49116
+ const afterOwnWrite = context?.afterOwnWrite === true;
48092
49117
  try {
48093
49118
  const table = (await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: physicalId }))).Table;
48094
49119
  if (!table) return void 0;
@@ -48108,21 +49133,37 @@ var DynamoDBGlobalTableProvider = class {
48108
49133
  if (table.SSEDescription.SSEType !== void 0) sse["SSEType"] = table.SSEDescription.SSEType;
48109
49134
  result["SSESpecification"] = sse;
48110
49135
  }
48111
- if (table.TableClassSummary?.TableClass) result["TableClass"] = table.TableClassSummary.TableClass;
48112
- if (table.DeletionProtectionEnabled !== void 0) result["DeletionProtectionEnabled"] = table.DeletionProtectionEnabled;
48113
49136
  const currentRegion = await this.dynamoDBClient.config.region() ?? "";
48114
49137
  const tableNameForSubs = table.TableName ?? physicalId;
48115
49138
  const sdkReplicas = table.Replicas && table.Replicas.length > 0 ? currentRegion && !table.Replicas.some((r) => r.RegionName === currentRegion) ? [...table.Replicas, { RegionName: currentRegion }] : table.Replicas : [{ RegionName: currentRegion }];
48116
49139
  const replicas = await Promise.all(sdkReplicas.map(async (r) => {
48117
49140
  const entry = { Region: r.RegionName };
48118
- if (r.KMSMasterKeyId !== void 0) entry["KMSMasterKeyId"] = r.KMSMasterKeyId;
48119
49141
  if (!r.RegionName) return entry;
48120
49142
  const isLocal = r.RegionName === currentRegion;
49143
+ const kmsKey = isLocal ? table.SSEDescription?.Status === "ENABLED" ? table.SSEDescription.KMSMasterKeyArn : void 0 : r.KMSMasterKeyId;
49144
+ if (kmsKey !== void 0 && kmsKey !== "") entry["SSESpecification"] = { KMSMasterKeyId: kmsKey };
49145
+ entry["TableClass"] = (isLocal ? void 0 : r.ReplicaTableClassSummary?.TableClass) ?? table.TableClassSummary?.TableClass ?? "STANDARD";
49146
+ const declaredReplica = properties ? localReplicaEntry(properties, r.RegionName) : void 0;
48121
49147
  const client = isLocal ? this.dynamoDBClient : this.getRegionalClient(r.RegionName);
48122
49148
  const regionLabel = r.RegionName;
48123
49149
  const replicaArn = isLocal ? table.TableArn : table.TableArn ? this.replicaArnForRegion(table.TableArn, r.RegionName) : void 0;
48124
- const subs = await this.readReplicaSubSpecs(client, tableNameForSubs, regionLabel);
49150
+ const subs = await this.readReplicaSubSpecs(client, tableNameForSubs, regionLabel, declaredReplica);
48125
49151
  Object.assign(entry, subs);
49152
+ let protection;
49153
+ let streamArn;
49154
+ if (isLocal) {
49155
+ protection = table.DeletionProtectionEnabled;
49156
+ streamArn = table.LatestStreamArn;
49157
+ } else try {
49158
+ const regional = await client.send(new DescribeTableCommand({ TableName: tableNameForSubs }));
49159
+ protection = regional.Table?.DeletionProtectionEnabled;
49160
+ streamArn = regional.Table?.LatestStreamArn;
49161
+ } catch (err) {
49162
+ if (err instanceof ResourceNotFoundException$1) this.logger.debug(safeMsg`Cross-region replica ${regionLabel} returned RNF on DescribeTable; omitting its protection and stream policy`);
49163
+ else this.logger.debug(safeMsg`Could not read the ${regionLabel} replica of ${tableNameForSubs}: ${describeAwsFailure(err).detail}`);
49164
+ }
49165
+ if (typeof protection === "boolean") entry["DeletionProtectionEnabled"] = protection;
49166
+ await this.readReplicaPolicies(client, tableNameForSubs, regionLabel, replicaArn, streamArn, declaredReplica, afterOwnWrite, entry);
48126
49167
  if (replicaArn) try {
48127
49168
  const tagsResp = await client.send(new ListTagsOfResourceCommand({ ResourceArn: replicaArn }));
48128
49169
  entry["Tags"] = normalizeAwsTagsToCfn(tagsResp.Tags);
@@ -48207,17 +49248,19 @@ var DynamoDBGlobalTableProvider = class {
48207
49248
  throw err;
48208
49249
  }
48209
49250
  }
48210
- async readReplicaSubSpecs(client, tableName, regionLabel) {
49251
+ async readReplicaSubSpecs(client, tableName, regionLabel, declaredReplica) {
48211
49252
  const out = {};
48212
49253
  try {
48213
49254
  const ci = await client.send(new DescribeContributorInsightsCommand({ TableName: tableName }));
48214
- if (ci.ContributorInsightsStatus) out["ContributorInsightsSpecification"] = { Enabled: ci.ContributorInsightsStatus === "ENABLED" };
49255
+ const block = reverseMapReplicaContributorInsights(ci.ContributorInsightsStatus, ci.ContributorInsightsMode, declaredReplica?.["ContributorInsightsSpecification"]);
49256
+ if (block !== void 0) out["ContributorInsightsSpecification"] = block;
48215
49257
  } catch (err) {
48216
49258
  this.logger.debug(`Could not read ContributorInsights for ${tableName} in ${regionLabel}: ${describeAwsFailure(err).detail}`);
48217
49259
  }
48218
49260
  try {
48219
- const pitrStatus = (await client.send(new DescribeContinuousBackupsCommand({ TableName: tableName }))).ContinuousBackupsDescription?.PointInTimeRecoveryDescription?.PointInTimeRecoveryStatus;
48220
- if (pitrStatus) out["PointInTimeRecoverySpecification"] = { PointInTimeRecoveryEnabled: pitrStatus === "ENABLED" };
49261
+ const description = (await client.send(new DescribeContinuousBackupsCommand({ TableName: tableName }))).ContinuousBackupsDescription?.PointInTimeRecoveryDescription;
49262
+ const block = reverseMapReplicaPitr(description?.PointInTimeRecoveryStatus, description?.RecoveryPeriodInDays, declaredReplica?.["PointInTimeRecoverySpecification"]);
49263
+ if (block !== void 0) out["PointInTimeRecoverySpecification"] = block;
48221
49264
  } catch (err) {
48222
49265
  this.logger.debug(`Could not read PointInTimeRecovery for ${tableName} in ${regionLabel}: ${describeAwsFailure(err).detail}`);
48223
49266
  }
@@ -48233,6 +49276,54 @@ var DynamoDBGlobalTableProvider = class {
48233
49276
  }
48234
49277
  return out;
48235
49278
  }
49279
+ policyRereadDelaysMs = [
49280
+ 500,
49281
+ 1e3,
49282
+ 2e3
49283
+ ];
49284
+ async readReplicaPolicies(client, tableName, regionLabel, tableArn, streamArn, declaredReplica, afterOwnWrite, entry) {
49285
+ if (declaredReplica === void 0) return;
49286
+ const readOne = async (what, arn, container) => {
49287
+ if (arn === void 0 || arn === "") return void 0;
49288
+ const declaredMember = () => declaredStreamPolicyMember(container);
49289
+ let last;
49290
+ const read = async () => {
49291
+ try {
49292
+ last = (await client.send(new GetResourcePolicyCommand({ ResourceArn: arn }))).Policy;
49293
+ } catch (err) {
49294
+ if (!(err instanceof PolicyNotFoundException)) throw err;
49295
+ last = void 0;
49296
+ }
49297
+ return last;
49298
+ };
49299
+ try {
49300
+ let live = await read();
49301
+ for (const delayMs of afterOwnWrite ? this.policyRereadDelaysMs : []) {
49302
+ if (streamPolicyMatchesDeclared(live, container)) break;
49303
+ await new Promise((resolve) => setTimeout(resolve, delayMs));
49304
+ live = await read();
49305
+ }
49306
+ if (afterOwnWrite && (live === void 0 || live === "")) {
49307
+ this.logger.debug(safeMsg`Kept the declared ${what} of the ${regionLabel} replica of ${tableName} in the baseline captured after its write: the read still found no policy`);
49308
+ return declaredMember();
49309
+ }
49310
+ return reverseMapStreamPolicy(live, container);
49311
+ } catch (err) {
49312
+ this.logger.debug(safeMsg`Could not read the ${what} of the ${regionLabel} replica of ${tableName}: ${describeAwsFailure(err).detail}`);
49313
+ if (afterOwnWrite && last !== void 0 && last !== "") return reverseMapStreamPolicy(last, container);
49314
+ if (afterOwnWrite && (isThrottlingError(err) || isTransientServerError(err) || isAmbiguousOutcomeError(err) || err instanceof ResourceNotFoundException$1)) return declaredMember();
49315
+ return;
49316
+ }
49317
+ };
49318
+ if (readTablePolicy(declaredReplica).kind === "usable") {
49319
+ const member = await readOne("ResourcePolicy", tableArn, declaredReplica);
49320
+ if (member !== void 0) entry["ResourcePolicy"] = member;
49321
+ }
49322
+ if (readStreamPolicy$1(declaredReplica).kind === "usable") {
49323
+ const member = await readOne("stream ResourcePolicy", streamArn, declaredReplica["ReplicaStreamSpecification"]);
49324
+ if (member !== void 0) entry["ReplicaStreamSpecification"] = { ResourcePolicy: member };
49325
+ }
49326
+ }
48236
49327
  async readAutoScalingSettings(tableName, scalableDimension, client, indexName) {
48237
49328
  const resourceId = autoScalingResourceId(tableName, indexName);
48238
49329
  try {
@@ -48312,33 +49403,14 @@ var DynamoDBGlobalTableProvider = class {
48312
49403
  baseline,
48313
49404
  aws
48314
49405
  };
48315
- const key = "Replicas";
48316
- const baselineReplicas = baseline[key];
48317
- const awsReplicas = aws[key];
48318
- if (!Array.isArray(baselineReplicas) || !Array.isArray(awsReplicas)) return {
48319
- baseline,
48320
- aws
48321
- };
48322
49406
  const localRegion = await this.dynamoDBClient.config.region() ?? "";
48323
- if (!localRegion) return {
48324
- baseline,
48325
- aws
48326
- };
48327
- const isLocal = (element) => asRecord(element)?.["Region"] === localRegion;
48328
- if (baselineReplicas.some(isLocal)) return {
49407
+ const completed = completeLegacyLocalReplica(baseline, aws, localRegion);
49408
+ const converted = canonicalizePre5381ReplicaBaseline(completed, aws, localRegion, completed !== baseline);
49409
+ return converted === baseline ? {
48329
49410
  baseline,
48330
49411
  aws
48331
- };
48332
- const liveLocal = awsReplicas.find(isLocal);
48333
- if (liveLocal === void 0) return {
48334
- baseline,
48335
- aws
48336
- };
48337
- return {
48338
- baseline: {
48339
- ...baseline,
48340
- [key]: [...baselineReplicas, structuredClone(liveLocal)]
48341
- },
49412
+ } : {
49413
+ baseline: converted,
48342
49414
  aws
48343
49415
  };
48344
49416
  }
@@ -48473,11 +49545,50 @@ function refuseMalformedReplicaTags(properties, resourceType, logicalId, physica
48473
49545
  });
48474
49546
  return tagsByReplica;
48475
49547
  }
49548
+ function completeLegacyLocalReplica(baseline, aws, localRegion) {
49549
+ const key = "Replicas";
49550
+ const baselineReplicas = baseline[key];
49551
+ const awsReplicas = aws[key];
49552
+ if (!Array.isArray(baselineReplicas) || !Array.isArray(awsReplicas)) return baseline;
49553
+ if (!localRegion) return baseline;
49554
+ const isLocal = (element) => asRecord(element)?.["Region"] === localRegion;
49555
+ if (baselineReplicas.some(isLocal)) return baseline;
49556
+ const liveLocal = awsReplicas.find(isLocal);
49557
+ if (liveLocal === void 0) return baseline;
49558
+ return {
49559
+ ...baseline,
49560
+ [key]: [...baselineReplicas, structuredClone(liveLocal)]
49561
+ };
49562
+ }
48476
49563
  function localReplicaEntry(props, region) {
48477
49564
  const raw = props["Replicas"];
48478
49565
  if (!Array.isArray(raw)) return void 0;
48479
49566
  return raw.find((r) => r?.["Region"] === region);
48480
49567
  }
49568
+ const REPLICA_SETTING_MEMBERS = [
49569
+ "PointInTimeRecoverySpecification",
49570
+ "ContributorInsightsSpecification",
49571
+ "KinesisStreamSpecification",
49572
+ "ResourcePolicy",
49573
+ "ReplicaStreamSpecification"
49574
+ ];
49575
+ function replicaSettingsRefusal(properties, previousProperties, currentRegion) {
49576
+ const desired = Array.isArray(properties["Replicas"]) ? properties["Replicas"] : [];
49577
+ const crossRegionCreate = previousProperties === void 0 && desired.some((entry) => {
49578
+ const region = asRecord(entry)?.["Region"];
49579
+ return typeof region === "string" && region !== currentRegion;
49580
+ });
49581
+ for (const entry of desired) {
49582
+ const replica = asRecord(entry);
49583
+ const region = replica?.["Region"];
49584
+ if (typeof region !== "string") continue;
49585
+ const previous = previousProperties === void 0 ? void 0 : localReplicaEntry(previousProperties, region);
49586
+ if (!(previous === void 0 || REPLICA_SETTING_MEMBERS.some((member) => !deepEqual(replica?.[member], previous[member])))) continue;
49587
+ const [refusal] = replicaSettingRefusals(replica);
49588
+ if (refusal !== void 0) return `The ${region} replica: ${refusal}`;
49589
+ if ((previousProperties === void 0 ? crossRegionCreate : previous === void 0) && replica?.["ResourcePolicy"] !== void 0 && replica["ResourcePolicy"] !== null) return `The ${region} replica: Replicas[].ResourcePolicy cannot be set in the deploy that creates the replica — CloudFormation refuses it ("A replica cannot be created in the same stack update as putting a resource-based policy on that new replica"). ` + (previousProperties === void 0 ? `Deploy the table and its replicas without it` : `Deploy the replica without it`) + `, then add the policy in a later deploy`;
49590
+ }
49591
+ }
48481
49592
  function extractLocalDeletionProtection(props, region) {
48482
49593
  const local = localReplicaEntry(props, region);
48483
49594
  const perReplica = coerceCfnBoolean(local?.["DeletionProtectionEnabled"]);
@@ -48610,6 +49721,8 @@ const REPLICA_COPY_RELEASE_POLL_MS = 5e3;
48610
49721
  const DELETION_PROTECTION_REFLIP_MS = 16e3;
48611
49722
  const REPLICA_PROTECTION_SETTLE_POLLS = 60;
48612
49723
  const REPLICA_PROTECTION_SETTLE_POLL_MS = 5e3;
49724
+ const SETTLING_RETRY_ATTEMPTS = 8;
49725
+ const SETTLING_RETRY_INITIAL_MS = 2e3;
48613
49726
  const REPLICA_COPY_RELEASE_ATTEMPTS = 3;
48614
49727
  function isReplicaCopyExistsRefusal(error) {
48615
49728
  return error instanceof Error && /one or more replicas already existed as tables/i.test(error.message);
@@ -52517,5 +53630,5 @@ function sameGenerationClaimsOf(record) {
52517
53630
  }
52518
53631
 
52519
53632
  //#endregion
52520
- export { planOrphanAdoption as $, malformedLocalOutputsWarning as $a, hasReadableExportSet as $c, refuseUnreadableCdkCrossAccountRefs as $i, getDefaultStateBucketName as $l, awaitInFlightSibling as $n, withoutSilentDropProperties as $o, isRefusedByName as $r, hasMaskableValues as $s, resolveReplacementOldType as $t, inheritedProvenanceForChildDiff as A, lacksRecordedTableArn as Aa, recordMaskOnlyValuesIn as Ac, deleteLeftInPlace as Ai, buildDenyExternalAccessPolicy as Al, exportNameSecretExposure as An, refuseMalformedResourceEntriesForImportSave as Ao, secretNamePrintingBag as Ar, DagBuilder as As, readRefactorMarker as At, hasOwnKey as Au, conditionFingerprint as B, UNREADABLE_ORPHANS_CONTAINER_ROW as Ba, rebuildClientForBucketRegion as Bc, reEnableInstanceApiTermination as Bi, isDockerClientEnvKey as Bl, constructPathOf as Bn, repairMalformedOrphanRecordsForReadOnly as Bo, createPreDeleteFinalSnapshot as Br, noEchoOutputsComparison as Bs, refusePendingMovesOut as Bt, injectedAwsRegionValue as Bu, hasCdkAutoDeleteTag as C, carriesDynamicReference as Ca, physicalNameCopiesOf as Cc, customResourceResponseExpirationWarning as Ci, ensureAssetStorage as Cl, displayTextOrWithheld as Cn, refuseMalformedOutputs as Co, noEchoParameterNamesOf as Cr, prefetchCreateOnlyPropertyPaths as Cs, makeForeignHolderScan as Ct, AssemblyReader as Cu, IMPLICIT_DELETE_DEPENDENCIES as D, AWS_NO_VALUE as Da, carriesSecretMask as Dc, RollbackInlinePolicyWriters as Di, readBootstrapMarkerBody as Dl, secretSafeKeyDisplay as Dn, refuseMalformedResourceEntriesForDeploy as Do, maskEventTextWithBoundBags as Dr, canonicalLambdaFunctionName as Ds, isAccessDeniedError as Dt, parseFailureDebugDetail as Du, markRefusedBeforeApplying as E, keepsSecretReferenceToken as Ea, splitGetAttStringForm as Ec, unchangedBehindSecretReference as Ei, parseBootstrapMarker as El, secretBearingStateKeyWarning as En, refuseMalformedResourceEntries as Eo, journaledOrphanPrintingBag as Er, withRetry as Es, chunks as Et, describeJsonParseFailure as Eu, findNestedTemplateTreeDefect as F, passedParameterClassesOf as Fa, WHOLE_DYNAMIC_REFERENCE_PATTERN as Fc, disableInstanceApiTermination as Fi, describeDockerFailure as Fl, isExportAliasCollision as Fn, refuseMalformedResourcePropertiesForOrphan as Fo, storedSecretNameNeedles as Fr, maskReadbackAtCoordinates as Fs, sameMove as Ft, describeFileReadFailure as Fu, enclosingDeadlineRemainingMs as G, hasReadableOrphans as Ga, isAccessDenied$1 as Gc, isSettledInstanceState as Gi, redactedDockerCause as Gl, movedToHint as Gn, repairMalformedResourcesForReadOnly as Go, earliestDefined as Gr, valueAtCoordinate as Gs, demoteSupersededOrphans as Gt, parentSuppliedValues as H, accountArgs as Ha, CrossPrefixScanCache as Hc, INTRINSIC_KEYS as Hi, partitionSensitiveEnv as Hl, formatDestructiveChange as Hn, repairMalformedOutputsForReadOnly as Ho, isFinalSnapshotError as Hr, readbackPathFor as Hs, replayRollback as Ht, resolveBucketRegion as Hu, isAbsoluteAssetPath as I, declaresNoEcho as Ia, isSingleDynamicReferenceToken as Ic, ec2InstanceProtectionSite as Ii, dockerSpawnEnvWithSensitive as Il, bindingSkippedOutputs as In, refuseMalformedResourcesForDeploy as Io, ATOMIC_FINAL_SNAPSHOT_TYPES as Ir, maskWholeValue as Is, updateRefactorMarker as It, displayAssemblyPath as Iu, isSecretBearingReferenceString as J, isReadableOrphanRecord as Ja, withStackInstanceIdWithheld as Jc, s3BucketDualStackDomainName as Ji, warnFinchArgvExposure as Jl, isPairableType as Jn, unreadableResourceEntries as Jo, withCreateTokenLedger as Jr, redactForState as Js, planFailedOps as Jt, withResourceDeadline as K, hasReadableOutputs as Ka, isNotImplemented as Kc, s3BucketArn as Ki, runDockerForeground as Kl, rollbackOrphanIds as Kn, unpreviewableOrphanRecords as Ko, ledgerForStack as Kr, liveMatchesUnresolvedTokenFrame as Ks, isJournaledOrphan as Kt, listNestedTemplateRows as L, JSON_LISTING_HOLE_VALUE as La, LockManager as Lc, isTerminationProtectionPropagationError as Li, finchSecretArgvRefusal as Ll, DEFAULT_RESOURCE_TIMEOUT_MS as Ln, refuseMalformedResourcesForDestroy as Lo, PRE_DELETE_SNAPSHOT_TYPES as Lr, maskedLeafCoordinatesOf as Ls, hasPendingMovesOut as Lt, renderAssemblyPathEscape as Lu, findServiceTokenRefusals as M, parseWebACLArn as Ma, recordNoEchoParameterFreshValue as Mc, withIndeterminateGuard as Mi, resolveDockerContextDirectory as Ml, noEchoParameterValueSeed as Mn, refuseMalformedResourcePropertiesForDestroy as Mo, secretNamedAttributeNamesOf as Mr, canonicalCoordinates as Ms, refactorMarkerMovesOf as Mt, nullPrototypeRecord as Mu, serviceTokenBlockingReason as N, withSharedDrainBudget as Na, recordProvenPublicExpression as Nc, isWaitAbandonedError as Ni, describeDockerCapturedOutput as Nl, collectDeclaredOutputNames as Nn, refuseMalformedResourcePropertiesForDrift as No, secretNamedRecordNeedles as Nr, isMarkedCoordinate as Ns, refactorMarkerRefusalMessage as Nt, ownValue as Nu, computeImplicitDeleteEdges as O, cfnRefValueFromPhysicalId as Oa, provenPublicValue as Oc, UNSPECIFIED_SKIP_REASON as Oi, validateAssetBucketName as Ol, carriedExportAliasExposure as On, refuseMalformedResourceEntriesForDestroy as Oo, namingSecretsWithRecordedNoEcho as Or, lambdaFunctionNameForMask as Os, lookupEachName as Ot, utf8ByteLength as Ou, childTemplateLoader as P, parameterInputsFor as Pa, wholeStringLeavesOf as Pc, markWaitAbandoned as Pi, describeDockerExecFailure as Pl, collectPublishedOutputNames as Pn, refuseMalformedResourcePropertiesForExport as Po, stateSecretNameNeedles as Pr, maskAtCoordinates as Ps, refuseRefactorMarker as Pt, absoluteAssemblyPathEscape as Pu, makeSiblingClaimReader as Q, malformedExportSourceWarning as Qa, exportNamesCarriedFrom as Qc, producerLookupOver as Qi, synthesisStatusMessage as Ql, proposeRenames as Qn, unwrittenCreateOnlyReplacement as Qo, extractDeploymentEventError as Qr, createUnionSecretMasker as Qs, replacementNeverSwapped as Qt, renderNestedTemplateTreeDefect as R, STATE_REGION_DIVERGED as Ra, isLockInfoExpired as Rc, observeThenDisableInstanceApiTermination as Ri, formatDockerLoginError as Rl, DEFAULT_RESOURCE_WARN_AFTER_MS as Rn, refuseMalformedResourcesForExport as Ro, buildFinalSnapshotIdentifier as Rr, noEchoCoordinatesOf as Rs, pendingMovesOutOf as Rt, resolveAssemblyPath as Ru, S3_AUTO_DELETE_OBJECTS_TAG as S, isImpossibleEmptyStoredAttribute as Sa, recoverMaskedOutput as Sc, applyCustomResourceResponseExpiration as Si, assertAssetBucketRegion as Sl, WITHHELD_NAME_DISPLAY as Sn, refuseMalformedOrphansForOrphan as So, noEchoExactEchoLeavesOf as Sr, requireConfigString as Ss, loadJournaledOrphans as St, derivePartitionAndUrlSuffix as Su, getPriorAttempts as T, isNamelessDynamicReferenceError as Ta, recordPhysicalNameCopy as Tc, slowCcOperationTimeoutMs as Ti, isCrossRegionRedirect as Tl, secretBearing as Tn, refuseMalformedResourceAttributesForOrphan as To, completedReplayEntries as Tr, describeTypeWithThrottleRetry as Ts, formatResourceLine as Tt, processStackMessages as Tu, readRecordedConditionVerdicts as U, deployRefusesOrphanRowsReason as Ua, applyCrossPrefixScan as Uc, IntrinsicFunctionResolver as Ui, redactDockerArgvValues as Ul, findRefactorHints as Un, repairMalformedResourceEntriesForReadOnly as Uo, refusesFinalSnapshot as Ur, readsNoEchoSource as Us, removeProtectionTypeList as Ut, conditionInputsFrom as V, UNREADABLE_RESOURCES_MAP_ROW as Va, CrossPrefixReadError as Vc, DiffCalculator as Vi, isMalformedEnvKey as Vl, findDestructiveChanges as Vn, repairMalformedOrphansForReadOnly as Vo, effectiveDeletionPolicy as Vr, passedNoEchoParametersOf as Vs, replayFailedOperations as Vt, clearBucketRegionCache as Vu, enclosingDeadlineExpired as W, displayLogicalId as Wa, crossPrefixDeniedWarning as Wc, poisonRenderedSpellingsCollidingIn as Wi, redactedCause as Wl, hintSidesOf as Wn, repairMalformedResourcePropertiesForReadOnly as Wo, unsupportedFinalSnapshotError as Wr, recordedNoEchoValuesOf as Ws, recordAfterRollbackUpdate as Wt, mergeNoChangeOutputs as X, malformedDriftResourcePropertiesWarning as Xa, acceptedCreateOnlyDropsOf as Xc, s3BucketWebsiteUrl as Xi, getDockerImageBySourceHash as Xl, mappingPairs as Xn, findActionableSilentDrops as Xo, DeploymentEventsReader as Xr, snapshotPassProvenance as Xs, recheckFailedPlan as Xt, keptWholeReasonText as Y, isReadableResourceEntry as Ya, splitImportedOps as Yc, s3BucketRegionalDomainName as Yi, AssetManifestLoader as Yl, looselyEqual as Yn, withheldAccountClause as Yo, acquireIdempotencyToken as Yr, recordReferenceProvenanceEntry as Ys, planRollback as Yt, makeCanonicalizePropertiesFn as Z, malformedExportNamesWarning as Za, describeRegionValueKind as Zc, resolveDynamicReferences as Zi, Synthesizer as Zl, parseMappingFile as Zn, findSilentDropProperties as Zo, DeploymentEventsStore as Zr, carryLogOnlyValues as Zs, recordUnderIdIsNotOwn as Zt, deleteTableWithIndexBusyRetry as _, regionLessSecretName as _a, pathCrossesDottedKey as _c, readsNoEchoDeleteValues as _i, createAssetRedirectResolver as _l, withNameGenerationReached as _n, refuseMalformedNestedChildOutputs as _o, supersededHolderOf as _r, configStringRefusal as _s, deleteJournaledOrphans as _t, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as _u, isProtectionValueActive as a, assertFlagRoleArn as aa, shareLogOnlyValues as ac, refuseMalformedDesiredTags as ai, orphansAfterRollback as al, REDACTED_DELETE_ADDRESS_SKIP_REASON as an, malformedOrphansRefusalMessage as ao, cyan as ar, isStatefulRecreateTargetForReplace as as, displacedOpClause as at, resolveSkipPrefix as au, waitForIndexesSettled as b, parameterTypeMayLoseSecretIdentity as ba, inheritNestedStackParameterAssociations as bc, withPrintingSecrets as bi, AssetModeResolver as bl, reachableDivergentParameters as bn, refuseMalformedOrphans as bo, noEchoAttributeNamesOf as br, requireConfigArray as bs, isHandledOrphan as bt, PARTITION_TABLE as bu, DynamoDBGlobalTableProvider as c, isIamRoleArn as ca, errorCauseChain as cc, definedAttributes as ci, stackInstanceIdCarriedFrom as cl, redactedDeleteAddressSkip as cn, malformedOutputsWarning as co, red as cr, WARM_THROUGHPUT_MEMBERS as cs, getNestedRevertRun as ct, resolveUseCdkBootstrapAssets as cu, compensateRemovedDeletionProtection as d, applyCallerIdentityCredentials as da, scrubResourceRecord as dc, ProviderRegistry as di, timePhase as dl, nameGenerationCarriedFrom as dn, malformedResourcePropertiesWarning as do, deleteSupersededEntry as dr, toCfnInteger as ds, revertNestedChildFromJournal as dt, ssmResolvedValueType as du, keepHeldTokenProvenance as ea, literalSplitDelimitersOf as ec, markDeleteStarted as ei, hasReasonlessBaselineRefusal as el, seedsDeleteFirstGuard as en, malformedLocalResourceEntriesWarning as eo, destroyStackRecordsView as er, NO_CC_HANDLERS_REASON as es, pendingRequestCount as et, getLegacyStateBucketName as eu, deleteBudgetKey as f, callerEnvCredentials as fa, withPhysicalNameCopies as fc, ccBrokenReason as fi, AssetPublisher as fl, nameGenerationHighWaterOf as fn, malformedResourcesWarning as fo, holdsSupersededResources as fr, toFiniteNumber as fs, revertedNestedRowIds as ft, CFN_TEMPLATE_BODY_LIMIT as fu, INDEX_SETTLE_POLL_INTERVAL_MS as g, producerRegionsFromState as ga, isUncertifiedBaselineMaskPosition as gc, TemplateNoEchoReresolver as gi, buildAssetRedirectMap as gl, retiredNameGenerationsLeaving as gn, refuseDivergentRecordRegionForDestroy as go, supersededHeldByOtherTypeWarning as gr, configIntegerRefusal as gs, withNestedStackContext as gt, uploadCfnTemplate as gu, DELETE_INDEX_WAIT_PROCEED_NOTE as h, classifyReplaySecretRegion as ha, dynamicReferenceTokens as hc, waitForLambdaFunctionActive as hi, WorkGraph as hl, retiredNameGenerationsAfter as hn, previewableOrphanRecords as ho, supersededAfterRollback as hr, configBooleanRefusal as hs, getCurrentNestedStackContext as ht, findLargeInlineResources as hu, PROTECTION_PROPERTY_BY_TYPE as i, applyRoleArnIfSet as ia, recordLogOnlyValue as ic, readTagList as ii, isReadableBag as il, inheritProducerRegions as in, malformedOrphanRowsKeptWarning as io, bold as ir, MULTI_REGION_RECREATE_BLOCKED_TYPES as is, NESTED_PENDING_PARENT_REASON as it, resolveCaptureObservedState as iu, deferredServiceTokenWarning as j, refStateLookupFromResource as ja, recordNoEchoAttributeValues as jc, deleteSkipReason as ji, buildDockerImage as jl, isWholeDynamicReferenceValue as jn, refuseMalformedResourceEntriesForOrphan as jo, secretNamePrintingBags as jr, TemplateParser as js, readRefactorMarkerOnce as jt, hasPlainPrototype$1 as ju, crossStackOutputProvenanceSource as k, isStalePlaceholderArnAttribute as ka, recordMaskOnlyValue as kc, deleteIndeterminateGuards as ki, validateContainerRepoName as kl, exportNameNoEchoParameters as kn, refuseMalformedResourceEntriesForImport as ko, orphanRecordsPrintingBag as kr, sameLambdaFunctionAddress as ks, withApiLimit as kt, defineOwnKey as ku, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as l, sendableAssumeRoleCommand as la, maskSecretsInError as lc, stringifyIfAssigned as li, PhaseClock as ll, updatePartialMessage as ln, malformedRenderedContainersWarning as lo, yellow as lr, coerceWarmThroughput as ls, nestedChildStackName as lt, stateBucketExistenceConfirmed as lu, resolveDynamoDbDeleteBudgetMs as m, classifyRecordedSecretRegion as ma, DYNAMIC_REFERENCE_TOKEN_SCAN as mc, wouldReturnToSdkProvider as mi, stringifyValue as ml, retiredAfterRollback as mn, malformedStateRefusalMessage as mo, removeSuperseded as mr, coerceCfnInteger as ms, collectNestedChildUnaddressed as mt, MIGRATE_TMP_PREFIX as mu, recordedProtectionEvidence as n, recordedOutputReferenceRegions as na, printingCorpusOf as nc, DBPROXY_TAG_OPTIONS as ni, importableOutputKeys as nl, findNestedStackTypeChanges as nn, malformedOrphanRecordsRefusalMessage as no, withStackRecords as nr, findReplacedReadersOfRecreateTargets as ns, keptForRetainedRecord as nt, resolveApp as nu, perType as o, assertSendableRoleArn as oa, unionOfSecretBags as oc, tagMapAsList as oi, orphansCarriedFrom as ol, isRedactedRecordedValue as on, malformedOrphansWarning as oo, gray as or, isStatefulRecreateTargetSync as os, displacedPhysicalIdShown as ot, resolveStateBucketWithDefault as ou, resolveDynamoDbDeleteBudgetClock as p, envCredentialsAreAssumedRole as pa, withoutPhysicalNameCopies as pc, isCustomResource as pi, isSensitiveAttributeName as pl, nameScopeOf as pn, malformedScrubResourceEntriesRefusalMessage as po, isSupersededResourceRecord as pr, coerceCfnBoolean as ps, withNestedRevertRun as pt, CFN_TEMPLATE_URL_LIMIT as pu, diffSecurity as q, hasReadableResources as qa, stackInstanceIdOf as qc, s3BucketDomainName as qi, runDockerStreaming as ql, withMovedTo as qn, unreadableOrphanRecords as qo, reserveStackCreateToken as qr, markSameGenerationBag as qs, isReplacementOrphan as qt, recordedProtectionNote as r, recordedReferenceRegions as ra, recordLogOnlyParameterValue as rc, planTagDiff as ri, importableOutputs as rl, getCurrentProducerRegions as rn, malformedOrphanRecordsWarning as ro, replacedDeleteFailureVerdict as rr, shownType as rs, recordRetainedForReadoption as rt, resolveAutoAssetStorage as ru, readProtection as s, explicitRoleArnOrThrow as sa, createSecretMasker as sc, tagPlanWarning as si, shouldRetainResource as sl, redactedDeleteAddressFields as sn, malformedOutputsRefusalMessage as so, green as sr, renderStatefulReason as ss, dropSettledNestedJournals as st, resolveStateBucketWithDefaultAndSource as su, DeployEngine as t, outputReferenceProvenanceOf as ta, logOnlyValueCount as tc, DBPROXY_TAGS_WHAT as ti, hasUnverifiableParameterRefusal as tl, orphanNeedsIdentity as tn, malformedLocalResourcesWarning as to, getStackRecords as tr, hasNoCloudControlHandlers as ts, resolvePendingCloudControlRequests as tt, loadCdkJson as tu, beginDeleteWait as u, AWS_CREDENTIAL_ENV_KEYS as ua, maskSecretsInText as uc, CC_BROKEN_REASON as ui, renderPhaseTimings as ul, updatePartialReason as un, malformedResourceEntriesWarning as uo, addSuperseded as ur, isWarmThroughputDecrease as us, recordDisplacedSkips as ut, warnDeprecatedNoPrefixCliFlag as uu, maskedLogger as v, coerceParameterTypedValue as va, spelledKeysOf as vc, isCustomResourceType as vi, loadPublishableAssetManifest as vl, computeParameterTaint as vn, refuseMalformedOrphanRecords as vo, supersededResourcesOf as vr, readConfigString as vs, dropFailedCommands as vt, decodeListingKey as vu, isTruthyCfnBoolean as w, carriesFetchableDynamicReference as wa, recordAttributeIdCopy as wc, CloudControlProvider as wi, getBootstrapMarkerKey as wl, exportAliasCollisionScrubWarning as wn, refuseMalformedOutputsForDestroy as wo, createReadOnlyAttributeHealerFactory as wr, templateResourceTypes as ws, sameJournaledOrphans as wt, StageLoadError as wu, ECR_AUTO_DELETE_IMAGES_TAG as x, getAccountInfo as xa, recordNestedStackParameterExpressions as xc, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as xi, BOOTSTRAP_MARKER_PREFIX as xl, resourcesNamingDeclaredParameter as xn, refuseMalformedOrphansForDestroy as xo, noEchoComparisonForTemplate as xr, requireConfigObject as xs, journaledOrphanLines as xt, canonicalizeRegion as xu, relayedIndexBusyDelete as y, isUnboundTemplateParameter as ya, identityKeyFor as yc, getCurrentResourceSecrets as yi, rewriteTemplateAssetReferences as yl, namesAnyDeclaredParameter as yn, refuseMalformedOrphanRecordsForDestroy as yo, withoutSuperseded as yr, replayWarn as ys, dropFailedHint as yt, expectedOwnerParam as yu, templateIdentity as z, STATE_RESOURCES_MALFORMED as za, S3StateBackend as zc, reDisableInstanceApiTermination as zi, getDockerCmd as zl, maskingRetryLogger as zn, refuseMalformedState as zo, ccRoutedFinalSnapshotError as zr, noEchoLeavesOf as zs, pendingMovesRefusalMessage as zt, injectAwsRegion as zu };
52521
- //# sourceMappingURL=deploy-engine-BOgsnnk0.js.map
53633
+ export { inheritedProvenanceForChildDiff as $, isStalePlaceholderArnAttribute as $a, carriesSecretMask as $c, deleteIndeterminateGuards as $i, readBootstrapMarkerBody as $l, exportNameSecretExposure as $n, refuseMalformedResourceEntriesForImport as $o, secretNamePrintingBag as $r, canonicalLambdaFunctionName as $s, readRefactorMarker as $t, parseFailureDebugDetail as $u, beginDeleteWait as A, assertSendableRoleArn as Aa, recordLogOnlyValue as Ac, tagPlanWarning as Ai, isReadableBag as Al, redactedDeleteAddressFields as An, malformedOrphansWarning as Ao, green as Ar, isStatefulRecreateTargetSync as As, dropSettledNestedJournals as At, resolveCaptureObservedState as Au, waitForIndexesSettled as B, producerRegionsFromState as Ba, DYNAMIC_REFERENCE_TOKEN_SCAN as Bc, readsNoEchoDeleteValues as Bi, stringifyValue as Bl, withNameGenerationReached as Bn, refuseDivergentRecordRegionForDestroy as Bo, supersededHolderOf as Br, configIntegerRefusal as Bs, deleteJournaledOrphans as Bt, MIGRATE_TMP_PREFIX as Bu, planContributorInsightsOp as C, refuseUnreadableCdkCrossAccountRefs as Ca, carryLogOnlyValues as Cc, markDeleteStarted as Ci, describeRegionValueKind as Cl, seedsDeleteFirstGuard as Cn, malformedLocalOutputsWarning as Co, destroyStackRecordsView as Cr, withoutSilentDropProperties as Cs, pendingRequestCount as Ct, Synthesizer as Cu, reverseMapTableContributorInsights as D, recordedReferenceRegions as Da, logOnlyValueCount as Dc, readTagList as Di, hasUnverifiableParameterRefusal as Dl, inheritProducerRegions as Dn, malformedOrphanRecordsWarning as Do, bold as Dr, shownType as Ds, NESTED_PENDING_PARENT_REASON as Dt, loadCdkJson as Du, reverseMapIndexContributorInsights as E, recordedOutputReferenceRegions as Ea, literalSplitDelimitersOf as Ec, planTagDiff as Ei, hasReasonlessBaselineRefusal as El, getCurrentProducerRegions as En, malformedOrphanRecordsRefusalMessage as Eo, replacedDeleteFailureVerdict as Er, findReplacedReadersOfRecreateTargets as Es, recordRetainedForReadoption as Et, getLegacyStateBucketName as Eu, DELETE_INDEX_WAIT_PROCEED_NOTE as F, applyCallerIdentityCredentials as Fa, maskSecretsInError as Fc, ccBrokenReason as Fi, PhaseClock as Fl, nameGenerationHighWaterOf as Fn, malformedResourcePropertiesWarning as Fo, holdsSupersededResources as Fr, toCfnInteger as Fs, revertedNestedRowIds as Ft, stateBucketExistenceConfirmed as Fu, S3_AUTO_DELETE_OBJECTS_TAG as G, getAccountInfo as Ga, identityKeyFor as Gc, applyCustomResourceResponseExpiration as Gi, rewriteTemplateAssetReferences as Gl, WITHHELD_NAME_DISPLAY as Gn, refuseMalformedOrphansForDestroy as Go, noEchoExactEchoLeavesOf as Gr, requireConfigObject as Gs, loadJournaledOrphans as Gt, expectedOwnerParam as Gu, planTimeToLive as H, coerceParameterTypedValue as Ha, isUncertifiedBaselineMaskPosition as Hc, getCurrentResourceSecrets as Hi, buildAssetRedirectMap as Hl, namesAnyDeclaredParameter as Hn, refuseMalformedOrphanRecords as Ho, withoutSuperseded as Hr, readConfigString as Hs, dropFailedHint as Ht, uploadCfnTemplate as Hu, INDEX_SETTLE_POLL_INTERVAL_MS as I, callerEnvCredentials as Ia, maskSecretsInText as Ic, isCustomResource as Ii, renderPhaseTimings as Il, nameScopeOf as In, malformedResourcesWarning as Io, isSupersededResourceRecord as Ir, toFiniteNumber as Is, withNestedRevertRun as It, warnDeprecatedNoPrefixCliFlag as Iu, getPriorAttempts as J, carriesFetchableDynamicReference as Ja, recoverMaskedOutput as Jc, slowCcOperationTimeoutMs as Ji, assertAssetBucketRegion as Jl, secretBearing as Jn, refuseMalformedOutputsForDestroy as Jo, completedReplayEntries as Jr, templateResourceTypes as Js, formatResourceLine as Jt, derivePartitionAndUrlSuffix as Ju, hasCdkAutoDeleteTag as K, isImpossibleEmptyStoredAttribute as Ka, inheritNestedStackParameterAssociations as Kc, customResourceResponseExpirationWarning as Ki, AssetModeResolver as Kl, displayTextOrWithheld as Kn, refuseMalformedOrphansForOrphan as Ko, noEchoParameterNamesOf as Kr, requireConfigString as Ks, makeForeignHolderScan as Kt, PARTITION_TABLE as Ku, deleteTableWithIndexBusyRetry as L, envCredentialsAreAssumedRole as La, scrubResourceRecord as Lc, wouldReturnToSdkProvider as Li, timePhase as Ll, retiredAfterRollback as Ln, malformedScrubResourceEntriesRefusalMessage as Lo, removeSuperseded as Lr, coerceCfnBoolean as Ls, collectNestedChildUnaddressed as Lt, ssmResolvedValueType as Lu, deleteBudgetKey as M, isIamRoleArn as Ma, unionOfSecretBags as Mc, stringifyIfAssigned as Mi, orphansCarriedFrom as Ml, updatePartialMessage as Mn, malformedOutputsWarning as Mo, yellow as Mr, WARM_THROUGHPUT_MEMBERS as Ms, nestedChildStackName as Mt, resolveStateBucketWithDefault as Mu, resolveDynamoDbDeleteBudgetClock as N, sendableAssumeRoleCommand as Na, createSecretMasker as Nc, CC_BROKEN_REASON as Ni, shouldRetainResource as Nl, updatePartialReason as Nn, malformedRenderedContainersWarning as No, addSuperseded as Nr, coerceWarmThroughput as Ns, recordDisplacedSkips as Nt, resolveStateBucketWithDefaultAndSource as Nu, stripIndexContributorInsights as O, applyRoleArnIfSet as Oa, printingCorpusOf as Oc, refuseMalformedDesiredTags as Oi, importableOutputKeys as Ol, REDACTED_DELETE_ADDRESS_SKIP_REASON as On, malformedOrphanRowsKeptWarning as Oo, cyan as Or, MULTI_REGION_RECREATE_BLOCKED_TYPES as Os, displacedOpClause as Ot, resolveApp as Ou, resolveDynamoDbDeleteBudgetMs as P, AWS_CREDENTIAL_ENV_KEYS as Pa, errorCauseChain as Pc, ProviderRegistry as Pi, stackInstanceIdCarriedFrom as Pl, nameGenerationCarriedFrom as Pn, malformedResourceEntriesWarning as Po, deleteSupersededEntry as Pr, isWarmThroughputDecrease as Ps, revertNestedChildFromJournal as Pt, resolveUseCdkBootstrapAssets as Pu, crossStackOutputProvenanceSource as Q, cfnRefValueFromPhysicalId as Qa, splitGetAttStringForm as Qc, UNSPECIFIED_SKIP_REASON as Qi, parseBootstrapMarker as Ql, exportNameNoEchoParameters as Qn, refuseMalformedResourceEntriesForDestroy as Qo, orphanRecordsPrintingBag as Qr, emrClusterInstancesReplaced as Qs, withApiLimit as Qt, describeJsonParseFailure as Qu, maskedLogger as R, classifyRecordedSecretRegion as Ra, withPhysicalNameCopies as Rc, waitForLambdaFunctionActive as Ri, AssetPublisher as Rl, retiredNameGenerationsAfter as Rn, malformedStateRefusalMessage as Ro, supersededAfterRollback as Rr, coerceCfnInteger as Rs, getCurrentNestedStackContext as Rt, CFN_TEMPLATE_BODY_LIMIT as Ru, indexDeclaresContributorInsights as S, producerLookupOver as Sa, snapshotPassProvenance as Sc, isRefusedByName as Si, acceptedCreateOnlyDropsOf as Sl, resolveReplacementOldType as Sn, malformedExportSourceWarning as So, awaitInFlightSibling as Sr, unwrittenCreateOnlyReplacement as Ss, planOrphanAdoption as St, getDockerImageBySourceHash as Su, readContributorInsightsSpec as T, outputReferenceProvenanceOf as Ta, hasMaskableValues as Tc, DBPROXY_TAG_OPTIONS as Ti, hasReadableExportSet as Tl, findNestedStackTypeChanges as Tn, malformedLocalResourcesWarning as To, withStackRecords as Tr, hasNoCloudControlHandlers as Ts, keptForRetainedRecord as Tt, getDefaultStateBucketName as Tu, readTtlSpec as U, isUnboundTemplateParameter as Ua, pathCrossesDottedKey as Uc, withPrintingSecrets as Ui, createAssetRedirectResolver as Ul, reachableDivergentParameters as Un, refuseMalformedOrphanRecordsForDestroy as Uo, noEchoAttributeNamesOf as Ur, replayWarn as Us, isHandledOrphan as Ut, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as Uu, isTtlAlreadyDisabled as V, regionLessSecretName as Va, dynamicReferenceTokens as Vc, isCustomResourceType as Vi, WorkGraph as Vl, computeParameterTaint as Vn, refuseMalformedNestedChildOutputs as Vo, supersededResourcesOf as Vr, configStringRefusal as Vs, dropFailedCommands as Vt, findLargeInlineResources as Vu, ECR_AUTO_DELETE_IMAGES_TAG as W, parameterTypeMayLoseSecretIdentity as Wa, spelledKeysOf as Wc, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as Wi, loadPublishableAssetManifest as Wl, resourcesNamingDeclaredParameter as Wn, refuseMalformedOrphans as Wo, noEchoComparisonForTemplate as Wr, requireConfigArray as Ws, journaledOrphanLines as Wt, decodeListingKey as Wu, IMPLICIT_DELETE_DEPENDENCIES as X, keepsSecretReferenceToken as Xa, recordAttributeIdCopy as Xc, unchangedBehindSecretReference as Xi, getBootstrapMarkerKey as Xl, secretSafeKeyDisplay as Xn, refuseMalformedResourceEntries as Xo, maskEventTextWithBoundBags as Xr, withRetry as Xs, isAccessDeniedError as Xt, StageLoadError as Xu, markRefusedBeforeApplying as Y, isNamelessDynamicReferenceError as Ya, physicalNameCopiesOf as Yc, onlySecretReferencesDiffer as Yi, ensureAssetStorage as Yl, secretBearingStateKeyWarning as Yn, refuseMalformedResourceAttributesForOrphan as Yo, journaledOrphanPrintingBag as Yr, describeTypeWithThrottleRetry as Ys, chunks as Yt, AssemblyReader as Yu, computeImplicitDeleteEdges as Z, AWS_NO_VALUE as Za, recordPhysicalNameCopy as Zc, RollbackInlinePolicyWriters as Zi, isCrossRegionRedirect as Zl, carriedExportAliasExposure as Zn, refuseMalformedResourceEntriesForDeploy as Zo, namingSecretsWithRecordedNoEcho as Zr, ecsServiceLaunchTypeSetOrChanged as Zs, lookupEachName as Zt, processStackMessages as Zu, streamMemberRefusals as _, s3BucketDomainName as _a, valueAtCoordinate as _c, withCreateTokenLedger as _i, isAccessDenied$1 as _l, planFailedOps as _n, hasReadableResources as _o, isPairableType as _r, unreadableOrphanRecords as _s, isSecretBearingReferenceString as _t, redactedDockerCause as _u, isProtectionValueActive as a, disableInstanceApiTermination as aa, isMarkedCoordinate as ac, ownValue as ad, ATOMIC_FINAL_SNAPSHOT_TYPES as ai, recordProvenPublicExpression as al, updateRefactorMarker as an, passedParameterClassesOf as ao, bindingSkippedOutputs as ar, refuseMalformedResourcePropertiesForOrphan as as, isAbsoluteAssetPath as at, describeDockerCapturedOutput as au, CONTRIBUTOR_INSIGHTS_KEY as b, s3BucketWebsiteUrl as ba, redactForState as bc, DeploymentEventsStore as bi, withStackInstanceIdWithheld as bl, recordUnderIdIsNotOwn as bn, malformedDriftResourcePropertiesWarning as bo, parseMappingFile as br, findActionableSilentDrops as bs, makeCanonicalizePropertiesFn as bt, warnFinchArgvExposure as bu, DynamoDBGlobalTableProvider as c, observeThenDisableInstanceApiTermination as ca, maskWholeValue as cc, displayAssemblyPath as cd, ccRoutedFinalSnapshotError as ci, isSingleDynamicReferenceToken as cl, pendingMovesRefusalMessage as cn, STATE_REGION_DIVERGED as co, maskingRetryLogger as cr, refuseMalformedResourcesForExport as cs, templateIdentity as ct, dockerSpawnEnvWithSensitive as cu, declaredStreamPolicyMember as d, DiffCalculator as da, noEchoLeavesOf as dc, injectAwsRegion as dd, isFinalSnapshotError as di, S3StateBackend as dl, replayRollback as dn, UNREADABLE_RESOURCES_MAP_ROW as do, formatDestructiveChange as dr, repairMalformedOrphansForReadOnly as ds, parentSuppliedValues as dt, getDockerCmd as du, deleteLeftInPlace as ea, lambdaFunctionNameForMask as ec, utf8ByteLength as ed, secretNamePrintingBags as ei, provenPublicValue as el, readRefactorMarkerOnce as en, lacksRecordedTableArn as eo, isWholeDynamicReferenceValue as er, refuseMalformedResourceEntriesForImportSave as es, deferredServiceTokenWarning as et, validateAssetBucketName as eu, declaredStreamTagsMember as f, INTRINSIC_KEYS as fa, noEchoOutputsComparison as fc, injectedAwsRegionValue as fd, refusesFinalSnapshot as fi, rebuildClientForBucketRegion as fl, removeProtectionTypeList as fn, accountArgs as fo, findRefactorHints as fr, repairMalformedOutputsForReadOnly as fs, readRecordedConditionVerdicts as ft, isDockerClientEnvKey as fu, streamDeclaresTags as g, s3BucketArn as ga, recordedNoEchoValuesOf as gc, reserveStackCreateToken as gi, crossPrefixDeniedWarning as gl, isReplacementOrphan as gn, hasReadableOutputs as go, withMovedTo as gr, unpreviewableOrphanRecords as gs, diffSecurity as gt, redactedCause as gu, streamDeclaresPolicy as h, isSettledInstanceState as ha, readsNoEchoSource as hc, ledgerForStack as hi, applyCrossPrefixScan as hl, isJournaledOrphan as hn, hasReadableOrphans as ho, rollbackOrphanIds as hr, repairMalformedResourcesForReadOnly as hs, withResourceDeadline as ht, redactDockerArgvValues as hu, PROTECTION_PROPERTY_BY_TYPE as i, markWaitAbandoned as ia, canonicalCoordinates as ic, nullPrototypeRecord as id, storedSecretNameNeedles as ii, recordNoEchoParameterFreshValue as il, sameMove as in, parameterInputsFor as io, isExportAliasCollision as ir, refuseMalformedResourcePropertiesForExport as is, findNestedTemplateTreeDefect as it, resolveDockerContextDirectory as iu, compensateRemovedDeletionProtection as j, explicitRoleArnOrThrow as ja, shareLogOnlyValues as jc, definedAttributes as ji, orphansAfterRollback as jl, redactedDeleteAddressSkip as jn, malformedOutputsRefusalMessage as jo, red as jr, renderStatefulReason as js, getNestedRevertRun as jt, resolveSkipPrefix as ju, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as k, assertFlagRoleArn as ka, recordLogOnlyParameterValue as kc, tagMapAsList as ki, importableOutputs as kl, isRedactedRecordedValue as kn, malformedOrphansRefusalMessage as ko, gray as kr, isStatefulRecreateTargetForReplace as ks, displacedPhysicalIdShown as kt, resolveAutoAssetStorage as ku, STREAM_POLICY_KEY as l, reDisableInstanceApiTermination as la, maskedLeafCoordinatesOf as lc, renderAssemblyPathEscape as ld, createPreDeleteFinalSnapshot as li, LockManager as ll, refusePendingMovesOut as ln, STATE_RESOURCES_MALFORMED as lo, constructPathOf as lr, refuseMalformedState as ls, conditionFingerprint as lt, finchSecretArgvRefusal as lu, reverseMapStreamPolicy as m, poisonRenderedSpellingsCollidingIn as ma, readbackPathFor as mc, resolveBucketRegion as md, earliestDefined as mi, CrossPrefixScanCache as ml, demoteSupersededOrphans as mn, displayLogicalId as mo, movedToHint as mr, repairMalformedResourcePropertiesForReadOnly as ms, enclosingDeadlineRemainingMs as mt, partitionSensitiveEnv as mu, recordedProtectionEvidence as n, withIndeterminateGuard as na, DagBuilder as nc, hasOwnKey as nd, secretNamedRecordNeedles as ni, recordMaskOnlyValuesIn as nl, refactorMarkerRefusalMessage as nn, parseWebACLArn as no, collectDeclaredOutputNames as nr, refuseMalformedResourcePropertiesForDestroy as ns, serviceTokenBlockingReason as nt, buildDenyExternalAccessPolicy as nu, perType as o, ec2InstanceProtectionSite as oa, maskAtCoordinates as oc, absoluteAssemblyPathEscape as od, PRE_DELETE_SNAPSHOT_TYPES as oi, wholeStringLeavesOf as ol, hasPendingMovesOut as on, declaresNoEcho as oo, DEFAULT_RESOURCE_TIMEOUT_MS as or, refuseMalformedResourcesForDeploy as os, listNestedTemplateRows as ot, describeDockerExecFailure as ou, planStreamMemberOps as p, IntrinsicFunctionResolver as pa, passedNoEchoParametersOf as pc, clearBucketRegionCache as pd, unsupportedFinalSnapshotError as pi, CrossPrefixReadError as pl, recordAfterRollbackUpdate as pn, deployRefusesOrphanRowsReason as po, hintSidesOf as pr, repairMalformedResourceEntriesForReadOnly as ps, enclosingDeadlineExpired as pt, isMalformedEnvKey as pu, isTruthyCfnBoolean as q, carriesDynamicReference as qa, recordNestedStackParameterExpressions as qc, CloudControlProvider as qi, BOOTSTRAP_MARKER_PREFIX as ql, exportAliasCollisionScrubWarning as qn, refuseMalformedOutputs as qo, createReadOnlyAttributeHealerFactory as qr, prefetchCreateOnlyPropertyPaths as qs, sameJournaledOrphans as qt, canonicalizeRegion as qu, recordedProtectionNote as r, isWaitAbandonedError as ra, TemplateParser as rc, hasPlainPrototype$1 as rd, stateSecretNameNeedles as ri, recordNoEchoAttributeValues as rl, refuseRefactorMarker as rn, withSharedDrainBudget as ro, collectPublishedOutputNames as rr, refuseMalformedResourcePropertiesForDrift as rs, childTemplateLoader as rt, buildDockerImage as ru, readProtection as s, isTerminationProtectionPropagationError as sa, maskReadbackAtCoordinates as sc, describeFileReadFailure as sd, buildFinalSnapshotIdentifier as si, WHOLE_DYNAMIC_REFERENCE_PATTERN as sl, pendingMovesOutOf as sn, JSON_LISTING_HOLE_VALUE as so, DEFAULT_RESOURCE_WARN_AFTER_MS as sr, refuseMalformedResourcesForDestroy as ss, renderNestedTemplateTreeDefect as st, describeDockerFailure as su, DeployEngine as t, deleteSkipReason as ta, sameLambdaFunctionAddress as tc, defineOwnKey as td, secretNamedAttributeNamesOf as ti, recordMaskOnlyValue as tl, refactorMarkerMovesOf as tn, refStateLookupFromResource as to, noEchoParameterValueSeed as tr, refuseMalformedResourceEntriesForOrphan as ts, findServiceTokenRefusals as tt, validateContainerRepoName as tu, STREAM_TAGS_KEY as u, reEnableInstanceApiTermination as ua, noEchoCoordinatesOf as uc, resolveAssemblyPath as ud, effectiveDeletionPolicy as ui, isLockInfoExpired as ul, replayFailedOperations as un, UNREADABLE_ORPHANS_CONTAINER_ROW as uo, findDestructiveChanges as ur, repairMalformedOrphanRecordsForReadOnly as us, conditionInputsFrom as ut, formatDockerLoginError as uu, streamPolicyMatchesDeclared as v, s3BucketDualStackDomainName as va, liveMatchesUnresolvedTokenFrame as vc, acquireIdempotencyToken as vi, isNotImplemented as vl, planRollback as vn, isReadableOrphanRecord as vo, looselyEqual as vr, unreadableResourceEntries as vs, keptWholeReasonText as vt, runDockerForeground as vu, planIndexContributorInsightsOps as w, keepHeldTokenProvenance as wa, createUnionSecretMasker as wc, DBPROXY_TAGS_WHAT as wi, exportNamesCarriedFrom as wl, orphanNeedsIdentity as wn, malformedLocalResourceEntriesWarning as wo, getStackRecords as wr, NO_CC_HANDLERS_REASON as ws, resolvePendingCloudControlRequests as wt, synthesisStatusMessage as wu, contributorInsightsRefusals as x, resolveDynamicReferences as xa, recordReferenceProvenanceEntry as xc, extractDeploymentEventError as xi, splitImportedOps as xl, replacementNeverSwapped as xn, malformedExportNamesWarning as xo, proposeRenames as xr, findSilentDropProperties as xs, makeSiblingClaimReader as xt, AssetManifestLoader as xu, streamTagsMatchDeclared as y, s3BucketRegionalDomainName as ya, markSameGenerationBag as yc, DeploymentEventsReader as yi, stackInstanceIdOf as yl, recheckFailedPlan as yn, isReadableResourceEntry as yo, mappingPairs as yr, withheldAccountClause as ys, mergeNoChangeOutputs as yt, runDockerStreaming as yu, relayedIndexBusyDelete as z, classifyReplaySecretRegion as za, withoutPhysicalNameCopies as zc, TemplateNoEchoReresolver as zi, isSensitiveAttributeName as zl, retiredNameGenerationsLeaving as zn, previewableOrphanRecords as zo, supersededHeldByOtherTypeWarning as zr, configBooleanRefusal as zs, withNestedStackContext as zt, CFN_TEMPLATE_URL_LIMIT as zu };
53634
+ //# sourceMappingURL=deploy-engine-DSpxEUjC.js.map