@go-to-k/cdkd 0.298.0 → 0.298.2

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.
Files changed (24) hide show
  1. package/dist/{asg-provider-B1xRE8do.js → asg-provider-Ds5ElkGf.js} +2 -2
  2. package/dist/{asg-provider-B1xRE8do.js.map → asg-provider-Ds5ElkGf.js.map} +1 -1
  3. package/dist/cli.js +2 -2
  4. package/dist/{deploy-engine-CJTG3tft.js → deploy-engine-BgWY0v3K.js} +1273 -142
  5. package/dist/deploy-engine-BgWY0v3K.js.map +1 -0
  6. package/dist/{iam-role-provider-qxfS4sDT.js → iam-role-provider-KCSxfQZh.js} +2 -2
  7. package/dist/{iam-role-provider-qxfS4sDT.js.map → iam-role-provider-KCSxfQZh.js.map} +1 -1
  8. package/dist/index.d.ts +12 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +2 -2
  11. package/dist/{neptune-provider-CU_1O2FR.js → neptune-provider-BGAmbyRB.js} +2 -2
  12. package/dist/{neptune-provider-CU_1O2FR.js.map → neptune-provider-BGAmbyRB.js.map} +1 -1
  13. package/dist/{program-BivXyHmd.js → program-BzEA5Cka.js} +59 -15
  14. package/dist/program-BzEA5Cka.js.map +1 -0
  15. package/dist/{provider-classes-1EHrZ847.js → provider-classes-B74Nt7nS.js} +136 -85
  16. package/dist/provider-classes-B74Nt7nS.js.map +1 -0
  17. package/dist/{rds-provider-J40R0ysf.js → rds-provider-D4kq6O-L.js} +2 -2
  18. package/dist/{rds-provider-J40R0ysf.js.map → rds-provider-D4kq6O-L.js.map} +1 -1
  19. package/dist/{version-D96I6uiO.js → version-CUIlKSi1.js} +2 -2
  20. package/dist/{version-D96I6uiO.js.map → version-CUIlKSi1.js.map} +1 -1
  21. package/package.json +9 -9
  22. package/dist/deploy-engine-CJTG3tft.js.map +0 -1
  23. package/dist/program-BivXyHmd.js.map +0 -1
  24. package/dist/provider-classes-1EHrZ847.js.map +0 -1
@@ -2,7 +2,7 @@ import { r as getAwsClients, s as __exportAll } from "./aws-clients-CnmtbrxD.js"
2
2
  import { A as UNRENDERABLE, C as looksLikeCdkdGeneratedName, E as withoutGeneratedFallbackName, F as displayStackName, H as truncateCodePoints, I as isPasteableIdent, M as displayAwsMessage, N as displayIdent, O as SECRET_REF_MAX_CODE_POINTS, P as displaySafe, R as plainIdentOr, S as getCurrentStackName, T as withStackName, V as terminalSafe, a as getLogger, b as generateResourceNameWithFallback, d as installLogLineMaskerSource, f as getLiveRenderer, g as applyDefaultNameForFallback, k as STACK_REF_MAX_CODE_POINTS, o as isStdoutReservedForPayload, r as safeStringify$1, t as describeAwsFailure, u as currentLogLineMasker, v as explicitNamePropertyFor, w as withSkipPrefix, x as getCurrentSkipPrefix, y as generateResourceName, z as safeMsg } from "./aws-failure-text-DtvlUugx.js";
3
3
  import { $ as protectedReplacementAdvice, $n as isAmbiguousOutcomeError, $t as credentialFingerprint, A as isQuotableImportValue, An as UNSHOWABLE_VALUE, At as isAuxiliaryMarkOf, B as isTerminalDeleteFailure, Bn as withheldTargetClause, Bt as recoveryCommandFlags, Ct as RETRY_AUXILIARY_OWNER, Dt as createdResourceIdentityBeforeFailure, E as assertRegionMatch, Et as createdBeforeFailure, F as resolveExplicitPhysicalId, Fn as physicalIdShownBesideCommand, G as runDeleteAttempt, Gn as isNameCollisionErrorFrom, H as observeThenDisableProtection, Ht as CUSTOM_RESOURCE_RESPONSE_PREFIX, In as plainOrDescribed, J as DELETION_PROTECTION_DOC_POINTER, Jn as isReplayedNameCollisionFrom, Kn as isNameCooldownError, L as ProtectionFlipRegistry, Ln as quotedOrDescribed, Lt as formatLockExpiry, M as quotedRemedyLogicalId, Mt as markCreatedBeforeFailure, N as refusalTypeShown, Nn as isInertUnquoted, Nt as UNREPRODUCIBLE_LOCK_CLAUSE, On as SHELL_ACTIVE, Ot as hasCreatedBeforeFailure, Pn as pasteableCommand, Pt as buildForceUnlockCommand, Q as pasteableAwsCommand, Qn as isAmbiguousCcHandlerErrorCode, Qt as clientDefaultsFor, R as compensateProtectionFlip, Rn as shellBoundedDisplay, Rt as formatLockOperation, Sn as SynthesisError, St as withDerivedNameMasks, T as RESOURCE_NOT_FOUND, Tn as normalizeAwsError, U as protectionFlipKey, Un as isUpdateUnsupportedError, Ut as DEFAULT_STATE_PREFIX, Vt as sanitizeRecoveryValue, Wn as hasReplayMayCollide, Wt as injectiveKey, Xn as markReplayMayCollide, Xt as ambientClientDefaults, Yt as withPasteableAwsProfile, Zn as formatRetryClassificationSignals, Zt as ambientCredentialConfig, _n as ResourceTimeoutError, _t as createMaskedLogSinks, an as DependencyError, ar as isMarkedNonRetryable, at as startInterruptWatch, bt as maskDeep, cn as IntrinsicResolutionRefusalError, cr as markRedactedCause, ct as canonicalizeRoute53QueryName, d as prepareRemovalForUpdate, dn as LockError, en as AccountIdUnavailableError, er as isIamPropagationError, f as removalWarning, fn as MacroExpansionError, ft as logicalIdShown, gn as ProvisioningError, gt as stateOrphanRecordRemedy, ht as segmentAfterAnchor, i as holdsSecretDerivedEntry, in as CrossAccountSecretRefusalError, it as isInterruptedWaitError, j as normalizeAwsTagsToCfn, jn as commandHole, jt as markAuxiliaryFailure, kn as SHELL_ACTIVE_WHY, kt as isAuxiliaryFailure, l as withUnchangedSecretPrincipalLists, lr as wrapMaskedAwsError, m as withoutInjectedRemovals, mt as resourceTypeShown, nn as CdkdError, nr as isTransientServerError, or as isThrottlingError, ot as ElapsedBudgetRegistry, pn as MalformedProducerRecordRefusalError, qn as isRecreateRetryableError, qt as producerRecordKey, rr as retryClassificationText, sn as DynamicReferenceRegionAmbiguousError, sr as markNonRetryable, st as monotonicNowMs, tn as AssetError, tr as isRetryableTransientError, ut as compositeIdSeparatorRefusal, vn as ResourceUpdateNotSupportedError, vt as createMaskedRetryLogger, w as withoutServerErrorRetries, wt as carryCreatedBeforeFailure, xn as StateError, xt as maskerOrIdentity, yt as isSecretDerivedValue, z as deleteWithProtectionCompensation, zn as shellQuote, zt as formatLockOwner } from "./iam-policy-targets-CwKiK9nS.js";
4
4
  import { a as setAssumedRoleCredentials, i as getPreAssumeEnvCredentials, n as awsClientDefaults, o as setPreAssumeEnvCredentials, r as getAssumedRoleCredentials, s as ambientRegion, t as SECOND_ROLE_PUBLISH_REFUSAL } from "./aws-client-defaults-D0q0z4dG.js";
5
- import { t as getCdkdVersion } from "./version-D96I6uiO.js";
5
+ import { t as getCdkdVersion } from "./version-CUIlKSi1.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";
@@ -5442,6 +5442,7 @@ function legacyProbeBelongsTo(probe, region) {
5442
5442
  }
5443
5443
  }
5444
5444
  const KEPT_AT_CLOCK_TOLERANCE_MS = 2e3;
5445
+ const ROLLBACK_JOURNAL_OBJECT_DESCRIPTION = "the rollback journal, whose `failedOperations[].attemptedProperties` records the properties of the failed write verbatim";
5445
5446
  var S3StateBackend = class S3StateBackend {
5446
5447
  logger = getLogger().child("S3StateBackend");
5447
5448
  s3Client;
@@ -5450,6 +5451,8 @@ var S3StateBackend = class S3StateBackend {
5450
5451
  clientResolved = false;
5451
5452
  scanClient;
5452
5453
  resolveInFlight = null;
5454
+ journalsReadAbsent = /* @__PURE__ */ new Set();
5455
+ journalTouches = /* @__PURE__ */ new Map();
5453
5456
  constructor(s3Client, config, clientOpts = {}) {
5454
5457
  this.s3Client = s3Client;
5455
5458
  this.config = config;
@@ -5481,8 +5484,32 @@ var S3StateBackend = class S3StateBackend {
5481
5484
  return `${this.config.prefix}/${stackName}/state.json`;
5482
5485
  }
5483
5486
  getRollbackJournalKey(stackName, region) {
5487
+ const key = this.rollbackJournalKey(stackName, region);
5488
+ this.journalsReadAbsent.delete(key);
5489
+ this.journalTouches.set(key, (this.journalTouches.get(key) ?? 0) + 1);
5490
+ return key;
5491
+ }
5492
+ rollbackJournalKey(stackName, region) {
5484
5493
  return `${this.config.prefix}/${stackName}/${region}/rollback-journal.json`;
5485
5494
  }
5495
+ rollbackJournalReadAbsent(stackName, region) {
5496
+ return this.journalsReadAbsent.has(this.rollbackJournalKey(stackName, region));
5497
+ }
5498
+ async warmConnections(stackName, region, count) {
5499
+ try {
5500
+ await this.ensureClientForBucket();
5501
+ const owner = await this.ownerParam();
5502
+ const key = this.getStateKey(stackName, region);
5503
+ await Promise.allSettled(Array.from({ length: count }, () => this.s3Client.send(new HeadObjectCommand({
5504
+ Bucket: this.config.bucket,
5505
+ ...owner,
5506
+ Key: key
5507
+ }))));
5508
+ } catch {}
5509
+ }
5510
+ async purgeRollbackJournalVersions(stackName, region) {
5511
+ await this.purgeNoncurrentVersions([this.rollbackJournalKey(stackName, region)], { objectDescription: ROLLBACK_JOURNAL_OBJECT_DESCRIPTION });
5512
+ }
5486
5513
  getCreateTokenLedgerKey(stackName, region) {
5487
5514
  return `${this.config.prefix}/${stackName}/${region}/create-tokens.json`;
5488
5515
  }
@@ -6157,8 +6184,14 @@ var S3StateBackend = class S3StateBackend {
6157
6184
  }
6158
6185
  }
6159
6186
  async loadRollbackJournal(stackName, region) {
6160
- const body = await this.getRawObject(this.getRollbackJournalKey(stackName, region));
6161
- if (body === null) return null;
6187
+ const key = this.rollbackJournalKey(stackName, region);
6188
+ const touches = this.journalTouches.get(key) ?? 0;
6189
+ this.journalsReadAbsent.delete(key);
6190
+ const body = await this.getRawObject(key);
6191
+ if (body === null) {
6192
+ if ((this.journalTouches.get(key) ?? 0) === touches) this.journalsReadAbsent.add(key);
6193
+ return null;
6194
+ }
6162
6195
  return parseRollbackJournal(body, stackName);
6163
6196
  }
6164
6197
  async appendRollbackJournalSegment(stackName, region, segment) {
@@ -6302,7 +6335,7 @@ var S3StateBackend = class S3StateBackend {
6302
6335
  this.logger.warn(`Failed to delete rollback journal for ${this.stackRef(stackName, region)}: ${errorDetail$2(error)}`);
6303
6336
  }
6304
6337
  }
6305
- await this.purgeNoncurrentVersions([key], { objectDescription: "the rollback journal, whose `failedOperations[].attemptedProperties` records the properties of the failed write verbatim" });
6338
+ await this.purgeNoncurrentVersions([key], { objectDescription: ROLLBACK_JOURNAL_OBJECT_DESCRIPTION });
6306
6339
  return gone;
6307
6340
  }
6308
6341
  async headObject(key) {
@@ -6543,6 +6576,8 @@ var LockManager = class {
6543
6576
  abandonedLocks = /* @__PURE__ */ new Map();
6544
6577
  clientResolved = false;
6545
6578
  resolveInFlight = null;
6579
+ deferReleasePurge;
6580
+ deferredPurges = /* @__PURE__ */ new Set();
6546
6581
  constructor(s3Client, config, options) {
6547
6582
  this.s3Client = s3Client;
6548
6583
  this.config = config;
@@ -6551,6 +6586,10 @@ var LockManager = class {
6551
6586
  this.ttlMs = ttlMinutes * 60 * 1e3;
6552
6587
  this.renewalDisabled = options?.disableRenewal === true;
6553
6588
  this.renewalIntervalMs = renewalIntervalFor(this.ttlMs);
6589
+ this.deferReleasePurge = options?.deferReleasePurge === true;
6590
+ }
6591
+ async settleDeferredPurges() {
6592
+ await Promise.all(this.deferredPurges);
6554
6593
  }
6555
6594
  async ownerParam() {
6556
6595
  return expectedOwnerParam(this.s3Client);
@@ -6779,7 +6818,11 @@ var LockManager = class {
6779
6818
  }
6780
6819
  throw new LockError(`Failed to release lock for stack ${stackRef(stackName, region)}: ${errorDetail$1(error)}`, error instanceof Error ? error : void 0);
6781
6820
  } finally {
6782
- await this.purgeLockVersions(this.getLockKey(stackName, region), "release");
6821
+ const purge = this.purgeLockVersions(this.getLockKey(stackName, region), "release");
6822
+ if (this.deferReleasePurge) {
6823
+ this.deferredPurges.add(purge);
6824
+ purge.finally(() => this.deferredPurges.delete(purge));
6825
+ } else await purge;
6783
6826
  }
6784
6827
  }
6785
6828
  async stillOursByBody(held) {
@@ -7439,6 +7482,23 @@ function positionByCrossStackSource(bag, source, secrets) {
7439
7482
  return certifiedExpressionForLeaf(secrets, association, bag);
7440
7483
  }
7441
7484
 
7485
+ //#endregion
7486
+ //#region src/deployment/secret-redaction/physical-name-copies.ts
7487
+ const physicalNameCopiesOf = /* @__PURE__ */ new WeakMap();
7488
+ function recordPhysicalNameCopy(secrets, physicalId) {
7489
+ if (physicalId === "") return;
7490
+ sideSetOf(physicalNameCopiesOf, secrets).add(physicalId);
7491
+ }
7492
+ function physicalNameSpans(names, value) {
7493
+ const spans = [];
7494
+ if (names === void 0) return spans;
7495
+ for (const name of names) for (let at = value.indexOf(name); at !== -1; at = value.indexOf(name, at + 1)) spans.push({
7496
+ start: at,
7497
+ end: at + name.length
7498
+ });
7499
+ return spans;
7500
+ }
7501
+
7442
7502
  //#endregion
7443
7503
  //#region src/deployment/secret-redaction/fresh-noecho.ts
7444
7504
  function embedsFreshNoEchoValue(text, secrets, freshClass) {
@@ -7507,9 +7567,14 @@ function isStrictlyInsideASpan(spans, start, end) {
7507
7567
  }
7508
7568
  function embedsNeedleOutsideReferences(leaf, needles, secrets) {
7509
7569
  let spans;
7570
+ let names;
7510
7571
  for (const needle of needles) for (let at = leaf.indexOf(needle); at >= 0; at = leaf.indexOf(needle, at + 1)) {
7511
7572
  spans ??= isDynamicReferenceString(leaf) ? resolvableReferenceSpans(leaf, new Set(secrets.values())) : [];
7512
- if (!isStrictlyInsideASpan(spans, at, at + needle.length)) return true;
7573
+ if (isStrictlyInsideASpan(spans, at, at + needle.length)) continue;
7574
+ names ??= physicalNameSpans(physicalNameCopiesOf.get(secrets), leaf);
7575
+ const end = at + needle.length;
7576
+ if (names.some((n) => n.start <= at && end <= n.end)) continue;
7577
+ return true;
7513
7578
  }
7514
7579
  return false;
7515
7580
  }
@@ -8407,23 +8472,6 @@ function deriveReadbackNeedles(bag, source, secrets, rules) {
8407
8472
  };
8408
8473
  }
8409
8474
 
8410
- //#endregion
8411
- //#region src/deployment/secret-redaction/physical-name-copies.ts
8412
- const physicalNameCopiesOf = /* @__PURE__ */ new WeakMap();
8413
- function recordPhysicalNameCopy(secrets, physicalId) {
8414
- if (physicalId === "") return;
8415
- sideSetOf(physicalNameCopiesOf, secrets).add(physicalId);
8416
- }
8417
- function physicalNameSpans(names, value) {
8418
- const spans = [];
8419
- if (names === void 0) return spans;
8420
- for (const name of names) for (let at = value.indexOf(name); at !== -1; at = value.indexOf(name, at + 1)) spans.push({
8421
- start: at,
8422
- end: at + name.length
8423
- });
8424
- return spans;
8425
- }
8426
-
8427
8475
  //#endregion
8428
8476
  //#region src/deployment/secret-redaction/redact-state.ts
8429
8477
  function redactSecretsForState(bag, secrets, source, rules = TEMPLATE_DERIVED_RULES) {
@@ -9738,7 +9786,7 @@ function noEchoParametersReadBy(node, sources) {
9738
9786
  }
9739
9787
  function noEchoComparison(options) {
9740
9788
  const { sources, values, minNeedleLength, publicTokens } = options;
9741
- return ({ templateProperties, desired, current, record }) => {
9789
+ return ({ templateProperties, desired, current }) => {
9742
9790
  const coordinates = noEchoCoordinatesOf(templateProperties, desired, sources);
9743
9791
  const needles = [];
9744
9792
  for (const name of noEchoParametersReadBy(templateProperties, sources)) {
@@ -9774,10 +9822,6 @@ function noEchoComparison(options) {
9774
9822
  };
9775
9823
  masked = walk(masked);
9776
9824
  }
9777
- if (noEchoLeavesOf(record) !== void 0) return {
9778
- desired: masked,
9779
- current
9780
- };
9781
9825
  const witnessed = witnessNormalize(current, desired, masked);
9782
9826
  const shown = maskAtCoordinatesWith(witnessed.current, witnessed.differing, PREVIOUS_NOECHO_VALUE);
9783
9827
  return {
@@ -19154,6 +19198,80 @@ function quotedRender(rendered, quote, described = "(not shown: it is not a plai
19154
19198
  return QUOTABLE_RENDER.test(rendered) ? `${quote}${rendered}${quote}` : described;
19155
19199
  }
19156
19200
 
19201
+ //#endregion
19202
+ //#region src/deployment/secret-region-classification.ts
19203
+ const REPLAY_SECRET_SERVICES = /* @__PURE__ */ new Set([
19204
+ "secretsmanager",
19205
+ "ssm",
19206
+ "ssm-secure"
19207
+ ]);
19208
+ function secretsManagerSecretId(inner) {
19209
+ const afterService = inner.substring(15);
19210
+ let stringIdx = afterService.indexOf(":SecretString:");
19211
+ let binaryIdx = afterService.indexOf(":SecretBinary:");
19212
+ if (stringIdx < 0 && afterService.endsWith(":SecretString")) stringIdx = afterService.length - 13;
19213
+ if (binaryIdx < 0 && afterService.endsWith(":SecretBinary")) binaryIdx = afterService.length - 13;
19214
+ const delimiterIdx = stringIdx >= 0 && binaryIdx >= 0 ? Math.min(stringIdx, binaryIdx) : stringIdx >= 0 ? stringIdx : binaryIdx;
19215
+ return delimiterIdx >= 0 ? afterService.substring(0, delimiterIdx) : afterService;
19216
+ }
19217
+ function ssmParameterName(inner) {
19218
+ const serviceEnd = inner.indexOf(":");
19219
+ return serviceEnd < 0 ? "" : inner.substring(serviceEnd + 1);
19220
+ }
19221
+ function arnRegion(secretId) {
19222
+ if (!secretId.startsWith("arn:")) return void 0;
19223
+ const region = secretId.split(":")[3];
19224
+ return region ? region : void 0;
19225
+ }
19226
+ function producerRegionsFromState(state) {
19227
+ const seen = /* @__PURE__ */ new Set();
19228
+ const regions = [];
19229
+ for (const entry of [...state.imports ?? [], ...state.outputReads ?? []]) {
19230
+ const canonical = canonicalizeRegion(entry.sourceRegion);
19231
+ if (!canonical || seen.has(canonical)) continue;
19232
+ seen.add(canonical);
19233
+ regions.push(entry.sourceRegion);
19234
+ }
19235
+ return regions;
19236
+ }
19237
+ function secretReferenceName(expression) {
19238
+ const inner = expression.startsWith("{{resolve:") ? expression.slice(10, -2) : void 0;
19239
+ if (inner === void 0) return void 0;
19240
+ const service = inner.split(":")[0];
19241
+ if (service === void 0 || !REPLAY_SECRET_SERVICES.has(service)) return void 0;
19242
+ const secretName = service === "secretsmanager" ? secretsManagerSecretId(inner) : ssmParameterName(inner);
19243
+ return secretName ? secretName : void 0;
19244
+ }
19245
+ function regionLessSecretName(expression) {
19246
+ const secretName = secretReferenceName(expression);
19247
+ return secretName !== void 0 && arnRegion(secretName) === void 0 ? secretName : void 0;
19248
+ }
19249
+ function classifyReplaySecretRegion(expression, consumerRegion, importedProducerRegions) {
19250
+ const secretName = secretReferenceName(expression);
19251
+ if (!secretName) return { kind: "local" };
19252
+ const named = arnRegion(secretName);
19253
+ if (named !== void 0) return canonicalizeRegion(named) === canonicalizeRegion(consumerRegion) ? { kind: "local" } : {
19254
+ kind: "named-region",
19255
+ secretName,
19256
+ region: named
19257
+ };
19258
+ const seen = /* @__PURE__ */ new Set();
19259
+ const foreignProducerRegions = [];
19260
+ for (const candidate of importedProducerRegions ?? []) {
19261
+ const canonical = canonicalizeRegion(candidate);
19262
+ if (!canonical || canonical === canonicalizeRegion(consumerRegion)) continue;
19263
+ if (seen.has(canonical)) continue;
19264
+ seen.add(canonical);
19265
+ foreignProducerRegions.push(candidate);
19266
+ }
19267
+ if (foreignProducerRegions.length === 0) return { kind: "local" };
19268
+ return {
19269
+ kind: "ambiguous",
19270
+ secretName,
19271
+ foreignProducerRegions
19272
+ };
19273
+ }
19274
+
19157
19275
  //#endregion
19158
19276
  //#region src/utils/s3-endpoints.ts
19159
19277
  const S3_WEBSITE_ENDPOINT_LEGACY_DASH_REGIONS = /* @__PURE__ */ new Set([
@@ -19802,6 +19920,7 @@ function noteAttributeSecrecy(logicalId, attributeName, value, context) {
19802
19920
  const served = override !== void 0 && Object.hasOwn(override, attributeName);
19803
19921
  if (served) value = override[attributeName];
19804
19922
  recordSecretNamedRead(logicalId, value, context);
19923
+ recordProducerSecretPairs(logicalId, value, context);
19805
19924
  const declared = context.noEchoAttributeResources?.get(logicalId);
19806
19925
  if ((served || declared === true || declared !== void 0 && declared.has(attributeName)) && context.recordedSecretValues) recordFreshNoEchoValuesIn(value, context.recordedSecretValues, void 0, this.publicNoEchoTokens(context, logicalId));
19807
19926
  if (context.redactedAttributeReads !== void 0 && carriesSecretMask(value)) {
@@ -19818,6 +19937,24 @@ function noteAttributeSecrecy(logicalId, attributeName, value, context) {
19818
19937
  }
19819
19938
  return value;
19820
19939
  }
19940
+ function recordProducerSecretPairs(logicalId, value, context) {
19941
+ const bag = context.recordedSecretValues;
19942
+ if (bag === void 0 || context.producerSecrets === void 0) return;
19943
+ const producer = context.producerSecrets(logicalId);
19944
+ if (producer === void 0 || producer === bag || producer.size === 0) return;
19945
+ const preRun = context.producerPreRunPhysicalId?.(logicalId);
19946
+ const record = Object.hasOwn(context.resources, logicalId) ? context.resources[logicalId] : void 0;
19947
+ if (typeof preRun !== "string" || record?.physicalId !== preRun) return;
19948
+ const physicalId = preRun.toLowerCase();
19949
+ const leaves = [...wholeStringLeavesOf(value)];
19950
+ if (leaves.length === 0) return;
19951
+ for (const [plaintext, expression] of producer) {
19952
+ if (plaintext.length < 4 || bag.has(plaintext)) continue;
19953
+ if (typeof expression !== "string" || !expression.startsWith("{{resolve:")) continue;
19954
+ if (!physicalId.includes(plaintext.toLowerCase())) continue;
19955
+ if (leaves.some((leaf) => leaf.includes(plaintext))) bag.set(plaintext, expression);
19956
+ }
19957
+ }
19821
19958
  function recordSecretNamedRead(logicalId, value, context) {
19822
19959
  const bag = context.secretNameSink ?? context.printingSecrets ?? context.recordedSecretValues;
19823
19960
  if (bag === void 0 || context.secretNameNeedles === void 0) return;
@@ -19832,8 +19969,8 @@ function recordSecretNamedRead(logicalId, value, context) {
19832
19969
  async function reresolveRecordedReferences(value, logicalId, context, origin, sourceKey) {
19833
19970
  if (!carriesDynamicReference(value) || carriesSecretMask(value)) return value;
19834
19971
  if (context.recordedSecretValues === void 0) return value;
19835
- if (!referencesProvenLocal(value, logicalId, context)) {
19836
- this.logger.debug(safeMsg`Not re-resolving the reference(s) in ${this.displayMasked(origin, context)}: the template of ${this.displayMasked(logicalId, context)} does not spell them, so the region that resolved them is unknown`);
19972
+ if (!referencesProvenLocal(value, logicalId, context) && !referencesRegionProven(value, context, this.resolverRegion)) {
19973
+ this.logger.debug(safeMsg`Not re-resolving the reference(s) in ${this.displayMasked(origin, context)}: the template of ${this.displayMasked(logicalId, context)} does not spell them, and this stack may read a stack in another region, so the region that resolved them is unknown`);
19837
19974
  return value;
19838
19975
  }
19839
19976
  if (!await this.referencesMatchPhysicalId(value, logicalId, context)) {
@@ -19853,6 +19990,11 @@ async function referencesMatchPhysicalId(value, logicalId, context) {
19853
19990
  }
19854
19991
  return true;
19855
19992
  }
19993
+ function referencesRegionProven(value, context, region) {
19994
+ const evidence = context.secretRegionEvidence?.();
19995
+ if (evidence?.complete !== true) return false;
19996
+ return [...wholeStringLeavesOf(value)].every((leaf) => dynamicReferenceTokens(leaf).every((token) => classifyReplaySecretRegion(token, region, evidence.regions).kind !== "ambiguous"));
19997
+ }
19856
19998
  function readsAnotherStack(node) {
19857
19999
  if (Object.hasOwn(node, "Fn::ImportValue") || Object.hasOwn(node, "Fn::GetStackOutput")) return true;
19858
20000
  if (!Object.hasOwn(node, "Fn::GetAtt")) return false;
@@ -20087,6 +20229,13 @@ async function reresolveCrossStackValue(value, producerRegion, context, origin,
20087
20229
  });
20088
20230
  }
20089
20231
  }
20232
+ if (context.recordedSecretValues !== void 0 && producerOutput !== void 0 && producerOutput.crossAccount !== true && context.stateBackend !== void 0 && context.skipDynamicReferences !== true) {
20233
+ const plain = [...wholeStringLeavesOf(value)].filter((leaf) => !leaf.includes("{{resolve:") && !carriesSecretMask(leaf));
20234
+ if (plain.length > 0) {
20235
+ const ids = await producerPhysicalIds(context.recordedImports ?? context.recordedSecretValues, context.stateBackend, producerOutput.stackName, producerOutput.region || this.resolverRegion, () => this.logger.debug(safeMsg`Could not read the state of producer ${this.displayMasked(producerOutput.stackName, context)} for its physical ids; no cross-stack copy of one is kept (go-to-k/cdkd#4819)`));
20236
+ for (const leaf of plain) if (ids.has(leaf)) recordPhysicalNameCopy(context.recordedSecretValues, leaf);
20237
+ }
20238
+ }
20090
20239
  if (!carriesDynamicReference(value)) return value;
20091
20240
  const resolver = this.resolverForProducerRegion(producerRegion, context, producerRegionLogText);
20092
20241
  const pinnedContext = producerRegion ? withoutProducerRegions(context) : context;
@@ -20205,6 +20354,33 @@ function recordImport(context, exportName, producerStack, producerRegion) {
20205
20354
  sourceRegion: producerRegion
20206
20355
  });
20207
20356
  }
20357
+ const producerPhysicalIdReads = /* @__PURE__ */ new WeakMap();
20358
+ function producerPhysicalIds(scope, stateBackend, stackName, region, onFailure) {
20359
+ let reads = producerPhysicalIdReads.get(scope);
20360
+ if (reads === void 0) {
20361
+ reads = /* @__PURE__ */ new Map();
20362
+ producerPhysicalIdReads.set(scope, reads);
20363
+ }
20364
+ const key = JSON.stringify([stackName, region]);
20365
+ let read = reads.get(key);
20366
+ if (read === void 0) {
20367
+ read = (async () => {
20368
+ const ids = /* @__PURE__ */ new Set();
20369
+ try {
20370
+ const data = await stateBackend.getState(stackName, region);
20371
+ for (const record of Object.values(data?.state.resources ?? {})) {
20372
+ const id = record?.physicalId;
20373
+ if (typeof id === "string" && id !== "") ids.add(id);
20374
+ }
20375
+ } catch {
20376
+ onFailure();
20377
+ }
20378
+ return ids;
20379
+ })();
20380
+ reads.set(key, read);
20381
+ }
20382
+ return read;
20383
+ }
20208
20384
 
20209
20385
  //#endregion
20210
20386
  //#region src/deployment/intrinsic-resolver/cfn-fallback.ts
@@ -20859,80 +21035,6 @@ async function getCrossAccountStackState(roleArn, stackName, region, context) {
20859
21035
  }).getState(stackName, region);
20860
21036
  }
20861
21037
 
20862
- //#endregion
20863
- //#region src/deployment/secret-region-classification.ts
20864
- const REPLAY_SECRET_SERVICES = /* @__PURE__ */ new Set([
20865
- "secretsmanager",
20866
- "ssm",
20867
- "ssm-secure"
20868
- ]);
20869
- function secretsManagerSecretId(inner) {
20870
- const afterService = inner.substring(15);
20871
- let stringIdx = afterService.indexOf(":SecretString:");
20872
- let binaryIdx = afterService.indexOf(":SecretBinary:");
20873
- if (stringIdx < 0 && afterService.endsWith(":SecretString")) stringIdx = afterService.length - 13;
20874
- if (binaryIdx < 0 && afterService.endsWith(":SecretBinary")) binaryIdx = afterService.length - 13;
20875
- const delimiterIdx = stringIdx >= 0 && binaryIdx >= 0 ? Math.min(stringIdx, binaryIdx) : stringIdx >= 0 ? stringIdx : binaryIdx;
20876
- return delimiterIdx >= 0 ? afterService.substring(0, delimiterIdx) : afterService;
20877
- }
20878
- function ssmParameterName(inner) {
20879
- const serviceEnd = inner.indexOf(":");
20880
- return serviceEnd < 0 ? "" : inner.substring(serviceEnd + 1);
20881
- }
20882
- function arnRegion(secretId) {
20883
- if (!secretId.startsWith("arn:")) return void 0;
20884
- const region = secretId.split(":")[3];
20885
- return region ? region : void 0;
20886
- }
20887
- function producerRegionsFromState(state) {
20888
- const seen = /* @__PURE__ */ new Set();
20889
- const regions = [];
20890
- for (const entry of [...state.imports ?? [], ...state.outputReads ?? []]) {
20891
- const canonical = canonicalizeRegion(entry.sourceRegion);
20892
- if (!canonical || seen.has(canonical)) continue;
20893
- seen.add(canonical);
20894
- regions.push(entry.sourceRegion);
20895
- }
20896
- return regions;
20897
- }
20898
- function secretReferenceName(expression) {
20899
- const inner = expression.startsWith("{{resolve:") ? expression.slice(10, -2) : void 0;
20900
- if (inner === void 0) return void 0;
20901
- const service = inner.split(":")[0];
20902
- if (service === void 0 || !REPLAY_SECRET_SERVICES.has(service)) return void 0;
20903
- const secretName = service === "secretsmanager" ? secretsManagerSecretId(inner) : ssmParameterName(inner);
20904
- return secretName ? secretName : void 0;
20905
- }
20906
- function regionLessSecretName(expression) {
20907
- const secretName = secretReferenceName(expression);
20908
- return secretName !== void 0 && arnRegion(secretName) === void 0 ? secretName : void 0;
20909
- }
20910
- function classifyReplaySecretRegion(expression, consumerRegion, importedProducerRegions) {
20911
- const secretName = secretReferenceName(expression);
20912
- if (!secretName) return { kind: "local" };
20913
- const named = arnRegion(secretName);
20914
- if (named !== void 0) return canonicalizeRegion(named) === canonicalizeRegion(consumerRegion) ? { kind: "local" } : {
20915
- kind: "named-region",
20916
- secretName,
20917
- region: named
20918
- };
20919
- const seen = /* @__PURE__ */ new Set();
20920
- const foreignProducerRegions = [];
20921
- for (const candidate of importedProducerRegions ?? []) {
20922
- const canonical = canonicalizeRegion(candidate);
20923
- if (!canonical || canonical === canonicalizeRegion(consumerRegion)) continue;
20924
- if (seen.has(canonical)) continue;
20925
- seen.add(canonical);
20926
- foreignProducerRegions.push(candidate);
20927
- }
20928
- if (foreignProducerRegions.length === 0) return { kind: "local" };
20929
- return {
20930
- kind: "ambiguous",
20931
- secretName,
20932
- foreignProducerRegions
20933
- };
20934
- }
20935
-
20936
21038
  //#endregion
20937
21039
  //#region src/deployment/intrinsic-resolver/dynamic-refs.ts
20938
21040
  function secretVerdictScope(resolver) {
@@ -22188,6 +22290,7 @@ function recordInheritedParameterSecrets(parameterName, value, context) {
22188
22290
  const inherited = context.inheritedSecrets;
22189
22291
  const recorded = context.recordedSecretValues;
22190
22292
  if (inherited && recorded) carryLogOnlyValuesCarriedBy(inherited, recorded, value);
22293
+ if (recorded) carryPhysicalNameCopiesCarriedBy(context, recorded, value);
22191
22294
  if (inherited && recorded) recordInheritedNoEchoListElements(this, inherited, recorded, value, context);
22192
22295
  if (!inherited || inherited.size === 0 || !recorded) return;
22193
22296
  for (const [plaintext, expression] of inheritedSecretsCarriedBy(value, inherited)) {
@@ -22196,6 +22299,12 @@ function recordInheritedParameterSecrets(parameterName, value, context) {
22196
22299
  carryFreshNoEchoMark(inherited, recorded, plaintext);
22197
22300
  }
22198
22301
  }
22302
+ function carryPhysicalNameCopiesCarriedBy(context, recorded, value) {
22303
+ const names = context.inheritedPhysicalNameCopies ?? (context.inheritedSecrets && physicalNameCopiesOf.get(context.inheritedSecrets));
22304
+ if (names === void 0 || names.size === 0) return;
22305
+ const leaves = [...wholeStringLeavesOf(value)];
22306
+ for (const name of names) if (leaves.some((leaf) => leaf.includes(name))) recordPhysicalNameCopy(recorded, name);
22307
+ }
22199
22308
  function carriedExpressionFor(inherited, parameterName, value, plaintext, survivor) {
22200
22309
  const own = inheritedParameterExpression(inherited, parameterName, plaintext);
22201
22310
  if (typeof own === "string") return own;
@@ -22787,8 +22896,7 @@ var DiffCalculator = class DiffCalculator {
22787
22896
  resourceType: desiredResource.Type,
22788
22897
  templateProperties: rawDesiredProps,
22789
22898
  desired: desiredPropsForCompare,
22790
- current: currentPropsForCompare,
22791
- record: currentResource
22899
+ current: currentPropsForCompare
22792
22900
  });
22793
22901
  const desiredCompared = noEchoCompared?.desired ?? desiredPropsForCompare;
22794
22902
  const currentCompared = noEchoCompared?.current ?? currentPropsForCompare;
@@ -24194,6 +24302,10 @@ const WRITABLE_GETATT_ATTRIBUTES = {
24194
24302
  "AWS::MediaConvert::JobTemplate": ["Name"],
24195
24303
  "AWS::MediaConvert::Preset": ["Name"],
24196
24304
  "AWS::MediaConvert::Queue": ["Name"],
24305
+ "AWS::NetworkManager::ConnectAttachment": ["ProposedSegmentChange"],
24306
+ "AWS::NetworkManager::SiteToSiteVpnAttachment": ["ProposedSegmentChange"],
24307
+ "AWS::NetworkManager::TransitGatewayRouteTableAttachment": ["ProposedSegmentChange"],
24308
+ "AWS::NetworkManager::VpcAttachment": ["ProposedSegmentChange"],
24197
24309
  "AWS::OpsWorks::Instance": ["AvailabilityZone"],
24198
24310
  "AWS::OpsWorks::UserProfile": ["SshUsername"],
24199
24311
  "AWS::QuickSight::Analysis": ["Errors", "Sheets"],
@@ -24873,7 +24985,7 @@ var CloudControlProvider = class {
24873
24985
  const indeterminateGuard = await this.confirmDeleteTargetIdentity(logicalId, resourceType, physicalId, context);
24874
24986
  if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
24875
24987
  this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
24876
- const { ASGProvider } = await import("./asg-provider-B1xRE8do.js");
24988
+ const { ASGProvider } = await import("./asg-provider-Ds5ElkGf.js");
24877
24989
  const delegateRegion = ambientRegion();
24878
24990
  let asgProvider = this.asgDeleteDelegates.get(delegateRegion);
24879
24991
  if (asgProvider === void 0) {
@@ -24979,7 +25091,7 @@ var CloudControlProvider = class {
24979
25091
  const family = SDK_DELETE_FAMILIES.get(resourceType);
24980
25092
  const cached = this.sdkDeleteDelegates.get(family);
24981
25093
  if (cached !== void 0 && cached.region === ccRegion) return cached.provider;
24982
- const provider = family === "rds" ? new (await (import("./rds-provider-J40R0ysf.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-CU_1O2FR.js"))).NeptuneProvider({ region: ccRegion });
25094
+ const provider = family === "rds" ? new (await (import("./rds-provider-D4kq6O-L.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-BGAmbyRB.js"))).NeptuneProvider({ region: ccRegion });
24983
25095
  this.sdkDeleteDelegates.set(family, {
24984
25096
  region: ccRegion,
24985
25097
  provider
@@ -29651,6 +29763,15 @@ var CreateTokenLedger = class {
29651
29763
  }
29652
29764
  });
29653
29765
  }
29766
+ prefetch() {
29767
+ return this.serialized(async () => {
29768
+ try {
29769
+ await this.current();
29770
+ } catch {
29771
+ this.stale = true;
29772
+ }
29773
+ });
29774
+ }
29654
29775
  forget(logicalIds) {
29655
29776
  return this.serialized(async () => {
29656
29777
  try {
@@ -29739,6 +29860,9 @@ function earliestDefined(...times) {
29739
29860
  const defined = times.filter((t) => t !== void 0);
29740
29861
  return defined.length === 0 ? void 0 : Math.min(...defined);
29741
29862
  }
29863
+ async function prefetchCreateTokenLedger() {
29864
+ await ledgerStore.getStore()?.prefetch();
29865
+ }
29742
29866
  async function forgetRecordedCreateTokens(logicalIds) {
29743
29867
  await ledgerStore.getStore()?.forget(logicalIds);
29744
29868
  }
@@ -34854,6 +34978,10 @@ async function settleJournalAfterSuccess(stackName, completedOperations, previou
34854
34978
  const deployRunId = this.options.eventRecorder?.runId;
34855
34979
  const stripOnFailure = /* @__PURE__ */ new Map();
34856
34980
  const [ownLeft] = await Promise.all([(async () => {
34981
+ if (this.absentJournalVersionPurge !== void 0 && this.stateBackend.rollbackJournalReadAbsent(stackName, this.stackRegion)) {
34982
+ await this.absentJournalVersionPurge;
34983
+ return 0;
34984
+ }
34857
34985
  const own = await settleJournaledOrphansOnSuccess({
34858
34986
  stateBackend: this.stateBackend,
34859
34987
  stackName,
@@ -36295,9 +36423,13 @@ function buildResolverContext(base, stackName) {
36295
36423
  recordedOutputReads: this.recordedOutputReads,
36296
36424
  attributeHealer: (logicalId, resource) => this.healStaleAttributes(logicalId, resource, stackName),
36297
36425
  ...this.options.inheritedSecrets && hasMaskableValues(this.options.inheritedSecrets) && { inheritedSecrets: this.options.inheritedSecrets },
36426
+ ...this.options.inheritedPhysicalNameCopies && { inheritedPhysicalNameCopies: this.options.inheritedPhysicalNameCopies },
36298
36427
  recordedSecretValues,
36299
36428
  noEchoAttributeResources: this.noEchoAttributeResources,
36300
36429
  secretNameNeedles: (logicalId) => this.noteSecretNamedRecord(logicalId, Object.hasOwn(base.resources, logicalId) ? base.resources[logicalId] : void 0),
36430
+ producerSecrets: (logicalId) => this.perResourceSecrets.get(logicalId),
36431
+ secretRegionEvidence: () => this.runProducerRegionEvidence?.(),
36432
+ producerPreRunPhysicalId: (logicalId) => Object.hasOwn(this.healBaseline, logicalId) ? this.healBaseline[logicalId]?.physicalId : void 0,
36301
36433
  ...base.redactedAttributeReads && { redactedAttributeReads: base.redactedAttributeReads }
36302
36434
  };
36303
36435
  }
@@ -39422,7 +39554,10 @@ function noEchoPositionSources(resources = {}, template = this.constructPathTemp
39422
39554
  function noEchoLeavesFor(logicalId, record, templateProps, sources) {
39423
39555
  if (templateProps !== void 0 && isWrittenFromDeployedTemplate(record.properties)) return canonicalCoordinates(noEchoCoordinatesOf(templateProps, record.properties, sources));
39424
39556
  const existing = noEchoLeavesOf(record);
39425
- if (existing !== void 0) return canonicalCoordinates(existing);
39557
+ if (existing !== void 0) {
39558
+ const confirmed = this.witnessConfirmedLeaves.get(logicalId) ?? [];
39559
+ return canonicalCoordinates([...existing, ...confirmed]);
39560
+ }
39426
39561
  const resolvedAsSame = this.perResourceResolvedType.get(logicalId) === record.resourceType;
39427
39562
  const source = (templateProps !== void 0 && resolvedAsSame ? templateProps : void 0) ?? templatePropertiesFor(this, logicalId, record.resourceType);
39428
39563
  if (source === void 0) return void 0;
@@ -39634,6 +39769,981 @@ function noEchoComparisonForTemplate(template, knownConditions, values, resource
39634
39769
  return (input) => compare(input);
39635
39770
  }
39636
39771
 
39772
+ //#endregion
39773
+ //#region src/analyzer/security-changes.ts
39774
+ const RESOURCE_SCRUTINY = {
39775
+ "AWS::Bedrock::KnowledgeBasePolicy": "ResourcePolicyResource",
39776
+ "AWS::Bedrock::ResourcePolicy": "ResourcePolicyResource",
39777
+ "AWS::CloudTrail::ResourcePolicy": "ResourcePolicyResource",
39778
+ "AWS::EC2::SecurityGroupEgress": "EgressRuleResource",
39779
+ "AWS::EC2::SecurityGroupIngress": "IngressRuleResource",
39780
+ "AWS::ECR::RegistryPolicy": "ResourcePolicyResource",
39781
+ "AWS::EventSchemas::RegistryPolicy": "ResourcePolicyResource",
39782
+ "AWS::EventsV2::ResourcePolicy": "ResourcePolicyResource",
39783
+ "AWS::IAM::GroupPolicy": "IdentityPolicyResource",
39784
+ "AWS::IAM::ManagedPolicy": "IdentityPolicyResource",
39785
+ "AWS::IAM::Policy": "IdentityPolicyResource",
39786
+ "AWS::IAM::RolePolicy": "IdentityPolicyResource",
39787
+ "AWS::IAM::UserPolicy": "IdentityPolicyResource",
39788
+ "AWS::IoT::Policy": "ResourcePolicyResource",
39789
+ "AWS::Kinesis::ResourcePolicy": "ResourcePolicyResource",
39790
+ "AWS::Lambda::Permission": "LambdaPermission",
39791
+ "AWS::Lambda::ResourcePolicy": "ResourcePolicyResource",
39792
+ "AWS::Lex::ResourcePolicy": "ResourcePolicyResource",
39793
+ "AWS::Logs::ResourcePolicy": "ResourcePolicyResource",
39794
+ "AWS::MSK::ClusterPolicy": "ResourcePolicyResource",
39795
+ "AWS::MediaPackageV2::ChannelPolicy": "ResourcePolicyResource",
39796
+ "AWS::MediaPackageV2::OriginEndpointPolicy": "ResourcePolicyResource",
39797
+ "AWS::MediaTailor::ChannelPolicy": "ResourcePolicyResource",
39798
+ "AWS::S3::BucketPolicy": "ResourcePolicyResource",
39799
+ "AWS::S3::MultiRegionAccessPointPolicy": "ResourcePolicyResource",
39800
+ "AWS::S3Express::BucketPolicy": "ResourcePolicyResource",
39801
+ "AWS::S3Files::FileSystemPolicy": "ResourcePolicyResource",
39802
+ "AWS::S3ObjectLambda::AccessPointPolicy": "ResourcePolicyResource",
39803
+ "AWS::S3Outposts::BucketPolicy": "ResourcePolicyResource",
39804
+ "AWS::S3Tables::TableBucketPolicy": "ResourcePolicyResource",
39805
+ "AWS::S3Tables::TablePolicy": "ResourcePolicyResource",
39806
+ "AWS::S3Vectors::VectorBucketPolicy": "ResourcePolicyResource",
39807
+ "AWS::SMSVOICE::ResourcePolicy": "ResourcePolicyResource",
39808
+ "AWS::SNS::TopicInlinePolicy": "ResourcePolicyResource",
39809
+ "AWS::SNS::TopicPolicy": "ResourcePolicyResource",
39810
+ "AWS::SQS::QueueInlinePolicy": "ResourcePolicyResource",
39811
+ "AWS::SQS::QueuePolicy": "ResourcePolicyResource",
39812
+ "AWS::SSM::ResourcePolicy": "ResourcePolicyResource",
39813
+ "AWS::SSO::Assignment": "SsoAssignmentResource",
39814
+ "AWS::SSO::InstanceAccessControlAttributeConfiguration": "SsoInstanceACAConfigResource",
39815
+ "AWS::SSO::PermissionSet": "SsoPermissionSet",
39816
+ "AWS::SecretsManager::ResourcePolicy": "ResourcePolicyResource",
39817
+ "AWS::VpcLattice::AuthPolicy": "ResourcePolicyResource",
39818
+ "AWS::VpcLattice::ResourcePolicy": "ResourcePolicyResource"
39819
+ };
39820
+ const PROPERTY_SCRUTINY = {
39821
+ "AWS::ApiGateway::DomainNameV2": { Policy: "InlineResourcePolicy" },
39822
+ "AWS::ApiGateway::RestApi": { Policy: "InlineResourcePolicy" },
39823
+ "AWS::Backup::BackupVault": { AccessPolicy: "InlineResourcePolicy" },
39824
+ "AWS::Backup::LogicallyAirGappedBackupVault": { AccessPolicy: "InlineResourcePolicy" },
39825
+ "AWS::CodeArtifact::Domain": { PermissionsPolicyDocument: "InlineResourcePolicy" },
39826
+ "AWS::CodeArtifact::Repository": { PermissionsPolicyDocument: "InlineResourcePolicy" },
39827
+ "AWS::EC2::SecurityGroup": {
39828
+ SecurityGroupEgress: "EgressRules",
39829
+ SecurityGroupIngress: "IngressRules"
39830
+ },
39831
+ "AWS::EC2::VPCEndpoint": { PolicyDocument: "InlineResourcePolicy" },
39832
+ "AWS::ECR::PublicRepository": { RepositoryPolicyText: "InlineResourcePolicy" },
39833
+ "AWS::ECR::Repository": { RepositoryPolicyText: "InlineResourcePolicy" },
39834
+ "AWS::EFS::FileSystem": { FileSystemPolicy: "InlineResourcePolicy" },
39835
+ "AWS::Events::EventBus": { Policy: "InlineResourcePolicy" },
39836
+ "AWS::IAM::Group": {
39837
+ ManagedPolicyArns: "ManagedPolicies",
39838
+ Policies: "InlineIdentityPolicies"
39839
+ },
39840
+ "AWS::IAM::Role": {
39841
+ AssumeRolePolicyDocument: "InlineResourcePolicy",
39842
+ ManagedPolicyArns: "ManagedPolicies",
39843
+ Policies: "InlineIdentityPolicies"
39844
+ },
39845
+ "AWS::IAM::User": {
39846
+ ManagedPolicyArns: "ManagedPolicies",
39847
+ Policies: "InlineIdentityPolicies"
39848
+ },
39849
+ "AWS::KMS::Key": { KeyPolicy: "InlineResourcePolicy" },
39850
+ "AWS::KMS::ReplicaKey": { KeyPolicy: "InlineResourcePolicy" },
39851
+ "AWS::Logs::LogGroup": {
39852
+ DataProtectionPolicy: "InlineResourcePolicy",
39853
+ ResourcePolicyDocument: "InlineResourcePolicy"
39854
+ },
39855
+ "AWS::MPA::ApprovalTeam": { Policies: "InlineIdentityPolicies" },
39856
+ "AWS::NetworkManager::CoreNetwork": { PolicyDocument: "InlineResourcePolicy" },
39857
+ "AWS::Oam::Sink": { Policy: "InlineResourcePolicy" },
39858
+ "AWS::Omics::SequenceStore": { S3AccessPolicy: "InlineResourcePolicy" },
39859
+ "AWS::RAM::Permission": { PolicyTemplate: "InlineResourcePolicy" },
39860
+ "AWS::Redshift::Cluster": { NamespaceResourcePolicy: "InlineResourcePolicy" },
39861
+ "AWS::RedshiftServerless::Namespace": { NamespaceResourcePolicy: "InlineResourcePolicy" },
39862
+ "AWS::RolesAnywhere::Profile": { ManagedPolicyArns: "ManagedPolicies" },
39863
+ "AWS::S3::AccessPoint": { Policy: "InlineResourcePolicy" },
39864
+ "AWS::S3Express::AccessPoint": { Policy: "InlineResourcePolicy" },
39865
+ "AWS::S3Outposts::AccessPoint": { Policy: "InlineResourcePolicy" },
39866
+ "AWS::SNS::Subscription": {
39867
+ RedrivePolicy: "InlineResourcePolicy",
39868
+ ReplayPolicy: "InlineResourcePolicy"
39869
+ },
39870
+ "AWS::SNS::Topic": {
39871
+ DataProtectionPolicy: "InlineResourcePolicy",
39872
+ ArchivePolicy: "InlineResourcePolicy"
39873
+ },
39874
+ "AWS::SQS::Queue": { RedriveAllowPolicy: "InlineResourcePolicy" },
39875
+ "AWS::SSO::PermissionSet": {
39876
+ InlinePolicy: "InlineResourcePolicy",
39877
+ ManagedPolicies: "ManagedPolicies"
39878
+ },
39879
+ "AWS::SageMaker::ModelPackageGroup": { ModelPackageGroupPolicy: "InlineResourcePolicy" },
39880
+ "AWS::Serverless::Function": { AssumeRolePolicyDocument: "InlineResourcePolicy" }
39881
+ };
39882
+ function resourceScrutiny(type) {
39883
+ return Object.hasOwn(RESOURCE_SCRUTINY, type) ? RESOURCE_SCRUTINY[type] : void 0;
39884
+ }
39885
+ function propertyScrutinies(type) {
39886
+ return Object.hasOwn(PROPERTY_SCRUTINY, type) ? PROPERTY_SCRUTINY[type] ?? {} : {};
39887
+ }
39888
+ function isScrutinizedProperty(type, path) {
39889
+ return resourceScrutiny(type) !== void 0 || Object.hasOwn(propertyScrutinies(type), path);
39890
+ }
39891
+ function strictEqual(a, b) {
39892
+ if (a === b) return true;
39893
+ if (typeof a !== "object" || typeof b !== "object" || a === null || b === null) return a !== a && b !== b;
39894
+ if (Array.isArray(a) !== Array.isArray(b)) return false;
39895
+ if (Array.isArray(a)) {
39896
+ const bArr = b;
39897
+ return a.length === bArr.length && a.every((v, i) => strictEqual(v, bArr[i]));
39898
+ }
39899
+ const aKeys = Object.keys(a);
39900
+ if (aKeys.length !== Object.keys(b).length) return false;
39901
+ return aKeys.every((k) => Object.hasOwn(b, k) && strictEqual(a[k], b[k]));
39902
+ }
39903
+ function cfnEqual(lvalue, rvalue) {
39904
+ if (lvalue === rvalue) return true;
39905
+ if ((typeof lvalue === "string" && typeof rvalue === "boolean" || typeof lvalue === "boolean" && typeof rvalue === "string") && lvalue.toString() === rvalue.toString()) return true;
39906
+ if ((typeof lvalue === "string" || typeof rvalue === "string") && Number(lvalue) === Number(rvalue)) return true;
39907
+ if (typeof lvalue !== typeof rvalue) return false;
39908
+ if (Array.isArray(lvalue) !== Array.isArray(rvalue)) return false;
39909
+ if (Array.isArray(lvalue)) {
39910
+ if (lvalue.length !== rvalue.length) return false;
39911
+ for (let i = 0; i < lvalue.length; i++) if (!cfnEqual(lvalue[i], rvalue[i])) return false;
39912
+ return true;
39913
+ }
39914
+ if (typeof lvalue === "object") {
39915
+ if (lvalue === null || rvalue === null) return false;
39916
+ const keys = Object.keys(lvalue);
39917
+ if (keys.length !== Object.keys(rvalue).length) return false;
39918
+ for (const key of keys) {
39919
+ if (!Object.hasOwn(rvalue, key)) return false;
39920
+ if (key === "DependsOn") {
39921
+ if (!dependsOnEqual(lvalue[key], rvalue[key])) return false;
39922
+ continue;
39923
+ }
39924
+ if (!cfnEqual(lvalue[key], rvalue[key])) return false;
39925
+ }
39926
+ return true;
39927
+ }
39928
+ return false;
39929
+ }
39930
+ function dependsOnEqual(lvalue, rvalue) {
39931
+ if (Array.isArray(lvalue) !== Array.isArray(rvalue)) {
39932
+ const array = Array.isArray(lvalue) ? lvalue : rvalue;
39933
+ const nonArray = Array.isArray(lvalue) ? rvalue : lvalue;
39934
+ return array.length === 1 && cfnEqual(array[0], nonArray);
39935
+ }
39936
+ if (Array.isArray(lvalue) && Array.isArray(rvalue)) {
39937
+ if (lvalue.length !== rvalue.length) return false;
39938
+ for (let i = 0; i < lvalue.length; i++) if (!cfnEqual(lvalue[i], rvalue[0]) && lvalue.length === 1) return false;
39939
+ return true;
39940
+ }
39941
+ return false;
39942
+ }
39943
+ function normalize(template) {
39944
+ if (typeof template !== "object" || template === null) return;
39945
+ for (const key of Object.keys(template)) {
39946
+ if (key === "Fn::GetAtt" && typeof template[key] === "string") {
39947
+ template[key] = template[key].split(".");
39948
+ continue;
39949
+ } else if (key === "DependsOn") {
39950
+ if (typeof template[key] === "string") template[key] = [template[key]];
39951
+ else if (Array.isArray(template[key])) template[key] = template[key].sort((x, y) => String(x) < String(y) ? -1 : String(x) > String(y) ? 1 : 0);
39952
+ continue;
39953
+ }
39954
+ if (Array.isArray(template[key])) for (const element of template[key]) normalize(element);
39955
+ else normalize(template[key]);
39956
+ }
39957
+ }
39958
+ function getIntrinsic(x) {
39959
+ if (x === void 0 || x === null || Array.isArray(x) || typeof x !== "object") return void 0;
39960
+ const keys = Object.keys(x);
39961
+ return keys.length === 1 && (keys[0] === "Ref" || keys[0].startsWith("Fn::")) ? {
39962
+ fn: keys[0],
39963
+ args: x[keys[0]]
39964
+ } : void 0;
39965
+ }
39966
+ function isNoValue(x) {
39967
+ const intrinsic = getIntrinsic(x);
39968
+ return intrinsic !== void 0 && intrinsic.fn === "Ref" && intrinsic.args === "AWS::NoValue";
39969
+ }
39970
+ function renderIntrinsics(x) {
39971
+ if (Array.isArray(x)) return x.filter((el) => !isNoValue(el)).map(renderIntrinsics);
39972
+ if (isNoValue(x)) return void 0;
39973
+ const intrinsic = getIntrinsic(x);
39974
+ if (intrinsic !== void 0) {
39975
+ if (intrinsic.fn === "Ref") return "${" + intrinsic.args + "}";
39976
+ if (intrinsic.fn === "Fn::GetAtt") return "${" + intrinsic.args[0] + "." + intrinsic.args[1] + "}";
39977
+ if (intrinsic.fn === "Fn::Join") {
39978
+ const [separator, args] = intrinsic.args;
39979
+ if (Array.isArray(args)) return args.filter((el) => !isNoValue(el)).map(renderIntrinsics).join(separator);
39980
+ return JSON.stringify({ "Fn::Join": renderIntrinsics([separator, args]) });
39981
+ }
39982
+ return JSON.stringify({ [intrinsic.fn]: renderIntrinsics(intrinsic.args) });
39983
+ }
39984
+ if (typeof x === "object" && x !== null) {
39985
+ const ret = {};
39986
+ for (const [key, value] of Object.entries(x)) if (!isNoValue(value)) ret[key] = renderIntrinsics(value);
39987
+ return ret;
39988
+ }
39989
+ return x;
39990
+ }
39991
+ var Targets = class {
39992
+ values;
39993
+ not;
39994
+ constructor(statement, positiveKey, negativeKey) {
39995
+ if (negativeKey in statement) {
39996
+ this.values = forceListOfStrings(statement[negativeKey]);
39997
+ this.not = true;
39998
+ } else {
39999
+ this.values = forceListOfStrings(statement[positiveKey]);
40000
+ this.not = false;
40001
+ }
40002
+ this.values.sort();
40003
+ }
40004
+ get empty() {
40005
+ return this.values.length === 0;
40006
+ }
40007
+ equal(other) {
40008
+ return this.not === other.not && strictEqual(this.values.sort(), other.values.sort());
40009
+ }
40010
+ replaceEmpty(replacement) {
40011
+ if (this.empty) this.values.push(replacement);
40012
+ }
40013
+ replaceStar(replacement) {
40014
+ for (let i = 0; i < this.values.length; i++) if (this.values[i] === "*") this.values[i] = replacement;
40015
+ this.values.sort();
40016
+ }
40017
+ render() {
40018
+ return this.not ? this.values.map((s) => `NOT ${s}`).join("\n") : this.values.join("\n");
40019
+ }
40020
+ };
40021
+ function forceListOfStrings(x) {
40022
+ if (typeof x === "string") return [x];
40023
+ if (x === void 0 || x === null) return [];
40024
+ if (Array.isArray(x)) return x.map((e) => forceListOfStrings(e).join(","));
40025
+ if (typeof x === "object") {
40026
+ const ret = [];
40027
+ for (const [key, value] of Object.entries(x)) ret.push(...forceListOfStrings(value).map((s) => `${key}:${s}`));
40028
+ return ret;
40029
+ }
40030
+ return [`${x}`];
40031
+ }
40032
+ var Statement = class {
40033
+ sid;
40034
+ effect;
40035
+ resources;
40036
+ actions;
40037
+ principals;
40038
+ condition;
40039
+ serializedIntrinsic;
40040
+ constructor(statement) {
40041
+ if (typeof statement === "string") {
40042
+ this.sid = void 0;
40043
+ this.effect = "Unknown";
40044
+ this.resources = new Targets({}, "", "");
40045
+ this.actions = new Targets({}, "", "");
40046
+ this.principals = new Targets({}, "", "");
40047
+ this.condition = void 0;
40048
+ this.serializedIntrinsic = statement;
40049
+ } else {
40050
+ if (typeof statement !== "object" || statement === null) throw new Error("An IAM policy statement is neither an object nor a string");
40051
+ this.sid = typeof statement.Sid === "string" ? statement.Sid : void 0;
40052
+ this.effect = statement.Effect === "Allow" || statement.Effect === "Deny" ? statement.Effect : "Unknown";
40053
+ this.resources = new Targets(statement, "Resource", "NotResource");
40054
+ this.actions = new Targets(statement, "Action", "NotAction");
40055
+ this.principals = new Targets(statement, "Principal", "NotPrincipal");
40056
+ this.condition = statement.Condition;
40057
+ this.serializedIntrinsic = void 0;
40058
+ }
40059
+ }
40060
+ equal(other) {
40061
+ return this.sid === other.sid && this.effect === other.effect && this.serializedIntrinsic === other.serializedIntrinsic && this.resources.equal(other.resources) && this.actions.equal(other.actions) && this.principals.equal(other.principals) && strictEqual(this.condition, other.condition);
40062
+ }
40063
+ get isNegativeStatement() {
40064
+ const notTarget = this.actions.not || this.principals.not || this.resources.not;
40065
+ return this.effect === "Allow" ? notTarget : !notTarget;
40066
+ }
40067
+ render() {
40068
+ return this.serializedIntrinsic ? [
40069
+ this.serializedIntrinsic,
40070
+ "",
40071
+ "",
40072
+ this.principals.render(),
40073
+ ""
40074
+ ] : [
40075
+ this.resources.render(),
40076
+ this.effect,
40077
+ this.actions.render(),
40078
+ this.principals.render(),
40079
+ renderCondition(this.condition)
40080
+ ];
40081
+ }
40082
+ };
40083
+ function parseStatements(x) {
40084
+ if (x === void 0) x = [];
40085
+ if (!Array.isArray(x)) x = [x];
40086
+ return x.map((s) => new Statement(s));
40087
+ }
40088
+ function parseLambdaPermission(x) {
40089
+ const statement = {
40090
+ Effect: "Allow",
40091
+ Action: x.Action,
40092
+ Resource: x.FunctionName
40093
+ };
40094
+ if (x.Principal !== void 0) {
40095
+ if (x.Principal === "*") statement.Principal = "*";
40096
+ else if (/^\d{12}$/.test(x.Principal)) statement.Principal = { AWS: `arn:aws:iam::${x.Principal}:root` };
40097
+ else statement.Principal = { Service: x.Principal };
40098
+ }
40099
+ if (x.SourceArn !== void 0) {
40100
+ statement.Condition ??= {};
40101
+ statement.Condition.ArnLike = { "AWS:SourceArn": x.SourceArn };
40102
+ }
40103
+ if (x.SourceAccount !== void 0) {
40104
+ statement.Condition ??= {};
40105
+ statement.Condition.StringEquals = { "AWS:SourceAccount": x.SourceAccount };
40106
+ }
40107
+ if (x.EventSourceToken !== void 0) {
40108
+ statement.Condition ??= {};
40109
+ statement.Condition.StringEquals = { "lambda:EventSourceToken": x.EventSourceToken };
40110
+ }
40111
+ return new Statement(statement);
40112
+ }
40113
+ function renderCondition(condition) {
40114
+ if (!condition || Object.keys(condition).length === 0) return "";
40115
+ const lines = JSON.stringify(condition, void 0, 2).split("\n");
40116
+ return lines.slice(1, lines.length - 1).map((s) => s.slice(2)).join("\n");
40117
+ }
40118
+ function defaultPrincipal(principal, statements) {
40119
+ statements.forEach((s) => s.principals.replaceEmpty(principal));
40120
+ statements.forEach((s) => s.principals.replaceStar(principal));
40121
+ return statements;
40122
+ }
40123
+ function defaultResource(resource, statements) {
40124
+ statements.forEach((s) => s.resources.replaceEmpty(resource));
40125
+ statements.forEach((s) => s.resources.replaceStar(resource));
40126
+ return statements;
40127
+ }
40128
+ var ManagedPolicyAttachment = class {
40129
+ identityArn;
40130
+ managedPolicyArn;
40131
+ constructor(identityArn, managedPolicyArn) {
40132
+ this.identityArn = identityArn;
40133
+ this.managedPolicyArn = managedPolicyArn;
40134
+ }
40135
+ equal(other) {
40136
+ return this.identityArn === other.identityArn && this.managedPolicyArn === other.managedPolicyArn;
40137
+ }
40138
+ };
40139
+ var SsoElement = class {
40140
+ fields;
40141
+ constructor(fields) {
40142
+ this.fields = fields;
40143
+ }
40144
+ equal(other) {
40145
+ return strictEqual(this.fields, other.fields);
40146
+ }
40147
+ };
40148
+ var SecurityGroupRule = class {
40149
+ ipProtocol;
40150
+ fromPort;
40151
+ toPort;
40152
+ groupId;
40153
+ peer;
40154
+ constructor(rule, groupRef) {
40155
+ this.ipProtocol = rule.IpProtocol?.toString() || "*unknown*";
40156
+ this.fromPort = rule.FromPort;
40157
+ this.toPort = rule.ToPort;
40158
+ this.groupId = rule.GroupId || groupRef || "*unknown*";
40159
+ this.peer = findFirst(rule, ["CidrIp", "CidrIpv6"], (ip) => ({
40160
+ kind: "cidr-ip",
40161
+ ip
40162
+ })) || findFirst(rule, ["DestinationSecurityGroupId", "SourceSecurityGroupId"], (id) => ({
40163
+ kind: "security-group",
40164
+ securityGroupId: id
40165
+ })) || findFirst(rule, ["DestinationPrefixListId", "SourcePrefixListId"], (id) => ({
40166
+ kind: "prefix-list",
40167
+ prefixListId: id
40168
+ }));
40169
+ }
40170
+ equal(other) {
40171
+ return this.ipProtocol === other.ipProtocol && this.fromPort === other.fromPort && this.toPort === other.toPort && peerEqual(this.peer, other.peer);
40172
+ }
40173
+ describeProtocol() {
40174
+ if (this.ipProtocol === "-1") return "Everything";
40175
+ const ipProtocol = this.ipProtocol.toUpperCase();
40176
+ if (this.fromPort === -1) return `All ${ipProtocol}`;
40177
+ if (this.fromPort === this.toPort) return `${ipProtocol} ${this.fromPort}`;
40178
+ return `${ipProtocol} ${this.fromPort}-${this.toPort}`;
40179
+ }
40180
+ describePeer() {
40181
+ switch (this.peer?.kind) {
40182
+ case "cidr-ip":
40183
+ if (this.peer.ip === "0.0.0.0/0") return "Everyone (IPv4)";
40184
+ if (this.peer.ip === "::/0") return "Everyone (IPv6)";
40185
+ return `${this.peer.ip}`;
40186
+ case "prefix-list": return `${this.peer.prefixListId}`;
40187
+ case "security-group": return `${this.peer.securityGroupId}`;
40188
+ default: return "?";
40189
+ }
40190
+ }
40191
+ };
40192
+ function peerEqual(a, b) {
40193
+ if (a === void 0 || b === void 0) return a === b;
40194
+ if (a.kind === "cidr-ip" && b.kind === "cidr-ip") return a.ip === b.ip;
40195
+ if (a.kind === "security-group" && b.kind === "security-group") return a.securityGroupId === b.securityGroupId;
40196
+ if (a.kind === "prefix-list" && b.kind === "prefix-list") return a.prefixListId === b.prefixListId;
40197
+ return false;
40198
+ }
40199
+ function findFirst(obj, keys, fn) {
40200
+ for (const key of keys) try {
40201
+ if (key in obj) return fn(obj[key]);
40202
+ } catch {}
40203
+ }
40204
+ var DiffableCollection = class {
40205
+ additions = [];
40206
+ removals = [];
40207
+ oldElements = [];
40208
+ newElements = [];
40209
+ addOld(...elements) {
40210
+ this.oldElements.push(...elements);
40211
+ }
40212
+ addNew(...elements) {
40213
+ this.newElements.push(...elements);
40214
+ }
40215
+ calculateDiff() {
40216
+ const contains = (x, xs) => xs.some((y) => y.equal(x));
40217
+ this.additions.push(...this.newElements.filter((x) => !contains(x, this.oldElements)));
40218
+ this.removals.push(...this.oldElements.filter((x) => !contains(x, this.newElements)));
40219
+ }
40220
+ get hasChanges() {
40221
+ return this.additions.length + this.removals.length > 0;
40222
+ }
40223
+ get hasAdditions() {
40224
+ return this.additions.length > 0;
40225
+ }
40226
+ };
40227
+ function resourceDiffers(oldValue, newValue) {
40228
+ if (oldValue === void 0 || newValue === void 0) return true;
40229
+ if (oldValue.Type !== newValue.Type) return true;
40230
+ const keyDiffers = (a, b, skip) => [.../* @__PURE__ */ new Set([...Object.keys(a ?? {}), ...Object.keys(b ?? {})])].some((key) => {
40231
+ if (key === skip) return false;
40232
+ const x = a?.[key];
40233
+ const y = b?.[key];
40234
+ return !(x === void 0 && y === void 0) && !cfnEqual(x, y);
40235
+ });
40236
+ return keyDiffers(oldValue.Properties, newValue.Properties) || keyDiffers(oldValue, newValue, "Properties");
40237
+ }
40238
+ var SecurityChanges = class {
40239
+ statements = new DiffableCollection();
40240
+ managedPolicies = new DiffableCollection();
40241
+ ssoPermissionSets = new DiffableCollection();
40242
+ ssoAssignments = new DiffableCollection();
40243
+ ssoInstanceACAConfigs = new DiffableCollection();
40244
+ ingress = new DiffableCollection();
40245
+ egress = new DiffableCollection();
40246
+ constructor(oldTemplate, newTemplate) {
40247
+ normalize(oldTemplate);
40248
+ normalize(newTemplate);
40249
+ const oldResources = oldTemplate.Resources ?? {};
40250
+ const newResources = newTemplate.Resources ?? {};
40251
+ const changed = [];
40252
+ for (const id of /* @__PURE__ */ new Set([...Object.keys(oldResources), ...Object.keys(newResources)])) {
40253
+ const oldValue = Object.hasOwn(oldResources, id) ? oldResources[id] : void 0;
40254
+ const newValue = Object.hasOwn(newResources, id) ? newResources[id] : void 0;
40255
+ if (oldValue === void 0 && newValue === void 0) continue;
40256
+ if (resourceDiffers(oldValue, newValue)) changed.push([id, {
40257
+ oldValue,
40258
+ newValue
40259
+ }]);
40260
+ }
40261
+ for (const change of this.propertyChanges(changed)) this.readPropertyChange(change);
40262
+ for (const change of this.resourceChanges(changed)) this.readResourceChange(change);
40263
+ for (const collection of this.collections()) collection.calculateDiff();
40264
+ }
40265
+ collections() {
40266
+ return [
40267
+ this.statements,
40268
+ this.managedPolicies,
40269
+ this.ssoPermissionSets,
40270
+ this.ssoAssignments,
40271
+ this.ssoInstanceACAConfigs,
40272
+ this.ingress,
40273
+ this.egress
40274
+ ];
40275
+ }
40276
+ propertyChanges(changed) {
40277
+ const ret = [];
40278
+ for (const [logicalId, { oldValue, newValue }] of changed) {
40279
+ const oldType = oldValue?.Type;
40280
+ const newType = newValue?.Type;
40281
+ if (oldType !== void 0 && newType !== void 0 && oldType !== newType) continue;
40282
+ const resourceType = oldType ?? newType;
40283
+ if (!resourceType) continue;
40284
+ for (const [propertyName, scrutiny] of Object.entries(propertyScrutinies(resourceType))) ret.push({
40285
+ logicalId,
40286
+ resourceType,
40287
+ scrutiny,
40288
+ oldValue: oldValue?.Properties?.[propertyName],
40289
+ newValue: newValue?.Properties?.[propertyName]
40290
+ });
40291
+ }
40292
+ return ret;
40293
+ }
40294
+ resourceChanges(changed) {
40295
+ const ret = [];
40296
+ for (const [logicalId, { oldValue, newValue }] of changed) {
40297
+ const oldType = oldValue?.Type;
40298
+ const newType = newValue?.Type;
40299
+ const common = {
40300
+ logicalId,
40301
+ oldProperties: oldValue?.Properties,
40302
+ newProperties: newValue?.Properties
40303
+ };
40304
+ if (oldType !== void 0 && newType !== void 0 && oldType !== newType) {
40305
+ const oldScrutiny = resourceScrutiny(oldType);
40306
+ if (oldScrutiny) ret.push({
40307
+ ...common,
40308
+ newProperties: void 0,
40309
+ scrutiny: oldScrutiny
40310
+ });
40311
+ const newScrutiny = resourceScrutiny(newType);
40312
+ if (newScrutiny) ret.push({
40313
+ ...common,
40314
+ oldProperties: void 0,
40315
+ scrutiny: newScrutiny
40316
+ });
40317
+ continue;
40318
+ }
40319
+ const type = oldType ?? newType;
40320
+ const scrutiny = type ? resourceScrutiny(type) : void 0;
40321
+ if (scrutiny) ret.push({
40322
+ ...common,
40323
+ scrutiny
40324
+ });
40325
+ }
40326
+ return ret;
40327
+ }
40328
+ get permissionsBroadened() {
40329
+ return this.statements.additions.some((s) => !s.isNegativeStatement) || this.statements.removals.some((s) => s.isNegativeStatement) || this.managedPolicies.hasAdditions || this.ssoPermissionSets.hasAdditions || this.ssoAssignments.hasAdditions || this.ssoInstanceACAConfigs.hasAdditions || this.ingress.hasAdditions || this.egress.hasAdditions;
40330
+ }
40331
+ get iamHasChanges() {
40332
+ return this.statements.hasChanges || this.managedPolicies.hasChanges || this.ssoPermissionSets.hasChanges || this.ssoAssignments.hasChanges || this.ssoInstanceACAConfigs.hasChanges;
40333
+ }
40334
+ get securityGroupsHaveChanges() {
40335
+ return this.ingress.hasChanges || this.egress.hasChanges;
40336
+ }
40337
+ get permissionsAnyChanges() {
40338
+ return this.iamHasChanges || this.securityGroupsHaveChanges;
40339
+ }
40340
+ readPropertyChange(change) {
40341
+ switch (change.scrutiny) {
40342
+ case "InlineIdentityPolicies":
40343
+ this.statements.addOld(...readIdentityPolicies(change.oldValue, change.logicalId));
40344
+ this.statements.addNew(...readIdentityPolicies(change.newValue, change.logicalId));
40345
+ break;
40346
+ case "InlineResourcePolicy":
40347
+ if (change.resourceType === "AWS::SSO::PermissionSet") {
40348
+ this.statements.addOld(...readPermissionSetInlinePolicy(change.oldValue, change.logicalId));
40349
+ this.statements.addNew(...readPermissionSetInlinePolicy(change.newValue, change.logicalId));
40350
+ } else {
40351
+ this.statements.addOld(...readResourceStatements(change.oldValue, change.logicalId));
40352
+ this.statements.addNew(...readResourceStatements(change.newValue, change.logicalId));
40353
+ }
40354
+ break;
40355
+ case "ManagedPolicies":
40356
+ this.managedPolicies.addOld(...readManagedPolicies(change.oldValue, change.logicalId));
40357
+ this.managedPolicies.addNew(...readManagedPolicies(change.newValue, change.logicalId));
40358
+ break;
40359
+ case "IngressRules":
40360
+ this.ingress.addOld(...readInlineRules(change.oldValue, change.logicalId));
40361
+ this.ingress.addNew(...readInlineRules(change.newValue, change.logicalId));
40362
+ break;
40363
+ case "EgressRules":
40364
+ this.egress.addOld(...readInlineRules(change.oldValue, change.logicalId));
40365
+ this.egress.addNew(...readInlineRules(change.newValue, change.logicalId));
40366
+ }
40367
+ }
40368
+ readResourceChange(change) {
40369
+ const id = change.logicalId;
40370
+ switch (change.scrutiny) {
40371
+ case "IdentityPolicyResource":
40372
+ this.statements.addOld(...readIdentityPolicyResource(change.oldProperties));
40373
+ this.statements.addNew(...readIdentityPolicyResource(change.newProperties));
40374
+ break;
40375
+ case "ResourcePolicyResource":
40376
+ this.statements.addOld(...readResourcePolicyResource(change.oldProperties));
40377
+ this.statements.addNew(...readResourcePolicyResource(change.newProperties));
40378
+ break;
40379
+ case "LambdaPermission":
40380
+ this.statements.addOld(...readLambdaStatements(change.oldProperties));
40381
+ this.statements.addNew(...readLambdaStatements(change.newProperties));
40382
+ break;
40383
+ case "SsoPermissionSet":
40384
+ this.ssoPermissionSets.addOld(...readSso(change.oldProperties, id, permissionSetFields));
40385
+ this.ssoPermissionSets.addNew(...readSso(change.newProperties, id, permissionSetFields));
40386
+ break;
40387
+ case "SsoAssignmentResource":
40388
+ this.ssoAssignments.addOld(...readSso(change.oldProperties, id, assignmentFields));
40389
+ this.ssoAssignments.addNew(...readSso(change.newProperties, id, assignmentFields));
40390
+ break;
40391
+ case "SsoInstanceACAConfigResource":
40392
+ this.ssoInstanceACAConfigs.addOld(...readSso(change.oldProperties, id, acaConfigFields));
40393
+ this.ssoInstanceACAConfigs.addNew(...readSso(change.newProperties, id, acaConfigFields));
40394
+ break;
40395
+ case "IngressRuleResource":
40396
+ this.ingress.addOld(...readRuleResource(change.oldProperties));
40397
+ this.ingress.addNew(...readRuleResource(change.newProperties));
40398
+ break;
40399
+ case "EgressRuleResource":
40400
+ this.egress.addOld(...readRuleResource(change.oldProperties));
40401
+ this.egress.addNew(...readRuleResource(change.newProperties));
40402
+ }
40403
+ }
40404
+ };
40405
+ function readIdentityPolicies(policies, logicalId) {
40406
+ if (policies === void 0 || !Array.isArray(policies)) return [];
40407
+ const appliesToPrincipal = "AWS:${" + logicalId + "}";
40408
+ return policies.flatMap((policy) => {
40409
+ const unparsed = policy.PolicyDocument?.Statement ? policy.PolicyDocument.Statement : policy;
40410
+ return defaultPrincipal(appliesToPrincipal, parseStatements(renderIntrinsics(unparsed)));
40411
+ });
40412
+ }
40413
+ function readIdentityPolicyResource(properties) {
40414
+ if (properties === void 0) return [];
40415
+ properties = renderIntrinsics(properties);
40416
+ return (properties.Groups || []).concat(properties.Users || []).concat(properties.Roles || []).flatMap((principal) => defaultPrincipal("AWS:" + principal, parseStatements(properties.PolicyDocument.Statement)));
40417
+ }
40418
+ function readPermissionSetInlinePolicy(policy, logicalId) {
40419
+ if (policy === void 0) return [];
40420
+ const statements = parseStatements(renderIntrinsics(policy.Statement));
40421
+ defaultResource("${" + logicalId + ".Arn}", statements);
40422
+ defaultPrincipal("AWS:${" + logicalId + "}", statements);
40423
+ return statements;
40424
+ }
40425
+ function readResourceStatements(policy, logicalId) {
40426
+ if (policy === void 0) return [];
40427
+ return defaultResource("${" + logicalId + ".Arn}", parseStatements(renderIntrinsics(policy.Statement)));
40428
+ }
40429
+ function readResourcePolicyResource(properties) {
40430
+ if (properties === void 0) return [];
40431
+ properties = renderIntrinsics(properties);
40432
+ const policyKeys = Object.keys(properties).filter((key) => key.indexOf("Policy") > -1);
40433
+ const resourceKeys = Object.keys(properties).filter((key) => !policyKeys.includes(key) && !key.endsWith("Name"));
40434
+ let resources = resourceKeys.length === 1 ? properties[resourceKeys[0]] : ["???"];
40435
+ if (!Array.isArray(resources)) resources = [resources];
40436
+ return resources.flatMap((resource) => defaultResource(resource, parseStatements(properties[policyKeys[0]].Statement)));
40437
+ }
40438
+ function readManagedPolicies(policyArns, logicalId) {
40439
+ if (!policyArns) return [];
40440
+ const identity = "${" + logicalId + "}";
40441
+ const arns = renderIntrinsics(policyArns);
40442
+ return typeof arns === "string" ? [new ManagedPolicyAttachment(identity, arns)] : arns.map((arn) => new ManagedPolicyAttachment(identity, arn));
40443
+ }
40444
+ function readLambdaStatements(properties) {
40445
+ if (!properties) return [];
40446
+ return [parseLambdaPermission(renderIntrinsics(properties))];
40447
+ }
40448
+ function readInlineRules(rules, logicalId) {
40449
+ if (!rules || !Array.isArray(rules)) return [];
40450
+ const ref = "${" + logicalId + ".GroupId}";
40451
+ return rules.flatMap((rule) => {
40452
+ const rendered = renderIntrinsics(rule);
40453
+ return typeof rendered === "object" ? [new SecurityGroupRule(rendered, ref)] : [];
40454
+ });
40455
+ }
40456
+ function readRuleResource(resource) {
40457
+ if (!resource) return [];
40458
+ return [new SecurityGroupRule(renderIntrinsics(resource))];
40459
+ }
40460
+ const permissionSetFields = (p) => ({
40461
+ name: p.Name,
40462
+ ssoInstanceArn: p.InstanceArn,
40463
+ ssoCustomerManagedPolicyReferences: p.CustomerManagedPolicyReferences,
40464
+ ssoPermissionsBoundary: p.PermissionsBoundary
40465
+ });
40466
+ const assignmentFields = (p) => ({
40467
+ ssoInstanceArn: p.InstanceArn,
40468
+ permissionSetArn: p.PermissionSetArn,
40469
+ principalId: p.PrincipalId,
40470
+ principalType: p.PrincipalType,
40471
+ targetId: p.TargetId,
40472
+ targetType: p.TargetType
40473
+ });
40474
+ const acaConfigFields = (p) => ({
40475
+ ssoInstanceArn: p.InstanceArn,
40476
+ accessControlAttributes: p.AccessControlAttributes
40477
+ });
40478
+ function readSso(properties, logicalId, fields) {
40479
+ if (properties === void 0) return [];
40480
+ const values = Object.fromEntries(Object.entries({
40481
+ cfnLogicalId: "${" + logicalId + "}",
40482
+ ...fields(renderIntrinsics(properties))
40483
+ }).filter(([, v]) => v !== void 0));
40484
+ return [new SsoElement(values)];
40485
+ }
40486
+ function withHeader(color, header, rows, then = () => 0) {
40487
+ rows.sort((a, b) => {
40488
+ const keyA = sortKey(a, color);
40489
+ const keyB = sortKey(b, color);
40490
+ if (keyA < keyB) return -1;
40491
+ if (keyB < keyA) return 1;
40492
+ return then(a) - then(b);
40493
+ });
40494
+ return [header, ...rows];
40495
+ }
40496
+ function sortKey(row, color) {
40497
+ const open = !color ? "" : row[0] === "-" ? "\x1B[31m" : row[0] === "+" ? "\x1B[32m" : "";
40498
+ if (open === "" || row[1] === "") return row[1];
40499
+ const close = "\x1B[39m";
40500
+ return open + row[1].replace(/\r?\n/g, (m) => close + m + open) + close;
40501
+ }
40502
+ function summarizeStatements(changes, color) {
40503
+ return withHeader(color, [
40504
+ "",
40505
+ "Resource",
40506
+ "Effect",
40507
+ "Action",
40508
+ "Principal",
40509
+ "Condition"
40510
+ ], [...changes.statements.additions.map((s) => ["+", ...s.render()]), ...changes.statements.removals.map((s) => ["-", ...s.render()])]);
40511
+ }
40512
+ function summarizeManagedPolicies(changes, color) {
40513
+ return withHeader(color, [
40514
+ "",
40515
+ "Resource",
40516
+ "Managed Policy ARN"
40517
+ ], [...changes.managedPolicies.additions.map((a) => [
40518
+ "+",
40519
+ a.identityArn,
40520
+ a.managedPolicyArn
40521
+ ]), ...changes.managedPolicies.removals.map((a) => [
40522
+ "-",
40523
+ a.identityArn,
40524
+ a.managedPolicyArn
40525
+ ])]);
40526
+ }
40527
+ function ssoRows(collection, cells) {
40528
+ return [...collection.additions.map((e) => ["+", ...cells(e.fields)]), ...collection.removals.map((e) => ["-", ...cells(e.fields)])];
40529
+ }
40530
+ function formatManagedPolicyRef(s) {
40531
+ return `Name: ${s?.Name || ""}, Path: ${s?.Path || ""}`;
40532
+ }
40533
+ function summarizeSsoPermissionSets(changes, color) {
40534
+ const boundary = (pb) => {
40535
+ if (pb?.ManagedPolicyArn !== void 0) return `ManagedPolicyArn: ${pb?.ManagedPolicyArn || ""}`;
40536
+ if (pb?.CustomerManagedPolicyReference !== void 0) return `CustomerManagedPolicyReference: {\n ${formatManagedPolicyRef(pb?.CustomerManagedPolicyReference)}\n}`;
40537
+ return "";
40538
+ };
40539
+ return withHeader(color, [
40540
+ "",
40541
+ "Resource",
40542
+ "InstanceArn",
40543
+ "PermissionSet name",
40544
+ "PermissionsBoundary",
40545
+ "CustomerManagedPolicyReferences"
40546
+ ], ssoRows(changes.ssoPermissionSets, (f) => [
40547
+ f.cfnLogicalId || "",
40548
+ f.ssoInstanceArn || "",
40549
+ f.name || "",
40550
+ boundary(f.ssoPermissionsBoundary),
40551
+ f.ssoCustomerManagedPolicyReferences?.map(formatManagedPolicyRef).join("\n") || ""
40552
+ ]));
40553
+ }
40554
+ function summarizeSsoInstanceACAConfigs(changes, color) {
40555
+ const attribute = (aca) => `Key: ${aca?.Key}, Values: [${aca?.Value?.Source.join(", ")}]`;
40556
+ return withHeader(color, [
40557
+ "",
40558
+ "Resource",
40559
+ "InstanceArn",
40560
+ "AccessControlAttributes"
40561
+ ], ssoRows(changes.ssoInstanceACAConfigs, (f) => [
40562
+ f.cfnLogicalId || "",
40563
+ f.ssoInstanceArn || "",
40564
+ f.accessControlAttributes?.map(attribute).join("\n") || ""
40565
+ ]));
40566
+ }
40567
+ function summarizeSsoAssignments(changes, color) {
40568
+ return withHeader(color, [
40569
+ "",
40570
+ "Resource",
40571
+ "InstanceArn",
40572
+ "PermissionSetArn",
40573
+ "PrincipalId",
40574
+ "PrincipalType",
40575
+ "TargetId",
40576
+ "TargetType"
40577
+ ], ssoRows(changes.ssoAssignments, (f) => [
40578
+ f.cfnLogicalId || "",
40579
+ f.ssoInstanceArn || "",
40580
+ f.permissionSetArn || "",
40581
+ f.principalId || "",
40582
+ f.principalType || "",
40583
+ f.targetId || "",
40584
+ f.targetType || ""
40585
+ ]));
40586
+ }
40587
+ function summarizeSecurityGroups(changes, color) {
40588
+ const render = (sign, dir) => (rule) => [
40589
+ sign,
40590
+ `${rule.groupId}`,
40591
+ dir,
40592
+ rule.describeProtocol(),
40593
+ rule.describePeer()
40594
+ ];
40595
+ return withHeader(color, [
40596
+ "",
40597
+ "Group",
40598
+ "Dir",
40599
+ "Protocol",
40600
+ "Peer"
40601
+ ], [
40602
+ ...changes.ingress.additions.map(render("+", "In")),
40603
+ ...changes.egress.additions.map(render("+", "Out")),
40604
+ ...changes.ingress.removals.map(render("-", "In")),
40605
+ ...changes.egress.removals.map(render("-", "Out"))
40606
+ ], (row) => row[2].indexOf("In") > -1 ? 0 : 1);
40607
+ }
40608
+ function displayWidth(text) {
40609
+ let width = 0;
40610
+ for (const ch of text.replace(/(?:\p{Regional_Indicator}{2}|\p{Emoji_Presentation}|\p{Extended_Pictographic}\uFE0F)\p{Emoji_Modifier}?(?:\u200D(?:\p{Emoji_Presentation}|\p{Extended_Pictographic}\uFE0F?)\p{Emoji_Modifier}?)*/gu, " ")) {
40611
+ const code = ch.codePointAt(0);
40612
+ if (code <= 31 || code >= 127 && code <= 159) continue;
40613
+ if (code >= 768 && code <= 879) continue;
40614
+ width += isFullwidth(code) ? 2 : 1;
40615
+ }
40616
+ return width;
40617
+ }
40618
+ function isFullwidth(c) {
40619
+ return c >= 4352 && (c <= 4447 || c === 9001 || c === 9002 || c >= 11904 && c <= 12871 && c !== 12351 || c >= 12880 && c <= 19903 || c >= 19968 && c <= 42182 || c >= 43360 && c <= 43388 || c >= 44032 && c <= 55203 || c >= 63744 && c <= 64255 || c >= 65040 && c <= 65049 || c >= 65072 && c <= 65131 || c >= 65281 && c <= 65376 || c >= 65504 && c <= 65510 || c >= 110592 && c <= 110593 || c >= 127488 && c <= 127569 || c >= 131072 && c <= 262141);
40620
+ }
40621
+ function formatTable(cells, color) {
40622
+ const paint = (fn) => color ? fn : (text) => text;
40623
+ const lines = cells.map((row) => row.map((cell) => String(cell).split("\n")));
40624
+ const widths = cells[0].map((_, i) => Math.max(...lines.map((row) => Math.max(...row[i].map(displayWidth)))));
40625
+ const rule = (left, join, right) => paint(gray)(left + widths.map((w) => "─".repeat(w + 2)).join(join) + right);
40626
+ const bar = paint(gray)("│");
40627
+ const out = [rule("┌", "┬", "┐")];
40628
+ lines.forEach((row, r) => {
40629
+ if (r > 0 && (r === 1 || sortKey(cells[r - 1], color) !== sortKey(cells[r], color))) out.push(rule("├", "┼", "┤"));
40630
+ const sign = r === 0 ? "" : cells[r][0];
40631
+ const tint = paint(sign === "+" ? green : sign === "-" ? red : (text) => text);
40632
+ const height = Math.max(...row.map((cell) => cell.length));
40633
+ for (let l = 0; l < height; l++) {
40634
+ const cellsOut = row.map((cell, i) => {
40635
+ const text = cell[l] ?? "";
40636
+ return " " + (text === "" ? "" : tint(text)) + " ".repeat(widths[i] - displayWidth(text)) + " ";
40637
+ });
40638
+ out.push(bar + cellsOut.join(bar) + bar);
40639
+ }
40640
+ });
40641
+ out.push(rule("└", "┴", "┘"));
40642
+ return out.join("\n");
40643
+ }
40644
+ function formatSecurityChanges(changes, logicalToPath = {}, color = stdoutSupportsColor()) {
40645
+ if (!changes.permissionsAnyChanges) return "";
40646
+ const paint = (fn) => color ? fn : (text) => text;
40647
+ const substitute = (source) => source.replace(/\$\{([^.}]+)(.[^}]+)?\}/gi, (_m, logId, suffix) => {
40648
+ const path = Object.hasOwn(logicalToPath, logId) ? logicalToPath[logId] : void 0;
40649
+ return "${" + (path && normalizePath(path) || logId) + (suffix || "") + "}";
40650
+ });
40651
+ let out = "";
40652
+ const section = (title) => {
40653
+ out += `${paint(bold)(title)}\n`;
40654
+ };
40655
+ const table = (rows) => {
40656
+ out += formatTable(rows.map((row) => row.map(substitute)), color) + "\n";
40657
+ };
40658
+ if (changes.statements.hasChanges) {
40659
+ section("IAM Statement Changes");
40660
+ table(summarizeStatements(changes, color));
40661
+ }
40662
+ if (changes.managedPolicies.hasChanges) {
40663
+ section("IAM Policy Changes");
40664
+ table(summarizeManagedPolicies(changes, color));
40665
+ }
40666
+ if (changes.ssoPermissionSets.hasChanges || changes.ssoInstanceACAConfigs.hasChanges || changes.ssoAssignments.hasChanges) {
40667
+ section("IAM Identity Center Changes");
40668
+ if (changes.ssoPermissionSets.hasChanges) table(summarizeSsoPermissionSets(changes, color));
40669
+ if (changes.ssoInstanceACAConfigs.hasChanges) table(summarizeSsoInstanceACAConfigs(changes, color));
40670
+ if (changes.ssoAssignments.hasChanges) table(summarizeSsoAssignments(changes, color));
40671
+ }
40672
+ if (changes.securityGroupsHaveChanges) {
40673
+ section("Security Group Changes");
40674
+ table(summarizeSecurityGroups(changes, color));
40675
+ }
40676
+ out += `${paint(yellow)("(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299)")}\n`;
40677
+ out += "\n";
40678
+ return out;
40679
+ }
40680
+ function normalizePath(p) {
40681
+ if (p.startsWith("/")) p = p.slice(1);
40682
+ let parts = p.split("/");
40683
+ if (parts.length > 1) {
40684
+ parts = parts.slice(1);
40685
+ if (parts.length > 1) {
40686
+ const last = parts[parts.length - 1];
40687
+ if (last === "Resource" || last === "Default") parts = parts.slice(0, parts.length - 1);
40688
+ }
40689
+ p = parts.join("/");
40690
+ }
40691
+ return p;
40692
+ }
40693
+ function stdoutSupportsColor(env = process.env, argv = process.argv, isTTY = process.stdout.isTTY === true, platform = process.platform) {
40694
+ const terminator = argv.indexOf("--");
40695
+ const hasFlag = (flag) => {
40696
+ const position = argv.indexOf(`--${flag}`);
40697
+ return position !== -1 && (terminator === -1 || position < terminator);
40698
+ };
40699
+ let force;
40700
+ if ([
40701
+ "no-color",
40702
+ "no-colors",
40703
+ "color=false",
40704
+ "color=never"
40705
+ ].some(hasFlag)) force = 0;
40706
+ else if ([
40707
+ "color",
40708
+ "colors",
40709
+ "color=true",
40710
+ "color=always"
40711
+ ].some(hasFlag)) force = 1;
40712
+ const forceEnv = env["FORCE_COLOR"];
40713
+ if (forceEnv !== void 0) {
40714
+ if (forceEnv === "true") force = 1;
40715
+ else if (forceEnv === "false") force = 0;
40716
+ else force = forceEnv.length === 0 ? 1 : Math.min(parseInt(forceEnv, 10), 3);
40717
+ }
40718
+ if (force === 0) return false;
40719
+ if ([
40720
+ "color=16m",
40721
+ "color=full",
40722
+ "color=truecolor",
40723
+ "color=256"
40724
+ ].some(hasFlag)) return true;
40725
+ if (!isTTY && force === void 0) return false;
40726
+ const min = force || 0;
40727
+ if (env["TERM"] === "dumb") return min > 0;
40728
+ if (platform === "win32") return true;
40729
+ if ("CI" in env) return [
40730
+ "TRAVIS",
40731
+ "CIRCLECI",
40732
+ "APPVEYOR",
40733
+ "GITLAB_CI",
40734
+ "GITHUB_ACTIONS",
40735
+ "BUILDKITE"
40736
+ ].some((sign) => sign in env) || env["CI_NAME"] === "codeship" || min > 0;
40737
+ if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env["TEAMCITY_VERSION"] ?? "");
40738
+ if (env["COLORTERM"] === "truecolor") return true;
40739
+ if (env["TERM_PROGRAM"] === "iTerm.app" || env["TERM_PROGRAM"] === "Apple_Terminal") return true;
40740
+ const term = env["TERM"] ?? "";
40741
+ if (/-256(color)?$/i.test(term)) return true;
40742
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(term)) return true;
40743
+ if ("COLORTERM" in env) return true;
40744
+ return min > 0;
40745
+ }
40746
+
39637
40747
  //#endregion
39638
40748
  //#region src/analyzer/security-diff.ts
39639
40749
  function isSyntheticChange(pc) {
@@ -39709,21 +40819,6 @@ function securityDiffTemplates(changes, records) {
39709
40819
  maskedChanges
39710
40820
  };
39711
40821
  }
39712
- let cfnDiffModule;
39713
- function loadCfnDiff() {
39714
- cfnDiffModule ??= import("@aws-cdk/cloudformation-diff").then((mod) => mod.default ?? mod);
39715
- return cfnDiffModule;
39716
- }
39717
- let cfnDiffUtilModule;
39718
- function loadCfnDiffUtil() {
39719
- cfnDiffUtilModule ??= import("@aws-cdk/cloudformation-diff/lib/diff/util.js").then((mod) => mod.default ?? mod);
39720
- return cfnDiffUtilModule;
39721
- }
39722
- function isScrutinized(util, change) {
39723
- const model = util.loadResourceModel(change.resourceType);
39724
- const scrutinized = (value) => value !== void 0 && value !== "None";
39725
- return scrutinized(model?.scrutinizable) || scrutinized(model?.properties?.[change.path]?.scrutinizable);
39726
- }
39727
40822
  async function diffSecurity(args) {
39728
40823
  const templates = securityDiffTemplates(args.changes, args.records);
39729
40824
  const { oldTemplate, newTemplate } = templates;
@@ -39732,9 +40827,8 @@ async function diffSecurity(args) {
39732
40827
  rendered: ""
39733
40828
  };
39734
40829
  try {
39735
- const cfnDiff = await loadCfnDiff();
39736
- const unjudged = templates.maskedChanges.length === 0 ? [] : await loadCfnDiffUtil().then((util) => templates.maskedChanges.filter((c) => isScrutinized(util, c)));
39737
- const diff = cfnDiff.fullDiff(structuredClone(oldTemplate), structuredClone(newTemplate));
40830
+ const unjudged = templates.maskedChanges.filter((c) => isScrutinizedProperty(c.resourceType, c.path));
40831
+ const diff = new SecurityChanges(structuredClone(oldTemplate), structuredClone(newTemplate));
39738
40832
  const broadening = diff.permissionsBroadened || unjudged.length > 0;
39739
40833
  const unjudgedNote = unjudged.length === 0 ? "" : "These changed values are masked, so whether they broaden permissions could not be evaluated:\n" + unjudged.map((c) => ` ${c.logicalId} (${c.resourceType}): ${c.path}\n`).join("");
39740
40834
  if (!diff.permissionsBroadened && !diff.permissionsAnyChanges) return {
@@ -39744,12 +40838,8 @@ async function diffSecurity(args) {
39744
40838
  let table;
39745
40839
  try {
39746
40840
  const shown = args.secretMask === void 0 ? void 0 : withholdSecrets(templates, args.secretMask());
39747
- const shownDiff = shown === void 0 || shown.masked === 0 ? diff : cfnDiff.fullDiff(shown.templates.oldTemplate, shown.templates.newTemplate);
39748
- table = "";
39749
- cfnDiff.formatSecurityChanges({ write(chunk) {
39750
- table += String(chunk);
39751
- return true;
39752
- } }, shownDiff, logicalIdToPath(args.records, args.template));
40841
+ const shownDiff = shown === void 0 || shown.masked === 0 ? diff : new SecurityChanges(shown.templates.oldTemplate, shown.templates.newTemplate);
40842
+ table = formatSecurityChanges(shownDiff, logicalIdToPath(args.records, args.template));
39753
40843
  if (shown !== void 0 && shown.masked > 0) table += "(Values that hold a secret are shown as ***.)\n";
39754
40844
  } catch {
39755
40845
  table = "The security changes are not shown: they could not be checked for secrets.\n";
@@ -40246,9 +41336,11 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
40246
41336
  const createOnlyEvidence = acceptedCreateOnlyDropsOf(currentResource);
40247
41337
  const recordedAsWritten = currentResource.provisionedBy === "cc-api" ? currentProps : withoutUnwrittenSilentDropProperties(resourceType, currentProps, desiredForSkipCheck, allowedForRecord, createOnlyEvidence);
40248
41338
  const unmarkedRecord = noEchoLeavesOf(currentResource) === void 0;
40249
- const todayAsWritten = unmarkedRecord ? redactSecretsForState(markSameGenerationBag({ ...resolvedProps }), withoutNoEchoParameterEntries(updateSecrets), desiredProps) : void 0;
41339
+ const todayAsWritten = unmarkedRecord || witnessNormalize(recordedAsWritten, void 0, desiredForSkipCheckAsWritten).differing.length > 0 ? redactSecretsForState(markSameGenerationBag({ ...resolvedProps }), withoutNoEchoParameterEntries(updateSecrets), desiredProps) : void 0;
40250
41340
  const witness = todayAsWritten === void 0 ? void 0 : witnessNormalize(recordedAsWritten, todayAsWritten, desiredForSkipCheckAsWritten);
40251
41341
  const currentPropsAsWritten = witness === void 0 ? recordedAsWritten : witness.current;
41342
+ const witnessMigrates = unmarkedRecord || (witness?.confirmed.length ?? 0) > 0;
41343
+ if (!unmarkedRecord && witness !== void 0 && witness.confirmed.length > 0) this.witnessConfirmedLeaves.set(logicalId, witness.confirmed.map((coordinate) => [...coordinate]));
40252
41344
  for (const coordinate of witness?.differing ?? []) {
40253
41345
  const desiredAt = valueAtCoordinate(desiredForSkipCheckAsWritten, coordinate);
40254
41346
  recordPreviousNoEchoLeaves(this.secretNameBagFor(logicalId), valueAtCoordinate(recordedAsWritten, coordinate), scalarLeavesOf(desiredAt), updateSecrets, desiredAt !== "***");
@@ -40305,7 +41397,8 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
40305
41397
  this.logger.warn(cause === "parameter" ? safeMsg`${logicalId}.${key} is a create-only property, and a NoEcho parameter's value changed since the last deploy: ${logicalId} is replaced.` : safeMsg`${logicalId}.${key} is a create-only property, and the value at its NoEcho position changed since the last deploy: ${logicalId} is replaced.`);
40306
41398
  };
40307
41399
  const suppliesFreshMaskOnlyValue = pendingParameterLeaves.size > 0 || Object.keys(resolvedProps).some((key) => otherFreshAt(key).length > 0);
40308
- const recordMatchesDesired = movedMasked.size === 0 && keyOrderFreeJson(desiredForSkipCheckAsWritten) === keyOrderFreeJson(currentPropsAsWritten);
41400
+ const rewrittenPaths = readsProducerReplacedThisRun.call(this, template, logicalId, stateResources) ? redactionRewrittenPaths(resolvedProps, desiredForSkipCheck, comparisonCoordinates) : /* @__PURE__ */ new Set();
41401
+ const recordMatchesDesired = movedMasked.size === 0 && rewrittenPaths.size === 0 && keyOrderFreeJson(desiredForSkipCheckAsWritten) === keyOrderFreeJson(currentPropsAsWritten);
40309
41402
  const applyAttributeOnlyUpdate = (attributeChanges) => {
40310
41403
  const attrSummary = attributeChanges.map((a) => `${a.attribute}: ${a.oldValue ?? "(unset)"} → ${a.newValue ?? "(unset)"}`).join(", ");
40311
41404
  this.logger.info(safeMsg` ↻ ${logicalId} (${resourceType}) attribute update: ${attrSummary}`);
@@ -40321,7 +41414,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
40321
41414
  };
40322
41415
  const schemaCreateOnly = pendingParameterLeaves.size === 0 && parameterCoordinates.length === 0 ? [] : await getCreateOnlyPropertyPaths(resourceType).catch(() => []);
40323
41416
  const echoCandidates = echoFidelityCandidates(parameterCoordinates, resolvedProps, schemaCreateOnly);
40324
- const readbackRecord = unmarkedRecord && parameterCoordinates.length > 0 ? {
41417
+ const readbackRecord = witnessMigrates && parameterCoordinates.length > 0 ? {
40325
41418
  ...currentResource,
40326
41419
  properties: maskAtCoordinates(currentResource.properties, parameterCoordinates)
40327
41420
  } : currentResource;
@@ -40378,7 +41471,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
40378
41471
  };
40379
41472
  const lateReplacementDeclined = /* @__PURE__ */ new Set();
40380
41473
  const differsWhy = (key) => !lateReplacementDeclined.has(key) ? "differs; the provider is not known to report this property exactly, so the difference may be its normalization" : lateCrossPrefixRefused ? "differs; the replacement was refused: see the state-prefix warning above" : `differs; the replacement was not approved (--require-approval=${this.options.requireApproval ?? "never"})`;
40381
- if (unmarkedRecord && !typeChanged && echoCandidates.length > 0 && hasAddressablePhysicalId(currentResource)) await readOnce();
41474
+ if (witnessMigrates && !typeChanged && echoCandidates.length > 0 && hasAddressablePhysicalId(currentResource)) await readOnce();
40382
41475
  if (!typeChanged && !suppliesFreshMaskOnlyValue && lostChild === void 0 && this.recreateDirectionFor(stackName, logicalId) === void 0 && recordMatchesDesired) {
40383
41476
  if (change.attributeChanges && change.attributeChanges.length > 0) {
40384
41477
  applyAttributeOnlyUpdate(change.attributeChanges);
@@ -40409,7 +41502,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
40409
41502
  lowered.push(pc);
40410
41503
  continue;
40411
41504
  }
40412
- const moved = movedMasked.has(pc.path) || keyOrderFreeJson(desiredForSkipCheckAsWritten[pc.path]) !== keyOrderFreeJson(currentPropsAsWritten[pc.path]);
41505
+ const moved = movedMasked.has(pc.path) || rewrittenPaths.has(pc.path) || keyOrderFreeJson(desiredForSkipCheckAsWritten[pc.path]) !== keyOrderFreeJson(currentPropsAsWritten[pc.path]);
40413
41506
  const conditionalVerdict = moved && !typeChanged && isReplacementCeiling(pc) ? this.diffCalculator.conditionalReplacementVerdict?.(resourceType, pc.path, currentPropsAsWritten[pc.path], desiredForSkipCheckAsWritten[pc.path]) : void 0;
40414
41507
  if (moved && conditionalVerdict !== false) {
40415
41508
  warnWitnessReplacement(pc.path);
@@ -40463,7 +41556,7 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
40463
41556
  return liveHoldsFreshLeaves(read.live[key], pendingParameterLeaves.get(key) ?? []) ? "held" : "differs";
40464
41557
  };
40465
41558
  const lowered = [];
40466
- const movedAt = (path) => movedMasked.has(path) || keyOrderFreeJson(desiredForSkipCheckAsWritten[path]) !== keyOrderFreeJson(currentPropsAsWritten[path]);
41559
+ const movedAt = (path) => movedMasked.has(path) || rewrittenPaths.has(path) || keyOrderFreeJson(desiredForSkipCheckAsWritten[path]) !== keyOrderFreeJson(currentPropsAsWritten[path]);
40467
41560
  replacedAnyway = this.recreateDirectionFor(stackName, logicalId) !== void 0 || lostWithParent !== void 0 || (change.propertyChanges ?? []).some((other) => other.requiresReplacement && (!parameterCreateOnlyPaths.has(other.path) || movedAt(other.path)));
40468
41561
  for (const pc of change.propertyChanges ?? []) {
40469
41562
  if (!parameterCreateOnlyPaths.has(pc.path)) {
@@ -40613,11 +41706,16 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
40613
41706
  diffSawTokenChange: diffMovedServiceToken(change)
40614
41707
  });
40615
41708
  if (serviceTokenRefusal !== void 0) throw markRefusedBeforeApplying(markNonRetryable(new CdkdError(renderServiceTokenRefusal([serviceTokenRefusal], stackName, createSecretMasker(updateSecrets)), SERVICE_TOKEN_CHANGE_REFUSED)));
41709
+ let previousForProvider = currentPropsAsWritten;
41710
+ for (const coordinate of witness?.confirmed ?? []) {
41711
+ const value = valueAtCoordinate(resolvedProps, coordinate);
41712
+ if (value !== void 0) previousForProvider = setAtCoordinate(previousForProvider, coordinate, value);
41713
+ }
40616
41714
  return markRestored(await this.updateInPlace({
40617
41715
  conditions,
40618
41716
  counts,
40619
41717
  currentProps,
40620
- currentPropsAsWritten,
41718
+ currentPropsAsWritten: previousForProvider,
40621
41719
  currentResource,
40622
41720
  dependencies,
40623
41721
  desiredForSkipCheckAsWritten,
@@ -40669,6 +41767,18 @@ function recordHoldsEmbeddedReference(record) {
40669
41767
  };
40670
41768
  return walk(record.properties) || walk(record.attributes);
40671
41769
  }
41770
+ function redactionRewrittenPaths(resolvedProps, desiredForSkipCheck, comparisonCoordinates) {
41771
+ const masked = maskAtCoordinates({ ...resolvedProps }, comparisonCoordinates);
41772
+ return new Set(Object.keys(masked).filter((key) => keyOrderFreeJson(masked[key]) !== keyOrderFreeJson(desiredForSkipCheck[key])));
41773
+ }
41774
+ function readsProducerReplacedThisRun(template, logicalId, stateResources) {
41775
+ return (this.extractAllDependencies(template, logicalId) ?? []).some((id) => {
41776
+ const loaded = Object.hasOwn(this.healBaseline, id) ? this.healBaseline[id] : void 0;
41777
+ if (loaded === void 0) return false;
41778
+ const now = Object.hasOwn(stateResources, id) ? stateResources[id] : void 0;
41779
+ return now !== void 0 && now.physicalId !== loaded.physicalId;
41780
+ });
41781
+ }
40672
41782
 
40673
41783
  //#endregion
40674
41784
  //#region src/deployment/deploy-engine/update-replace.ts
@@ -43426,6 +44536,7 @@ function promoteRecreateTargets(changes, recreateTargets, stackName) {
43426
44536
 
43427
44537
  //#endregion
43428
44538
  //#region src/deployment/deploy-engine/deploy-flow.ts
44539
+ const TAIL_WARM_CONNECTIONS = 3;
43429
44540
  async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
43430
44541
  const startTime = Date.now();
43431
44542
  this.logger.debug(`Starting deployment for stack: ${stackName}`);
@@ -43447,6 +44558,7 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
43447
44558
  throw error;
43448
44559
  }
43449
44560
  let firstDeployStateGate;
44561
+ let exportsPrefetch;
43450
44562
  let firstDeploy = false;
43451
44563
  let failed = false;
43452
44564
  try {
@@ -43464,6 +44576,7 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
43464
44576
  };
43465
44577
  const currentEtag = currentStateData?.etag;
43466
44578
  this.healBaseline = currentState.resources ?? {};
44579
+ this.runProducerRegionEvidence = () => this.producerRegionEvidence(currentState);
43467
44580
  refuseMalformedOutputs(currentState, stackName, this.stackRegion, this.options.refusalRecovery);
43468
44581
  refuseMalformedResourcesForDeploy(currentState, stackName, this.stackRegion, this.options.refusalRecovery);
43469
44582
  refuseMalformedResourceEntriesForDeploy(currentState, stackName, this.stackRegion, this.options.refusalRecovery);
@@ -43480,8 +44593,17 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
43480
44593
  gate.catch(() => void 0);
43481
44594
  } else await gate;
43482
44595
  }
44596
+ const gate = firstDeployStateGate;
44597
+ const afterGate = (start) => (gate === void 0 ? Promise.resolve() : gate).then(start, () => void 0).catch(() => void 0);
44598
+ if (!this.options.dryRun) {
44599
+ prefetchCreateTokenLedger();
44600
+ const exportIndexStore = this.exportIndexStore;
44601
+ if (exportIndexStore && importableOutputKeys(currentState).length === 0) exportsPrefetch = afterGate(() => exportIndexStore.prefetch());
44602
+ }
44603
+ this.absentJournalVersionPurge = void 0;
43483
44604
  try {
43484
44605
  const loaded = await this.stateBackend.loadRollbackJournal(stackName, this.stackRegion);
44606
+ if (loaded === null && !this.options.parentStackInfo && !this.options.dryRun) this.absentJournalVersionPurge = afterGate(() => this.stateBackend.purgeRollbackJournalVersions(stackName, this.stackRegion));
43485
44607
  const journal = loaded && {
43486
44608
  ...loaded,
43487
44609
  segments: loaded.segments.filter((s) => s.reason !== "nested-pending-parent")
@@ -43774,6 +44896,9 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
43774
44896
  total: createChanges.length + updateChanges.length + deleteChanges.length
43775
44897
  };
43776
44898
  const { state: newState, actualCounts, completedOperations } = await withProducerRegions(() => this.producerRegionEvidence(currentState), () => this.executeDeployment(effectiveTemplate, currentState, changes, dag, executionLevels, stackName, outputsDigestSource, parameterValues, conditions, currentEtag, progress, migrationPending));
44899
+ try {
44900
+ this.stateBackend.warmConnections(stackName, this.stackRegion, TAIL_WARM_CONNECTIONS);
44901
+ } catch {}
43777
44902
  await this.drainObservedCaptures(newState.resources);
43778
44903
  const [newEtag] = await Promise.all([this.stateBackend.saveState(stackName, this.stackRegion, this.withParentInfo(conditionVerdicts ? {
43779
44904
  ...newState,
@@ -43828,6 +44953,7 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
43828
44953
  await flushKeptForReadoption(this);
43829
44954
  await this.generatedNameGuard?.settle();
43830
44955
  } catch {}
44956
+ await Promise.all([this.absentJournalVersionPurge, exportsPrefetch]);
43831
44957
  if (firstDeploy && failed && this.options.onFirstDeployLeftNoRecord && !this.options.dryRun) try {
43832
44958
  const left = await this.stateBackend.getState(stackName, this.stackRegion);
43833
44959
  const journal = left === null ? await this.stateBackend.loadRollbackJournal(stackName, this.stackRegion) : void 0;
@@ -44050,6 +45176,7 @@ var DeployEngine = class {
44050
45176
  interrupted = false;
44051
45177
  interruptCause = null;
44052
45178
  observedCaptureTasks = /* @__PURE__ */ new Map();
45179
+ absentJournalVersionPurge;
44053
45180
  noEchoCeilingReadbackTimeoutMs = 3e4;
44054
45181
  recapturedBaselines = /* @__PURE__ */ new WeakMap();
44055
45182
  stateBackend;
@@ -44075,6 +45202,7 @@ var DeployEngine = class {
44075
45202
  secretNameNeedles = /* @__PURE__ */ new Map();
44076
45203
  perResourceTemplateProps = /* @__PURE__ */ new Map();
44077
45204
  perResourceResolvedType = /* @__PURE__ */ new Map();
45205
+ witnessConfirmedLeaves = /* @__PURE__ */ new Map();
44078
45206
  fingerprintNoEchoValues = void 0;
44079
45207
  preDeploySecretNamedRecords = void 0;
44080
45208
  fingerprintParameters = void 0;
@@ -44098,6 +45226,7 @@ var DeployEngine = class {
44098
45226
  updateWasReplaced = /* @__PURE__ */ new Map();
44099
45227
  oldDeletedBeforeCreate = /* @__PURE__ */ new Set();
44100
45228
  healBaseline = {};
45229
+ runProducerRegionEvidence = void 0;
44101
45230
  deployChanges = /* @__PURE__ */ new Map();
44102
45231
  deployStateResources = {};
44103
45232
  stackRecordsView = void 0;
@@ -44145,6 +45274,7 @@ var DeployEngine = class {
44145
45274
  this.perResourceTemplateProps = /* @__PURE__ */ new Map();
44146
45275
  this.constructPathTemplate = void 0;
44147
45276
  this.perResourceResolvedType = /* @__PURE__ */ new Map();
45277
+ this.witnessConfirmedLeaves = /* @__PURE__ */ new Map();
44148
45278
  this.fingerprintNoEchoValues = void 0;
44149
45279
  this.preDeploySecretNamedRecords = void 0;
44150
45280
  this.fingerprintParameters = void 0;
@@ -44165,6 +45295,7 @@ var DeployEngine = class {
44165
45295
  this.updateWasReplaced = /* @__PURE__ */ new Map();
44166
45296
  this.oldDeletedBeforeCreate = /* @__PURE__ */ new Set();
44167
45297
  this.healBaseline = {};
45298
+ this.runProducerRegionEvidence = void 0;
44168
45299
  this.deployChanges = /* @__PURE__ */ new Map();
44169
45300
  this.deployStateResources = {};
44170
45301
  this.inlinePolicyWriters = /* @__PURE__ */ new Map();
@@ -44383,5 +45514,5 @@ DeployEngine.prototype.replacementNameOrigin = replacementNameOrigin;
44383
45514
  DeployEngine.prototype.orphanedNameCollisionAdvice = orphanedNameCollisionAdvice;
44384
45515
 
44385
45516
  //#endregion
44386
- export { isTruthyCfnBoolean as $, isStatefulRecreateTargetForReplace as $a, CFN_TEMPLATE_URL_LIMIT as $c, malformedOrphansRefusalMessage as $i, ledgerForStack as $n, markSameGenerationBag as $o, assertSendableRoleArn as $r, stringifyValue as $s, seedsDeleteFirstGuard as $t, noEchoComparisonForTemplate as A, refuseMalformedResourcesForDeploy as Aa, runDockerForeground as Ac, declaresNoEcho as Ai, journaledOrphanPrintingBag as An, maskWholeValue as Ao, deleteIndeterminateGuards as Ar, S3StateBackend as As, dropFailedHint as At, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as B, unpreviewableOrphanRecords as Ba, getLegacyStateBucketName as Bc, hasReadableOutputs as Bi, PRE_DELETE_SNAPSHOT_TYPES as Bn, carryLogOnlyValues as Bo, reDisableInstanceApiTermination as Br, describeRegionValueKind as Bs, getStackRecords as Bt, recordRetainedForReadoption as C, refuseMalformedResourceEntriesForImport as Ca, formatDockerLoginError as Cc, cfnRefValueFromPhysicalId as Ci, resolveBucketRegion as Cl, collectDeclaredOutputNames as Cn, sameLambdaFunctionAddress as Co, applyCustomResourceResponseExpiration as Cr, STATE_SOURCED_CROSS_GENERATION_RULES as Cs, revertNestedChildFromJournal as Ct, withResourceDeadline as D, refuseMalformedResourcePropertiesForDrift as Da, partitionSensitiveEnv as Dc, withSharedDrainBudget as Di, DEFAULT_RESOURCE_TIMEOUT_MS as Dn, isMarkedCoordinate as Do, unchangedBehindSecretReference as Dr, isSingleDynamicReferenceToken as Ds, getCurrentNestedStackContext as Dt, serviceTokenBlockingReason as E, refuseMalformedResourcePropertiesForDestroy as Ea, isMalformedEnvKey as Ec, parseWebACLArn as Ei, bindingSkippedOutputs as En, canonicalCoordinates as Eo, slowCcOperationTimeoutMs as Er, WHOLE_DYNAMIC_REFERENCE_PATTERN as Es, collectNestedChildUnaddressed as Et, PROTECTION_PROPERTY_BY_TYPE as F, repairMalformedOrphansForReadOnly as Fa, AssetManifestLoader as Fc, UNREADABLE_RESOURCES_MAP_ROW as Fi, secretNamedRecordNeedles as Fn, passedNoEchoParametersOf as Fo, markWaitAbandoned as Fr, crossPrefixDeniedWarning as Fs, sameJournaledOrphans as Ft, resolveDynamoDbDeleteBudgetMs as G, findSilentDropProperties as Ga, resolveSkipPrefix as Gc, malformedExportNamesWarning as Gi, isFinalSnapshotError as Gn, printingCorpusOf as Go, poisonRenderedSpellingsCollidingIn as Gr, importableOutputKeys as Gs, isJournaledOrphan as Gt, compensateRemovedDeletionProtection as H, unreadableResourceEntries as Ha, resolveApp as Hc, isReadableOrphanRecord as Hi, ccRoutedFinalSnapshotError as Hn, hasMaskableValues as Ho, DiffCalculator as Hr, hasReadableExportSet as Hs, removeProtectionTypeList as Ht, isProtectionValueActive as I, repairMalformedOutputsForReadOnly as Ia, getDockerImageBySourceHash as Ic, accountArgs as Ii, stateSecretNameNeedles as In, readbackPathFor as Io, disableInstanceApiTermination as Ir, isAccessDenied$1 as Is, replayFailedOperations as It, deleteTableWithIndexBusyRetry as J, NO_CC_HANDLERS_REASON as Ja, resolveUseCdkBootstrapAssets as Jc, malformedLocalResourceEntriesWarning as Ji, maskingRetryLogger as Jn, shareLogOnlyValues as Jo, regionLessSecretName as Jr, orphansAfterRollback as Js, planRollback as Jt, DELETE_INDEX_WAIT_PROCEED_NOTE as K, unwrittenCreateOnlyReplacement as Ka, resolveStateBucketWithDefault as Kc, malformedExportSourceWarning as Ki, refusesFinalSnapshot as Kn, recordLogOnlyParameterValue as Ko, classifyReplaySecretRegion as Kr, importableOutputs as Ks, isReplacementOrphan as Kt, perType as L, repairMalformedResourceEntriesForReadOnly as La, Synthesizer as Lc, deployRefusesOrphanRowsReason as Li, storedSecretNameNeedles as Ln, readsNoEchoSource as Lo, ec2InstanceProtectionSite as Lr, isNotImplemented as Ls, replayRollback as Lt, noEchoParameterNamesOf as M, refuseMalformedResourcesForExport as Ma, warnFinchArgvExposure as Mc, STATE_REGION_DIVERGED as Mi, orphanRecordsPrintingBag as Mn, noEchoCoordinatesOf as Mo, deleteSkipReason as Mr, CrossPrefixReadError as Ms, journaledOrphanLines as Mt, recordedProtectionEvidence as N, refuseMalformedState as Na, escapeRegExp$3 as Nc, STATE_RESOURCES_MALFORMED as Ni, secretNamePrintingBag as Nn, noEchoLeavesOf as No, withIndeterminateGuard as Nr, CrossPrefixScanCache as Ns, loadJournaledOrphans as Nt, diffSecurity as O, refuseMalformedResourcePropertiesForExport as Oa, redactDockerArgvValues as Oc, parameterInputsFor as Oi, DEFAULT_RESOURCE_WARN_AFTER_MS as On, maskAtCoordinates as Oo, RollbackInlinePolicyWriters as Or, LockManager as Os, withNestedStackContext as Ot, recordedProtectionNote as P, repairMalformedOrphanRecordsForReadOnly as Pa, stripControlChars as Pc, UNREADABLE_ORPHANS_CONTAINER_ROW as Pi, secretNamePrintingBags as Pn, noEchoOutputsComparison as Po, isWaitAbandonedError as Pr, applyCrossPrefixScan as Ps, makeForeignHolderScan as Pt, hasCdkAutoDeleteTag as Q, MULTI_REGION_RECREATE_BLOCKED_TYPES as Qa, CFN_TEMPLATE_BODY_LIMIT as Qc, malformedOrphanRowsKeptWarning as Qi, earliestDefined as Qn, maskSecretsInText as Qo, assertFlagRoleArn as Qr, isSensitiveAttributeName as Qs, resolveReplacementOldType as Qt, readProtection as R, repairMalformedResourcePropertiesForReadOnly as Ra, synthesisStatusMessage as Rc, displayLogicalId as Ri, extractDeploymentEventError as Rn, valueAtCoordinate as Ro, isTerminationProtectionPropagationError as Rr, splitImportedOps as Rs, awaitInFlightSibling as Rt, keptForReadoption as S, refuseMalformedResourceEntriesForDestroy as Sa, finchSecretArgvRefusal as Sc, AWS_NO_VALUE as Si, clearBucketRegionCache as Sl, noEchoParameterValueSeed as Sn, lambdaFunctionNameForMask as So, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as Sr, STATE_SOURCED_BASELINE_RULES as Ss, recordDisplacedSkips as St, findServiceTokenRefusals as T, refuseMalformedResourceEntriesForOrphan as Ta, isDockerClientEnvKey as Tc, refStateLookupFromResource as Ti, isExportAliasCollision as Tn, TemplateParser as To, CloudControlProvider as Tr, TEMPLATE_SOURCED_RULES as Ts, withNestedRevertRun as Tt, deleteBudgetKey as U, withheldAccountClause as Ua, resolveAutoAssetStorage as Uc, isReadableResourceEntry as Ui, createPreDeleteFinalSnapshot as Un, literalSplitDelimitersOf as Uo, INTRINSIC_KEYS as Ur, hasReasonlessBaselineRefusal as Us, recordAfterRollbackUpdate as Ut, beginDeleteWait as V, unreadableOrphanRecords as Va, loadCdkJson as Vc, hasReadableResources as Vi, buildFinalSnapshotIdentifier as Vn, createUnionSecretMasker as Vo, reEnableInstanceApiTermination as Vr, exportNamesCarriedFrom as Vs, withStackRecords as Vt, resolveDynamoDbDeleteBudgetClock as W, findActionableSilentDrops as Wa, resolveCaptureObservedState as Wc, malformedDriftResourcePropertiesWarning as Wi, effectiveDeletionPolicy as Wn, logOnlyValueCount as Wo, IntrinsicFunctionResolver as Wr, hasUnverifiableParameterRefusal as Ws, demoteSupersededOrphans as Wt, ECR_AUTO_DELETE_IMAGES_TAG as X, findReplacedReadersOfRecreateTargets as Xa, warnDeprecatedNoPrefixCliFlag as Xc, malformedOrphanRecordsRefusalMessage as Xi, findDestructiveChanges as Xn, errorCauseChain as Xo, refuseUnreadableCdkCrossAccountRefs as Xr, shouldRetainResource as Xs, recordUnderIdIsNotOwn as Xt, waitForIndexesSettled as Y, hasNoCloudControlHandlers as Ya, stateBucketExistenceConfirmed as Yc, malformedLocalResourcesWarning as Yi, constructPathOf as Yn, createSecretMasker as Yo, producerLookupOver as Yr, orphansCarriedFrom as Ys, recheckFailedPlan as Yt, S3_AUTO_DELETE_OBJECTS_TAG as Z, shownType as Za, ssmResolvedValueType as Zc, malformedOrphanRecordsWarning as Zi, formatDestructiveChange as Zn, maskSecretsInError as Zo, applyRoleArnIfSet as Zr, AssetPublisher as Zs, replacementNeverSwapped as Zt, makeCanonicalizePropertiesFn as _, refuseMalformedOutputs as _a, resolveDockerContextDirectory as _c, isImpossibleEmptyStoredAttribute as _i, absoluteAssemblyPathEscape as _l, secretSafeKeyDisplay as _n, prefetchCreateOnlyPropertyPaths as _o, TemplateNoEchoReresolver as _r, recordMaskOnlyValuesIn as _s, displacedOpClause as _t, findNestedTemplateTreeDefect as a, malformedResourcePropertiesWarning as aa, AssetModeResolver as ac, callerEnvCredentials as ai, expectedOwnerParam as al, isRedactedRecordedValue as an, toCfnInteger as ao, planTagDiff as ar, DYNAMIC_REFERENCE_TOKEN_SCAN as as, cyan as at, lookupEachName as b, refuseMalformedResourceEntries as ba, describeDockerFailure as bc, isNamelessDynamicReferenceError as bi, renderAssemblyPathEscape as bl, exportNameSecretExposure as bn, withRetry as bo, getCurrentResourceSecrets as br, recordProvenPublicExpression as bs, getNestedRevertRun as bt, renderNestedTemplateTreeDefect as c, malformedStateRefusalMessage as ca, ensureAssetStorage as cc, s3BucketArn as ci, derivePartitionAndUrlSuffix as cl, updatePartialMessage as cn, coerceCfnInteger as co, tagMapAsList as cr, pathCrossesDottedKey as cs, red as ct, conditionInputsFrom as d, refuseMalformedNestedChildOutputs as da, parseBootstrapMarker as dc, s3BucketRegionalDomainName as di, processStackMessages as dl, DeploymentEventsStore as dn, configStringRefusal as do, stringifyIfAssigned as dr, recordNestedStackParameterExpressions as ds, namesAnyDeclaredParameter as dt, malformedOrphansWarning as ea, WorkGraph as ec, explicitRoleArnOrThrow as ei, MIGRATE_TMP_PREFIX as el, orphanDeleteNeedsIdentity as en, isStatefulRecreateTargetSync as eo, reserveStackCreateToken as er, redactSecretsForState as es, getPriorAttempts as et, parentSuppliedValues as f, refuseMalformedOrphanRecords as fa, readBootstrapMarkerBody as fc, s3BucketWebsiteUrl as fi, defineOwnKey as fl, WITHHELD_NAME_DISPLAY as fn, readConfigString as fo, CC_BROKEN_REASON as fr, recoverMaskedOutput as fs, reachableDivergentParameters as ft, mergeNoChangeOutputs as g, refuseMalformedOrphansForOrphan as ga, buildDockerImage as gc, getAccountInfo as gi, ownValue as gl, secretBearingStateKeyWarning as gn, requireConfigString as go, wouldReturnToSdkProvider as gr, recordMaskOnlyValue as gs, NESTED_PENDING_PARENT_REASON as gt, keptWholeReasonText as h, refuseMalformedOrphansForDestroy as ha, buildDenyExternalAccessPolicy as hc, parameterTypeMayLoseSecretIdentity as hi, nullPrototypeRecord as hl, secretBearing as hn, requireConfigObject as ho, isCustomResource as hr, provenPublicValue as hs, planOrphanAdoption as ht, childTemplateLoader as i, malformedResourceEntriesWarning as ia, rewriteTemplateAssetReferences as ic, applyCallerIdentityCredentials as ii, decodeListingKey as il, REDACTED_DELETE_ADDRESS_SKIP_REASON as in, isWarmThroughputDecrease as io, DBPROXY_TAG_OPTIONS as ir, recordPhysicalNameCopy as is, bold as it, noEchoExactEchoLeavesOf as j, refuseMalformedResourcesForDestroy as ja, runDockerStreaming as jc, JSON_LISTING_HOLE_VALUE as ji, maskEventTextWithBoundBags as jn, maskedLeafCoordinatesOf as jo, deleteLeftInPlace as jr, rebuildClientForBucketRegion as js, isHandledOrphan as jt, noEchoAttributeNamesOf as k, refuseMalformedResourcePropertiesForOrphan as ka, redactedDockerCause as kc, passedParameterClassesOf as ki, completedReplayEntries as kn, maskReadbackAtCoordinates as ko, UNSPECIFIED_SKIP_REASON as kr, isLockInfoExpired as ks, deleteJournaledOrphans as kt, templateIdentity as l, previewableOrphanRecords as la, getBootstrapMarkerKey as lc, s3BucketDomainName as li, AssemblyReader as ll, updatePartialReason as ln, configBooleanRefusal as lo, tagPlanWarning as lr, identityKeyFor as ls, yellow as lt, isSecretBearingReferenceString as m, refuseMalformedOrphans as ma, validateContainerRepoName as mc, isUnboundTemplateParameter as mi, hasPlainPrototype$1 as ml, exportAliasCollisionScrubWarning as mn, requireConfigArray as mo, ccBrokenReason as mr, carriesSecretMask as ms, makeSiblingClaimReader as mt, IMPLICIT_DELETE_DEPENDENCIES as n, malformedOutputsWarning as na, createAssetRedirectResolver as nc, sendableAssumeRoleCommand as ni, uploadCfnTemplate as nl, getCurrentProducerRegions as nn, WARM_THROUGHPUT_MEMBERS as no, acquireIdempotencyToken as nr, withPhysicalNameCopies as ns, formatResourceLine as nt, isAbsoluteAssetPath as o, malformedResourcesWarning as oa, BOOTSTRAP_MARKER_PREFIX as oc, envCredentialsAreAssumedRole as oi, PARTITION_TABLE as ol, redactedDeleteAddressFields as on, toFiniteNumber as oo, readTagList as or, dynamicReferenceTokens as os, gray as ot, readRecordedConditionVerdicts as p, refuseMalformedOrphanRecordsForDestroy as pa, validateAssetBucketName as pc, coerceParameterTypedValue as pi, hasOwnKey as pl, displayTextOrWithheld as pn, replayWarn as po, ProviderRegistry as pr, splitGetAttStringForm as ps, resourcesNamingDeclaredParameter as pt, INDEX_SETTLE_POLL_INTERVAL_MS as q, withoutSilentDropProperties as qa, resolveStateBucketWithDefaultAndSource as qc, malformedLocalOutputsWarning as qi, unsupportedFinalSnapshotError as qn, recordLogOnlyValue as qo, producerRegionsFromState as qr, isReadableBag as qs, planFailedOps as qt, computeImplicitDeleteEdges as r, malformedRenderedContainersWarning as ra, loadPublishableAssetManifest as rc, AWS_CREDENTIAL_ENV_KEYS as ri, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as rl, inheritProducerRegions as rn, coerceWarmThroughput as ro, DBPROXY_TAGS_WHAT as rr, withoutPhysicalNameCopies as rs, createReadOnlyAttributeHealerFactory as rt, listNestedTemplateRows as s, malformedScrubResourceEntriesRefusalMessage as sa, assertAssetBucketRegion as sc, isSettledInstanceState as si, canonicalizeRegion as sl, redactedDeleteAddressSkip as sn, coerceCfnBoolean as so, refuseMalformedDesiredTags as sr, isUncertifiedBaselineMaskPosition as ss, green as st, DeployEngine as t, malformedOutputsRefusalMessage as ta, buildAssetRedirectMap as tc, isIamRoleArn as ti, findLargeInlineResources as tl, findNestedStackTypeChanges as tn, renderStatefulReason as to, withCreateTokenLedger as tr, scrubResourceRecord as ts, markRefusedBeforeApplying as tt, conditionFingerprint as u, refuseDivergentRecordRegionForDestroy as ua, isCrossRegionRedirect as uc, s3BucketDualStackDomainName as ui, StageLoadError as ul, DeploymentEventsReader as un, configIntegerRefusal as uo, definedAttributes as ur, inheritNestedStackParameterAssociations as us, computeParameterTaint as ut, chunks as v, refuseMalformedOutputsForDestroy as va, describeDockerCapturedOutput as vc, carriesDynamicReference as vi, describeFileReadFailure as vl, carriedExportAliasExposure as vn, templateResourceTypes as vo, readsNoEchoDeleteValues as vr, recordNoEchoAttributeValues as vs, displacedPhysicalIdShown as vt, deferredServiceTokenWarning as w, refuseMalformedResourceEntriesForImportSave as wa, getDockerCmd as wc, isStalePlaceholderArnAttribute as wi, collectPublishedOutputNames as wn, DagBuilder as wo, customResourceResponseExpirationWarning as wr, STATE_SOURCED_READBACK_RULES as ws, revertedNestedRowIds as wt, withApiLimit as x, refuseMalformedResourceEntriesForDeploy as xa, dockerSpawnEnvWithSensitive as xc, keepsSecretReferenceToken as xi, resolveAssemblyPath as xl, isWholeDynamicReferenceValue as xn, canonicalLambdaFunctionName as xo, withPrintingSecrets as xr, wholeStringLeavesOf as xs, nestedChildStackName as xt, isAccessDeniedError as y, refuseMalformedResourceAttributesForOrphan as ya, describeDockerExecFailure as yc, carriesFetchableDynamicReference as yi, displayAssemblyPath as yl, exportNameNoEchoParameters as yn, describeTypeWithThrottleRetry as yo, isCustomResourceType as yr, recordNoEchoParameterFreshValue as ys, dropSettledNestedJournals as yt, DynamoDBGlobalTableProvider as z, repairMalformedResourcesForReadOnly as za, getDefaultStateBucketName as zc, hasReadableOrphans as zi, ATOMIC_FINAL_SNAPSHOT_TYPES as zn, liveMatchesUnresolvedTokenFrame as zo, observeThenDisableInstanceApiTermination as zr, acceptedCreateOnlyDropsOf as zs, destroyStackRecordsView as zt };
44387
- //# sourceMappingURL=deploy-engine-CJTG3tft.js.map
45517
+ export { isTruthyCfnBoolean as $, isStatefulRecreateTargetForReplace as $a, CFN_TEMPLATE_BODY_LIMIT as $c, malformedOrphansRefusalMessage as $i, ledgerForStack as $n, markSameGenerationBag as $o, sendableAssumeRoleCommand as $r, isSensitiveAttributeName as $s, seedsDeleteFirstGuard as $t, noEchoComparisonForTemplate as A, refuseMalformedResourcesForDeploy as Aa, redactedDockerCause as Ac, declaresNoEcho as Ai, journaledOrphanPrintingBag as An, maskWholeValue as Ao, deleteIndeterminateGuards as Ar, isLockInfoExpired as As, dropFailedHint as At, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as B, unpreviewableOrphanRecords as Ba, getDefaultStateBucketName as Bc, hasReadableOutputs as Bi, PRE_DELETE_SNAPSHOT_TYPES as Bn, carryLogOnlyValues as Bo, reDisableInstanceApiTermination as Br, acceptedCreateOnlyDropsOf as Bs, getStackRecords as Bt, recordRetainedForReadoption as C, refuseMalformedResourceEntriesForImport as Ca, finchSecretArgvRefusal as Cc, cfnRefValueFromPhysicalId as Ci, clearBucketRegionCache as Cl, collectDeclaredOutputNames as Cn, sameLambdaFunctionAddress as Co, applyCustomResourceResponseExpiration as Cr, STATE_SOURCED_BASELINE_RULES as Cs, revertNestedChildFromJournal as Ct, withResourceDeadline as D, refuseMalformedResourcePropertiesForDrift as Da, isMalformedEnvKey as Dc, withSharedDrainBudget as Di, DEFAULT_RESOURCE_TIMEOUT_MS as Dn, isMarkedCoordinate as Do, unchangedBehindSecretReference as Dr, WHOLE_DYNAMIC_REFERENCE_PATTERN as Ds, getCurrentNestedStackContext as Dt, serviceTokenBlockingReason as E, refuseMalformedResourcePropertiesForDestroy as Ea, isDockerClientEnvKey as Ec, parseWebACLArn as Ei, bindingSkippedOutputs as En, canonicalCoordinates as Eo, slowCcOperationTimeoutMs as Er, TEMPLATE_SOURCED_RULES as Es, collectNestedChildUnaddressed as Et, PROTECTION_PROPERTY_BY_TYPE as F, repairMalformedOrphansForReadOnly as Fa, stripControlChars as Fc, UNREADABLE_RESOURCES_MAP_ROW as Fi, secretNamedRecordNeedles as Fn, passedNoEchoParametersOf as Fo, markWaitAbandoned as Fr, applyCrossPrefixScan as Fs, sameJournaledOrphans as Ft, resolveDynamoDbDeleteBudgetMs as G, findSilentDropProperties as Ga, resolveCaptureObservedState as Gc, malformedExportNamesWarning as Gi, isFinalSnapshotError as Gn, printingCorpusOf as Go, poisonRenderedSpellingsCollidingIn as Gr, hasUnverifiableParameterRefusal as Gs, isJournaledOrphan as Gt, compensateRemovedDeletionProtection as H, unreadableResourceEntries as Ha, loadCdkJson as Hc, isReadableOrphanRecord as Hi, ccRoutedFinalSnapshotError as Hn, hasMaskableValues as Ho, DiffCalculator as Hr, exportNamesCarriedFrom as Hs, removeProtectionTypeList as Ht, isProtectionValueActive as I, repairMalformedOutputsForReadOnly as Ia, AssetManifestLoader as Ic, accountArgs as Ii, stateSecretNameNeedles as In, readbackPathFor as Io, disableInstanceApiTermination as Ir, crossPrefixDeniedWarning as Is, replayFailedOperations as It, deleteTableWithIndexBusyRetry as J, NO_CC_HANDLERS_REASON as Ja, resolveStateBucketWithDefaultAndSource as Jc, malformedLocalResourceEntriesWarning as Ji, maskingRetryLogger as Jn, shareLogOnlyValues as Jo, applyRoleArnIfSet as Jr, isReadableBag as Js, planRollback as Jt, DELETE_INDEX_WAIT_PROCEED_NOTE as K, unwrittenCreateOnlyReplacement as Ka, resolveSkipPrefix as Kc, malformedExportSourceWarning as Ki, refusesFinalSnapshot as Kn, recordLogOnlyParameterValue as Ko, producerLookupOver as Kr, importableOutputKeys as Ks, isReplacementOrphan as Kt, perType as L, repairMalformedResourceEntriesForReadOnly as La, getDockerImageBySourceHash as Lc, deployRefusesOrphanRowsReason as Li, storedSecretNameNeedles as Ln, readsNoEchoSource as Lo, ec2InstanceProtectionSite as Lr, isAccessDenied$1 as Ls, replayRollback as Lt, noEchoParameterNamesOf as M, refuseMalformedResourcesForExport as Ma, runDockerStreaming as Mc, STATE_REGION_DIVERGED as Mi, orphanRecordsPrintingBag as Mn, noEchoCoordinatesOf as Mo, deleteSkipReason as Mr, rebuildClientForBucketRegion as Ms, journaledOrphanLines as Mt, recordedProtectionEvidence as N, refuseMalformedState as Na, warnFinchArgvExposure as Nc, STATE_RESOURCES_MALFORMED as Ni, secretNamePrintingBag as Nn, noEchoLeavesOf as No, withIndeterminateGuard as Nr, CrossPrefixReadError as Ns, loadJournaledOrphans as Nt, diffSecurity as O, refuseMalformedResourcePropertiesForExport as Oa, partitionSensitiveEnv as Oc, parameterInputsFor as Oi, DEFAULT_RESOURCE_WARN_AFTER_MS as On, maskAtCoordinates as Oo, RollbackInlinePolicyWriters as Or, isSingleDynamicReferenceToken as Os, withNestedStackContext as Ot, recordedProtectionNote as P, repairMalformedOrphanRecordsForReadOnly as Pa, escapeRegExp$3 as Pc, UNREADABLE_ORPHANS_CONTAINER_ROW as Pi, secretNamePrintingBags as Pn, noEchoOutputsComparison as Po, isWaitAbandonedError as Pr, CrossPrefixScanCache as Ps, makeForeignHolderScan as Pt, hasCdkAutoDeleteTag as Q, MULTI_REGION_RECREATE_BLOCKED_TYPES as Qa, ssmResolvedValueType as Qc, malformedOrphanRowsKeptWarning as Qi, earliestDefined as Qn, maskSecretsInText as Qo, isIamRoleArn as Qr, AssetPublisher as Qs, resolveReplacementOldType as Qt, readProtection as R, repairMalformedResourcePropertiesForReadOnly as Ra, Synthesizer as Rc, displayLogicalId as Ri, extractDeploymentEventError as Rn, valueAtCoordinate as Ro, isTerminationProtectionPropagationError as Rr, isNotImplemented as Rs, awaitInFlightSibling as Rt, keptForReadoption as S, refuseMalformedResourceEntriesForDestroy as Sa, dockerSpawnEnvWithSensitive as Sc, AWS_NO_VALUE as Si, resolveAssemblyPath as Sl, noEchoParameterValueSeed as Sn, lambdaFunctionNameForMask as So, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as Sr, wholeStringLeavesOf as Ss, recordDisplacedSkips as St, findServiceTokenRefusals as T, refuseMalformedResourceEntriesForOrphan as Ta, getDockerCmd as Tc, refStateLookupFromResource as Ti, isExportAliasCollision as Tn, TemplateParser as To, CloudControlProvider as Tr, STATE_SOURCED_READBACK_RULES as Ts, withNestedRevertRun as Tt, deleteBudgetKey as U, withheldAccountClause as Ua, resolveApp as Uc, isReadableResourceEntry as Ui, createPreDeleteFinalSnapshot as Un, literalSplitDelimitersOf as Uo, INTRINSIC_KEYS as Ur, hasReadableExportSet as Us, recordAfterRollbackUpdate as Ut, beginDeleteWait as V, unreadableOrphanRecords as Va, getLegacyStateBucketName as Vc, hasReadableResources as Vi, buildFinalSnapshotIdentifier as Vn, createUnionSecretMasker as Vo, reEnableInstanceApiTermination as Vr, describeRegionValueKind as Vs, withStackRecords as Vt, resolveDynamoDbDeleteBudgetClock as W, findActionableSilentDrops as Wa, resolveAutoAssetStorage as Wc, malformedDriftResourcePropertiesWarning as Wi, effectiveDeletionPolicy as Wn, logOnlyValueCount as Wo, IntrinsicFunctionResolver as Wr, hasReasonlessBaselineRefusal as Ws, demoteSupersededOrphans as Wt, ECR_AUTO_DELETE_IMAGES_TAG as X, findReplacedReadersOfRecreateTargets as Xa, stateBucketExistenceConfirmed as Xc, malformedOrphanRecordsRefusalMessage as Xi, findDestructiveChanges as Xn, errorCauseChain as Xo, assertSendableRoleArn as Xr, orphansCarriedFrom as Xs, recordUnderIdIsNotOwn as Xt, waitForIndexesSettled as Y, hasNoCloudControlHandlers as Ya, resolveUseCdkBootstrapAssets as Yc, malformedLocalResourcesWarning as Yi, constructPathOf as Yn, createSecretMasker as Yo, assertFlagRoleArn as Yr, orphansAfterRollback as Ys, recheckFailedPlan as Yt, S3_AUTO_DELETE_OBJECTS_TAG as Z, shownType as Za, warnDeprecatedNoPrefixCliFlag as Zc, malformedOrphanRecordsWarning as Zi, formatDestructiveChange as Zn, maskSecretsInError as Zo, explicitRoleArnOrThrow as Zr, shouldRetainResource as Zs, replacementNeverSwapped as Zt, makeCanonicalizePropertiesFn as _, refuseMalformedOutputs as _a, buildDockerImage as _c, isImpossibleEmptyStoredAttribute as _i, ownValue as _l, secretSafeKeyDisplay as _n, prefetchCreateOnlyPropertyPaths as _o, TemplateNoEchoReresolver as _r, recordMaskOnlyValue as _s, displacedOpClause as _t, findNestedTemplateTreeDefect as a, malformedResourcePropertiesWarning as aa, rewriteTemplateAssetReferences as ac, s3BucketArn as ai, decodeListingKey as al, isRedactedRecordedValue as an, toCfnInteger as ao, planTagDiff as ar, dynamicReferenceTokens as as, cyan as at, lookupEachName as b, refuseMalformedResourceEntries as ba, describeDockerExecFailure as bc, isNamelessDynamicReferenceError as bi, displayAssemblyPath as bl, exportNameSecretExposure as bn, withRetry as bo, getCurrentResourceSecrets as br, recordNoEchoParameterFreshValue as bs, getNestedRevertRun as bt, renderNestedTemplateTreeDefect as c, malformedStateRefusalMessage as ca, assertAssetBucketRegion as cc, s3BucketRegionalDomainName as ci, canonicalizeRegion as cl, updatePartialMessage as cn, coerceCfnInteger as co, tagMapAsList as cr, identityKeyFor as cs, red as ct, conditionInputsFrom as d, refuseMalformedNestedChildOutputs as da, isCrossRegionRedirect as dc, producerRegionsFromState as di, StageLoadError as dl, DeploymentEventsStore as dn, configStringRefusal as do, stringifyIfAssigned as dr, recoverMaskedOutput as ds, namesAnyDeclaredParameter as dt, malformedOrphansWarning as ea, stringifyValue as ec, AWS_CREDENTIAL_ENV_KEYS as ei, CFN_TEMPLATE_URL_LIMIT as el, orphanDeleteNeedsIdentity as en, isStatefulRecreateTargetSync as eo, reserveStackCreateToken as er, redactSecretsForState as es, getPriorAttempts as et, parentSuppliedValues as f, refuseMalformedOrphanRecords as fa, parseBootstrapMarker as fc, regionLessSecretName as fi, processStackMessages as fl, WITHHELD_NAME_DISPLAY as fn, readConfigString as fo, CC_BROKEN_REASON as fr, physicalNameCopiesOf as fs, reachableDivergentParameters as ft, mergeNoChangeOutputs as g, refuseMalformedOrphansForOrphan as ga, buildDenyExternalAccessPolicy as gc, getAccountInfo as gi, nullPrototypeRecord as gl, secretBearingStateKeyWarning as gn, requireConfigString as go, wouldReturnToSdkProvider as gr, provenPublicValue as gs, NESTED_PENDING_PARENT_REASON as gt, keptWholeReasonText as h, refuseMalformedOrphansForDestroy as ha, validateContainerRepoName as hc, parameterTypeMayLoseSecretIdentity as hi, hasPlainPrototype$1 as hl, secretBearing as hn, requireConfigObject as ho, isCustomResource as hr, carriesSecretMask as hs, planOrphanAdoption as ht, childTemplateLoader as i, malformedResourceEntriesWarning as ia, loadPublishableAssetManifest as ic, isSettledInstanceState as ii, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as il, REDACTED_DELETE_ADDRESS_SKIP_REASON as in, isWarmThroughputDecrease as io, DBPROXY_TAG_OPTIONS as ir, DYNAMIC_REFERENCE_TOKEN_SCAN as is, bold as it, noEchoExactEchoLeavesOf as j, refuseMalformedResourcesForDestroy as ja, runDockerForeground as jc, JSON_LISTING_HOLE_VALUE as ji, maskEventTextWithBoundBags as jn, maskedLeafCoordinatesOf as jo, deleteLeftInPlace as jr, S3StateBackend as js, isHandledOrphan as jt, noEchoAttributeNamesOf as k, refuseMalformedResourcePropertiesForOrphan as ka, redactDockerArgvValues as kc, passedParameterClassesOf as ki, completedReplayEntries as kn, maskReadbackAtCoordinates as ko, UNSPECIFIED_SKIP_REASON as kr, LockManager as ks, deleteJournaledOrphans as kt, templateIdentity as l, previewableOrphanRecords as la, ensureAssetStorage as lc, s3BucketWebsiteUrl as li, derivePartitionAndUrlSuffix as ll, updatePartialReason as ln, configBooleanRefusal as lo, tagPlanWarning as lr, inheritNestedStackParameterAssociations as ls, yellow as lt, isSecretBearingReferenceString as m, refuseMalformedOrphans as ma, validateAssetBucketName as mc, isUnboundTemplateParameter as mi, hasOwnKey as ml, exportAliasCollisionScrubWarning as mn, requireConfigArray as mo, ccBrokenReason as mr, splitGetAttStringForm as ms, makeSiblingClaimReader as mt, IMPLICIT_DELETE_DEPENDENCIES as n, malformedOutputsWarning as na, buildAssetRedirectMap as nc, callerEnvCredentials as ni, findLargeInlineResources as nl, getCurrentProducerRegions as nn, WARM_THROUGHPUT_MEMBERS as no, acquireIdempotencyToken as nr, withPhysicalNameCopies as ns, formatResourceLine as nt, isAbsoluteAssetPath as o, malformedResourcesWarning as oa, AssetModeResolver as oc, s3BucketDomainName as oi, expectedOwnerParam as ol, redactedDeleteAddressFields as on, toFiniteNumber as oo, readTagList as or, isUncertifiedBaselineMaskPosition as os, gray as ot, readRecordedConditionVerdicts as p, refuseMalformedOrphanRecordsForDestroy as pa, readBootstrapMarkerBody as pc, coerceParameterTypedValue as pi, defineOwnKey as pl, displayTextOrWithheld as pn, replayWarn as po, ProviderRegistry as pr, recordPhysicalNameCopy as ps, resourcesNamingDeclaredParameter as pt, INDEX_SETTLE_POLL_INTERVAL_MS as q, withoutSilentDropProperties as qa, resolveStateBucketWithDefault as qc, malformedLocalOutputsWarning as qi, unsupportedFinalSnapshotError as qn, recordLogOnlyValue as qo, refuseUnreadableCdkCrossAccountRefs as qr, importableOutputs as qs, planFailedOps as qt, computeImplicitDeleteEdges as r, malformedRenderedContainersWarning as ra, createAssetRedirectResolver as rc, envCredentialsAreAssumedRole as ri, uploadCfnTemplate as rl, inheritProducerRegions as rn, coerceWarmThroughput as ro, DBPROXY_TAGS_WHAT as rr, withoutPhysicalNameCopies as rs, createReadOnlyAttributeHealerFactory as rt, listNestedTemplateRows as s, malformedScrubResourceEntriesRefusalMessage as sa, BOOTSTRAP_MARKER_PREFIX as sc, s3BucketDualStackDomainName as si, PARTITION_TABLE as sl, redactedDeleteAddressSkip as sn, coerceCfnBoolean as so, refuseMalformedDesiredTags as sr, pathCrossesDottedKey as ss, green as st, DeployEngine as t, malformedOutputsRefusalMessage as ta, WorkGraph as tc, applyCallerIdentityCredentials as ti, MIGRATE_TMP_PREFIX as tl, findNestedStackTypeChanges as tn, renderStatefulReason as to, withCreateTokenLedger as tr, scrubResourceRecord as ts, markRefusedBeforeApplying as tt, conditionFingerprint as u, refuseDivergentRecordRegionForDestroy as ua, getBootstrapMarkerKey as uc, classifyReplaySecretRegion as ui, AssemblyReader as ul, DeploymentEventsReader as un, configIntegerRefusal as uo, definedAttributes as ur, recordNestedStackParameterExpressions as us, computeParameterTaint as ut, chunks as v, refuseMalformedOutputsForDestroy as va, resolveDockerContextDirectory as vc, carriesDynamicReference as vi, absoluteAssemblyPathEscape as vl, carriedExportAliasExposure as vn, templateResourceTypes as vo, readsNoEchoDeleteValues as vr, recordMaskOnlyValuesIn as vs, displacedPhysicalIdShown as vt, deferredServiceTokenWarning as w, refuseMalformedResourceEntriesForImportSave as wa, formatDockerLoginError as wc, isStalePlaceholderArnAttribute as wi, resolveBucketRegion as wl, collectPublishedOutputNames as wn, DagBuilder as wo, customResourceResponseExpirationWarning as wr, STATE_SOURCED_CROSS_GENERATION_RULES as ws, revertedNestedRowIds as wt, withApiLimit as x, refuseMalformedResourceEntriesForDeploy as xa, describeDockerFailure as xc, keepsSecretReferenceToken as xi, renderAssemblyPathEscape as xl, isWholeDynamicReferenceValue as xn, canonicalLambdaFunctionName as xo, withPrintingSecrets as xr, recordProvenPublicExpression as xs, nestedChildStackName as xt, isAccessDeniedError as y, refuseMalformedResourceAttributesForOrphan as ya, describeDockerCapturedOutput as yc, carriesFetchableDynamicReference as yi, describeFileReadFailure as yl, exportNameNoEchoParameters as yn, describeTypeWithThrottleRetry as yo, isCustomResourceType as yr, recordNoEchoAttributeValues as ys, dropSettledNestedJournals as yt, DynamoDBGlobalTableProvider as z, repairMalformedResourcesForReadOnly as za, synthesisStatusMessage as zc, hasReadableOrphans as zi, ATOMIC_FINAL_SNAPSHOT_TYPES as zn, liveMatchesUnresolvedTokenFrame as zo, observeThenDisableInstanceApiTermination as zr, splitImportedOps as zs, destroyStackRecordsView as zt };
45518
+ //# sourceMappingURL=deploy-engine-BgWY0v3K.js.map