@go-to-k/cdkd 0.294.10 → 0.294.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{asg-provider-BFlmarbF.js → asg-provider-CbHiTBaE.js} +2 -2
- package/dist/{asg-provider-BFlmarbF.js.map → asg-provider-CbHiTBaE.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-RCOtmm4V.js → deploy-engine-CMRU0DTu.js} +1329 -88
- package/dist/deploy-engine-CMRU0DTu.js.map +1 -0
- package/dist/{iam-role-provider-2w-Hr9_h.js → iam-role-provider-DOKKlLrC.js} +2 -2
- package/dist/{iam-role-provider-2w-Hr9_h.js.map → iam-role-provider-DOKKlLrC.js.map} +1 -1
- package/dist/index.d.ts +40 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{neptune-provider-CHnIs1hG.js → neptune-provider-CS-r4Ufj.js} +2 -2
- package/dist/{neptune-provider-CHnIs1hG.js.map → neptune-provider-CS-r4Ufj.js.map} +1 -1
- package/dist/{program-Eed63bId.js → program-dQFaGjL1.js} +234 -190
- package/dist/program-dQFaGjL1.js.map +1 -0
- package/dist/{provider-classes-R7yvwymx.js → provider-classes-5NUmLSTV.js} +9 -7
- package/dist/{provider-classes-R7yvwymx.js.map → provider-classes-5NUmLSTV.js.map} +1 -1
- package/dist/{rds-provider-DqHELwjV.js → rds-provider-l9F4Y8YY.js} +2 -2
- package/dist/{rds-provider-DqHELwjV.js.map → rds-provider-l9F4Y8YY.js.map} +1 -1
- package/dist/{version-BNo3JdVW.js → version-DIQcU8CA.js} +2 -2
- package/dist/{version-BNo3JdVW.js.map → version-DIQcU8CA.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-RCOtmm4V.js.map +0 -1
- package/dist/program-Eed63bId.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 displaySafe, E as UNRENDERABLE, F as safeMsg, L as truncateCodePoints, M as isPasteableIdent, O as displayAwsMessage, P as plainIdentOr, S as withoutGeneratedFallbackName, T as STACK_REF_MAX_CODE_POINTS, _ as getCurrentSkipPrefix, b as withSkipPrefix, c as getLiveRenderer, f as applyDefaultNameForFallback, g as generateResourceNameWithFallback, h as generateResourceName, j as displayStackName, k as displayIdent, m as explicitNamePropertyFor, n as getLogger, r as isStdoutReservedForPayload, s as installLogLineMaskerSource, v as getCurrentStackName, w as SECRET_REF_MAX_CODE_POINTS, x as withStackName, y as looksLikeCdkdGeneratedName } from "./logger-B46YMG0h.js";
|
|
3
3
|
import { $t as StateError, A as isTerminalDeleteFailure, An as isAmbiguousCcHandlerErrorCode, At as clientDefaultsFor, Bn as isMarkedNonRetryable, Bt as IntrinsicResolutionRefusalError, C as refusalTypeShown, Cn as isNameCollisionErrorFrom, D as ProtectionFlipRegistry, Dt as withPasteableAwsProfile, En as isReplayedNameCollisionFrom, Fn as retryClassificationText, Gt as MalformedProducerRecordRefusalError, H as pasteableAwsCommand, Hn as markNonRetryable, In as describeAwsFailure, It as CrossAccountSecretRefusalError, J as isInterruptedWaitError, Jt as ProvisioningError, Lt as DependencyError, M as observeThenDisableProtection, Mn as isIamPropagationError, Mt as AccountIdUnavailableError, N as protectionFlipKey, Nn as isRetryableTransientError, Nt as AssetError, O as compensateProtectionFlip, On as markReplayMayCollide, Ot as ambientClientDefaults, Pn as isTransientServerError, Pt as CdkdError, Q as canonicalizeRoute53QueryName, R as DELETION_PROTECTION_DOC_POINTER, Rn as safeStringify$1, S as quotedRemedyLogicalId, Sn as hasReplayMayCollide, St as injectiveKey, T as resolveExplicitPhysicalId, Tn as isRecreateRetryableError, Tt as producerRecordKey, U as protectedReplacementAdvice, Un as markRedactedCause, Ut as LockError, Vn as isThrottlingError, Wn as wrapMaskedAwsError, Wt as MacroExpansionError, X as ElapsedBudgetRegistry, Xt as ResourceUpdateNotSupportedError, Y as startInterruptWatch, Yt as ResourceTimeoutError, Z as monotonicNowMs, _n as shellQuote, _t as formatLockOperation, at as segmentAfterAnchor, b as isQuotableImportValue, bt as CUSTOM_RESOURCE_RESPONSE_PREFIX, cn as UNSHOWABLE_VALUE, ct as isSecretDerivedValue, d as prepareRemovalForUpdate, dn as isInertUnquoted, dt as withDerivedNameMasks, en as SynthesisError, et as compositeIdSeparatorRefusal, f as removalWarning, fn as pasteableCommand, ft as UNREPRODUCIBLE_LOCK_CLAUSE, g as assertRegionMatch, gn as shellBoundedDisplay, gt as formatLockExpiry, h as RESOURCE_NOT_FOUND, hn as quotedOrDescribed, i as holdsSecretDerivedEntry, it as resourceTypeShown, jn as isAmbiguousOutcomeError, jt as credentialFingerprint, k as deleteWithProtectionCompensation, kn as formatRetryClassificationSignals, kt as ambientCredentialConfig, l as withUnchangedSecretPrincipalLists, ln as commandHole, lt as maskDeep, m as withoutInjectedRemovals, mn as plainOrDescribed, nt as logicalIdShown, on as SHELL_ACTIVE, ot as createMaskedLogSinks, pn as physicalIdShownBesideCommand, pt as buildForceUnlockCommand, rn as normalizeAwsError, sn as SHELL_ACTIVE_WHY, st as createMaskedRetryLogger, ut as maskerOrIdentity, vn as withheldTargetClause, vt as formatLockOwner, wn as isNameCooldownError, x as normalizeAwsTagsToCfn, xn as isUpdateUnsupportedError, xt as DEFAULT_STATE_PREFIX, yt as sanitizeRecoveryValue, zt as DynamicReferenceRegionAmbiguousError } from "./iam-policy-targets-CMSQGQnm.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-
|
|
5
|
+
import { t as getCdkdVersion } from "./version-DIQcU8CA.js";
|
|
6
6
|
import { createHash, randomUUID } from "node:crypto";
|
|
7
7
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
8
8
|
import { CreateBucketCommand, DeleteObjectCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetBucketReplicationCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchKey, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutObjectCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -4683,6 +4683,41 @@ function orphansAfterRollback(previous, newlyOrphaned) {
|
|
|
4683
4683
|
//#endregion
|
|
4684
4684
|
//#region src/types/rollback-journal.ts
|
|
4685
4685
|
const ROLLBACK_JOURNAL_VERSION = 1;
|
|
4686
|
+
function splitImportedOps(ops, segment, except = /* @__PURE__ */ new Set()) {
|
|
4687
|
+
const marks = segment.importedResources ?? [];
|
|
4688
|
+
const replay = [];
|
|
4689
|
+
const imported = [];
|
|
4690
|
+
const displaced = [];
|
|
4691
|
+
for (const op of ops) {
|
|
4692
|
+
const ofId = except.has(op.logicalId) ? [] : marks.filter((m) => m.logicalId === op.logicalId);
|
|
4693
|
+
if (ofId.length === 0) replay.push(op);
|
|
4694
|
+
else if (ofId.some((m) => isMarkFor(m, op)) && retainedOldPhysicalId(op) === void 0) imported.push(op);
|
|
4695
|
+
else displaced.push(op);
|
|
4696
|
+
}
|
|
4697
|
+
return {
|
|
4698
|
+
replay,
|
|
4699
|
+
imported,
|
|
4700
|
+
displaced
|
|
4701
|
+
};
|
|
4702
|
+
}
|
|
4703
|
+
function journalOpPhysicalId(op) {
|
|
4704
|
+
if (op.physicalId !== void 0) return op.physicalId;
|
|
4705
|
+
const prev = op.previousState?.physicalId;
|
|
4706
|
+
return op.changeType === "DELETE" && typeof prev === "string" && prev !== "" ? prev : void 0;
|
|
4707
|
+
}
|
|
4708
|
+
function retainedOldPhysicalId(op) {
|
|
4709
|
+
if (op.changeType !== "UPDATE") return void 0;
|
|
4710
|
+
const prev = op.previousState?.physicalId;
|
|
4711
|
+
if (typeof prev !== "string" || prev === "") return void 0;
|
|
4712
|
+
const prevType = op.previousState?.resourceType;
|
|
4713
|
+
const oldType = op.previousResourceType ?? (typeof prevType === "string" && prevType !== "" ? prevType : void 0);
|
|
4714
|
+
if (!(prev !== journalOpPhysicalId(op) || oldType !== void 0 && oldType !== op.resourceType)) return void 0;
|
|
4715
|
+
return op.oldResourceRetained !== false ? prev : void 0;
|
|
4716
|
+
}
|
|
4717
|
+
function isMarkFor(mark, op) {
|
|
4718
|
+
const own = journalOpPhysicalId(op);
|
|
4719
|
+
return own !== void 0 && mark.logicalId === op.logicalId && mark.physicalId === own && mark.resourceType === op.resourceType;
|
|
4720
|
+
}
|
|
4686
4721
|
var UnknownRollbackJournalVersionError = class extends Error {
|
|
4687
4722
|
foundVersion;
|
|
4688
4723
|
stackName;
|
|
@@ -4753,6 +4788,7 @@ function parseRollbackJournal(bodyString, stackName) {
|
|
|
4753
4788
|
seg["failedOperations"].forEach((op, i) => refuseMalformedOperation(shownStack, `segments[${s}].failedOperations[${i}]`, op));
|
|
4754
4789
|
}
|
|
4755
4790
|
if (seg["supersededLogicalIds"] !== void 0 && (!Array.isArray(seg["supersededLogicalIds"]) || !seg["supersededLogicalIds"].every((id) => typeof id === "string"))) refuseMalformed(shownStack, `segments[${s}].supersededLogicalIds must be an array of strings when present.`);
|
|
4791
|
+
if (seg["importedResources"] !== void 0 && (!Array.isArray(seg["importedResources"]) || !seg["importedResources"].every((m) => typeof m === "object" && m !== null && typeof m["logicalId"] === "string" && typeof m["physicalId"] === "string" && typeof m["resourceType"] === "string"))) refuseMalformed(shownStack, `segments[${s}].importedResources must be an array of { logicalId, physicalId, resourceType } strings when present.`);
|
|
4756
4792
|
if (seg["runId"] !== void 0 && typeof seg["runId"] !== "string") refuseMalformed(shownStack, `segments[${s}].runId must be a string when present (got ${kind(seg["runId"])}).`);
|
|
4757
4793
|
if (seg["skipPrefix"] !== void 0 && typeof seg["skipPrefix"] !== "boolean") refuseMalformed(shownStack, `segments[${s}].skipPrefix must be a boolean when present (got ${kind(seg["skipPrefix"])}).`);
|
|
4758
4794
|
const reads = seg["previousCrossStackReads"];
|
|
@@ -5370,6 +5406,23 @@ var S3StateBackend = class {
|
|
|
5370
5406
|
addSupersededIds(newest, logicalIds);
|
|
5371
5407
|
await this.putRawObject(this.getRollbackJournalKey(stackName, region), JSON.stringify(journal, null, 2));
|
|
5372
5408
|
}
|
|
5409
|
+
async markRollbackJournalImported(stackName, region, marks) {
|
|
5410
|
+
if (marks.length === 0) return [];
|
|
5411
|
+
const journal = await this.loadRollbackJournal(stackName, region);
|
|
5412
|
+
if (!journal) return [];
|
|
5413
|
+
const marked = /* @__PURE__ */ new Set();
|
|
5414
|
+
for (const segment of journal.segments) {
|
|
5415
|
+
const named = new Set([...segment.operations, ...segment.failedOperations ?? []].map((op) => op.logicalId));
|
|
5416
|
+
const hits = marks.filter((m) => named.has(m.logicalId));
|
|
5417
|
+
if (hits.length === 0) continue;
|
|
5418
|
+
segment.importedResources = [...(segment.importedResources ?? []).filter((k) => !hits.some((m) => m.logicalId === k.logicalId)), ...hits.map((m) => ({ ...m }))];
|
|
5419
|
+
for (const m of hits) marked.add(m.logicalId);
|
|
5420
|
+
}
|
|
5421
|
+
if (marked.size === 0) return [];
|
|
5422
|
+
addSupersededIds(journal.segments[journal.segments.length - 1], [...marked]);
|
|
5423
|
+
await this.putRawObject(this.getRollbackJournalKey(stackName, region), JSON.stringify(journal, null, 2));
|
|
5424
|
+
return [...marked];
|
|
5425
|
+
}
|
|
5373
5426
|
async dropRollbackJournalSegments(stackName, region, drop) {
|
|
5374
5427
|
const journal = await this.loadRollbackJournal(stackName, region);
|
|
5375
5428
|
if (!journal) return 0;
|
|
@@ -6077,7 +6130,7 @@ const WHOLE_DYNAMIC_REFERENCE_PATTERN = new RegExp(`^\\{\\{resolve:${DYNAMIC_REF
|
|
|
6077
6130
|
function isSingleDynamicReferenceToken(value) {
|
|
6078
6131
|
return WHOLE_DYNAMIC_REFERENCE_PATTERN.test(value);
|
|
6079
6132
|
}
|
|
6080
|
-
function isPlainObject$
|
|
6133
|
+
function isPlainObject$4(value) {
|
|
6081
6134
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
6082
6135
|
}
|
|
6083
6136
|
|
|
@@ -6262,7 +6315,7 @@ function crossStackSourceKey(source) {
|
|
|
6262
6315
|
}
|
|
6263
6316
|
if (key === "Fn::GetStackOutput") {
|
|
6264
6317
|
const args = source[key];
|
|
6265
|
-
if (!isPlainObject$
|
|
6318
|
+
if (!isPlainObject$4(args)) return void 0;
|
|
6266
6319
|
const stackName = Object.hasOwn(args, "StackName") ? literalStringOrUndefined(args["StackName"]) : void 0;
|
|
6267
6320
|
const outputName = Object.hasOwn(args, "OutputName") ? literalStringOrUndefined(args["OutputName"]) : void 0;
|
|
6268
6321
|
if (stackName === void 0 || outputName === void 0) return void 0;
|
|
@@ -6308,7 +6361,7 @@ function crossStackSourceKey(source) {
|
|
|
6308
6361
|
let template;
|
|
6309
6362
|
let variables;
|
|
6310
6363
|
if (typeof raw === "string") template = raw;
|
|
6311
|
-
else if (Array.isArray(raw) && raw.length === 2 && isPlainObject$
|
|
6364
|
+
else if (Array.isArray(raw) && raw.length === 2 && isPlainObject$4(raw[1])) {
|
|
6312
6365
|
if (typeof raw[0] !== "string") return void 0;
|
|
6313
6366
|
template = raw[0];
|
|
6314
6367
|
variables = raw[1];
|
|
@@ -6408,7 +6461,7 @@ function appendValuePlaceholderParts(value, out, budget, depth) {
|
|
|
6408
6461
|
if (budget.exhausted) return;
|
|
6409
6462
|
const literal = joinPartLiteralText(value);
|
|
6410
6463
|
if (literal !== void 0) return pushPlaceholderPart(out, literal, budget);
|
|
6411
|
-
if (isPlainObject$
|
|
6464
|
+
if (isPlainObject$4(value) && Object.keys(value).length === 1) {
|
|
6412
6465
|
const ref = value["Ref"];
|
|
6413
6466
|
if (typeof ref === "string" && ref !== "") return pushPlaceholderPart(out, keyedPart({ Ref: ref }), budget);
|
|
6414
6467
|
if (depth >= MAX_PLACEHOLDER_DEPTH) {
|
|
@@ -6440,7 +6493,7 @@ function appendParameterPlaceholderParts(source, out, budget, depth) {
|
|
|
6440
6493
|
let template;
|
|
6441
6494
|
let variables = {};
|
|
6442
6495
|
if (typeof args === "string") template = args;
|
|
6443
|
-
else if (Array.isArray(args) && args.length === 2 && isPlainObject$
|
|
6496
|
+
else if (Array.isArray(args) && args.length === 2 && isPlainObject$4(args[1])) {
|
|
6444
6497
|
template = args[0];
|
|
6445
6498
|
variables = args[1];
|
|
6446
6499
|
} else return false;
|
|
@@ -6583,7 +6636,7 @@ function isUniquelyKeyedBy(items, key) {
|
|
|
6583
6636
|
if (items.length === 0) return false;
|
|
6584
6637
|
const seen = /* @__PURE__ */ new Set();
|
|
6585
6638
|
for (const item of items) {
|
|
6586
|
-
if (!isPlainObject$
|
|
6639
|
+
if (!isPlainObject$4(item) || !Object.hasOwn(item, key)) return false;
|
|
6587
6640
|
const id = item[key];
|
|
6588
6641
|
if (typeof id !== "string" || id === "") return false;
|
|
6589
6642
|
if (seen.has(id)) return false;
|
|
@@ -6613,7 +6666,7 @@ function redactByPath(bag, source, secrets, rules, secretExpressions, bagIsSameG
|
|
|
6613
6666
|
}
|
|
6614
6667
|
return positionByEmbeddedSpan(bag, source, secrets, bagIsSameGeneration);
|
|
6615
6668
|
}
|
|
6616
|
-
if (typeof bag === "string" && isPlainObject$
|
|
6669
|
+
if (typeof bag === "string" && isPlainObject$4(source)) {
|
|
6617
6670
|
const certified = positionByCrossStackSource(bag, source, secrets);
|
|
6618
6671
|
if (certified !== void 0) return certified;
|
|
6619
6672
|
const placeheld = positionByParameterPlaceholders(bag, source, secrets);
|
|
@@ -6623,7 +6676,7 @@ function redactByPath(bag, source, secrets, rules, secretExpressions, bagIsSameG
|
|
|
6623
6676
|
const framed = positionByIntrinsicFrame(bag, source, secrets, secretExpressions, bagIsSameGeneration);
|
|
6624
6677
|
if (framed !== void 0) return framed;
|
|
6625
6678
|
}
|
|
6626
|
-
if (Array.isArray(bag) && isPlainObject$
|
|
6679
|
+
if (Array.isArray(bag) && isPlainObject$4(source)) {
|
|
6627
6680
|
const positionedList = positionListByCrossStackSource(bag, source, secrets);
|
|
6628
6681
|
if (positionedList !== void 0) return positionedList;
|
|
6629
6682
|
}
|
|
@@ -6651,7 +6704,7 @@ function redactByPath(bag, source, secrets, rules, secretExpressions, bagIsSameG
|
|
|
6651
6704
|
}
|
|
6652
6705
|
if (rules.descendArrays && bag.length === source.length) return bag.map((item, i) => redactByPath(item, source[i], secrets, rules, secretExpressions, bagIsSameGeneration));
|
|
6653
6706
|
}
|
|
6654
|
-
if (isPlainObject$
|
|
6707
|
+
if (isPlainObject$4(bag) && hasPlainPrototype(bag) && isPlainObject$4(source)) {
|
|
6655
6708
|
const out = Object.create(null);
|
|
6656
6709
|
for (const [k, v] of Object.entries(bag)) out[k] = Object.hasOwn(source, k) ? redactByPath(v, source[k], secrets, rules, secretExpressions, bagIsSameGeneration) : redactSecretsForState(v, secrets);
|
|
6657
6710
|
return out;
|
|
@@ -6664,7 +6717,7 @@ function isReadbackProjectedFromState(rules) {
|
|
|
6664
6717
|
function subtreeHasDynamicReference(value) {
|
|
6665
6718
|
if (isDynamicReferenceString(value)) return true;
|
|
6666
6719
|
if (Array.isArray(value)) return value.some(subtreeHasDynamicReference);
|
|
6667
|
-
if (isPlainObject$
|
|
6720
|
+
if (isPlainObject$4(value)) return Object.values(value).some(subtreeHasDynamicReference);
|
|
6668
6721
|
return false;
|
|
6669
6722
|
}
|
|
6670
6723
|
function pathCrossesDottedKey(bag, path) {
|
|
@@ -6726,8 +6779,8 @@ function deepEqualJsonValue(a, b) {
|
|
|
6726
6779
|
if (!Array.isArray(b) || a.length !== b.length) return false;
|
|
6727
6780
|
return a.every((item, i) => deepEqualJsonValue(item, b[i]));
|
|
6728
6781
|
}
|
|
6729
|
-
if (isPlainObject$
|
|
6730
|
-
if (!isPlainObject$
|
|
6782
|
+
if (isPlainObject$4(a)) {
|
|
6783
|
+
if (!isPlainObject$4(b)) return false;
|
|
6731
6784
|
if (!hasPlainPrototype(a) || !hasPlainPrototype(b)) return false;
|
|
6732
6785
|
const keys = Object.keys(a);
|
|
6733
6786
|
if (keys.length !== Object.keys(b).length) return false;
|
|
@@ -6753,7 +6806,7 @@ function refuseUncertifiedSubtree(value, sourceLiterals, mark, seen = /* @__PURE
|
|
|
6753
6806
|
for (const item of value) out.push(refuseUncertifiedSubtree(item, sourceLiterals, mark, seen));
|
|
6754
6807
|
return out;
|
|
6755
6808
|
}
|
|
6756
|
-
if (isPlainObject$
|
|
6809
|
+
if (isPlainObject$4(value) && hasPlainPrototype(value)) {
|
|
6757
6810
|
const out = Object.create(null);
|
|
6758
6811
|
seen.set(value, out);
|
|
6759
6812
|
for (const [k, v] of Object.entries(value)) out[k] = refuseUncertifiedSubtree(v, sourceLiterals, mark, seen);
|
|
@@ -6781,7 +6834,7 @@ function refuseUncertifiedReadbackPositions(bag, source, secrets, failClosed, le
|
|
|
6781
6834
|
return mark ? POSITION_DECIDED : source;
|
|
6782
6835
|
}
|
|
6783
6836
|
if (!subtreeHasDynamicReference(source)) return bag;
|
|
6784
|
-
if (isPlainObject$
|
|
6837
|
+
if (isPlainObject$4(bag) && hasPlainPrototype(bag) && isPlainObject$4(source)) {
|
|
6785
6838
|
const out = Object.create(null);
|
|
6786
6839
|
for (const [k, v] of Object.entries(bag)) out[k] = Object.hasOwn(source, k) ? refuseUncertifiedReadbackPositions(v, source[k], secrets, failClosed, learn, mark) : v;
|
|
6787
6840
|
return out;
|
|
@@ -6808,14 +6861,14 @@ function refuseUncertifiedReadbackPositions(bag, source, secrets, failClosed, le
|
|
|
6808
6861
|
function isDistinguishingAnchor(value) {
|
|
6809
6862
|
if (typeof value === "string") return value !== "";
|
|
6810
6863
|
if (Array.isArray(value)) return value.some(isDistinguishingAnchor);
|
|
6811
|
-
if (isPlainObject$
|
|
6864
|
+
if (isPlainObject$4(value)) return Object.values(value).some(isDistinguishingAnchor);
|
|
6812
6865
|
return false;
|
|
6813
6866
|
}
|
|
6814
6867
|
const ANCHOR_REFERENCE_MASK = "<ref>";
|
|
6815
6868
|
function anchorSignature(source) {
|
|
6816
6869
|
if (isDynamicReferenceString(source)) return ANCHOR_REFERENCE_MASK;
|
|
6817
6870
|
if (Array.isArray(source)) return `[${source.map(anchorSignature).sort().join(",")}]`;
|
|
6818
|
-
if (isPlainObject$
|
|
6871
|
+
if (isPlainObject$4(source)) return `{${Object.keys(source).sort().map((k) => `${JSON.stringify(k)}:${anchorSignature(source[k])}`).join(",")}}`;
|
|
6819
6872
|
return JSON.stringify(source) ?? "undefined";
|
|
6820
6873
|
}
|
|
6821
6874
|
function anchorsCorroboratePairing(bag, source, anchors) {
|
|
@@ -6825,8 +6878,8 @@ function anchorsCorroboratePairing(bag, source, anchors) {
|
|
|
6825
6878
|
return true;
|
|
6826
6879
|
}
|
|
6827
6880
|
if (isDynamicReferenceString(source)) return typeof bag === "string";
|
|
6828
|
-
if (isPlainObject$
|
|
6829
|
-
if (!isPlainObject$
|
|
6881
|
+
if (isPlainObject$4(source)) {
|
|
6882
|
+
if (!isPlainObject$4(bag)) return false;
|
|
6830
6883
|
return Object.keys(source).every((k) => Object.hasOwn(bag, k) && anchorsCorroboratePairing(bag[k], source[k], anchors));
|
|
6831
6884
|
}
|
|
6832
6885
|
if (Array.isArray(source)) {
|
|
@@ -6917,13 +6970,13 @@ function learnMixedLeafNeedle(collector, bag, source) {
|
|
|
6917
6970
|
learnNeedle(collector, plaintext, token);
|
|
6918
6971
|
}
|
|
6919
6972
|
function asChild(marks, key) {
|
|
6920
|
-
return isPlainObject$
|
|
6973
|
+
return isPlainObject$4(marks) && hasPlainPrototype(marks) ? marks[key] : void 0;
|
|
6921
6974
|
}
|
|
6922
6975
|
function asIndex(marks, index) {
|
|
6923
6976
|
return Array.isArray(marks) ? marks[index] : void 0;
|
|
6924
6977
|
}
|
|
6925
6978
|
function preferPositionDecisions(scanned, refused, bag, marks, inferred) {
|
|
6926
|
-
if (isPlainObject$
|
|
6979
|
+
if (isPlainObject$4(bag) && hasPlainPrototype(bag) && isPlainObject$4(refused) && isPlainObject$4(scanned)) {
|
|
6927
6980
|
const out = Object.create(null);
|
|
6928
6981
|
for (const [k, v] of Object.entries(refused)) out[k] = preferPositionDecisions(scanned[k], v, bag[k], asChild(marks, k), inferred);
|
|
6929
6982
|
return out;
|
|
@@ -7792,12 +7845,12 @@ const UNFRAMED_SPELLING = Symbol("cdkd.nested-parameter.unframed-spelling");
|
|
|
7792
7845
|
function recordNestedStackParameterExpressions(secrets, resourceType, resolvedProperties, sourceProperties, rules = TEMPLATE_DERIVED_RULES) {
|
|
7793
7846
|
if (resourceType !== NESTED_STACK_RESOURCE_TYPE$4) return;
|
|
7794
7847
|
if (secrets.size === 0) return;
|
|
7795
|
-
if (!isPlainObject$
|
|
7848
|
+
if (!isPlainObject$4(resolvedProperties) || !isPlainObject$4(sourceProperties)) return;
|
|
7796
7849
|
if (!Object.hasOwn(resolvedProperties, "Parameters")) return;
|
|
7797
7850
|
if (!Object.hasOwn(sourceProperties, "Parameters")) return;
|
|
7798
7851
|
const resolvedParameters = resolvedProperties["Parameters"];
|
|
7799
7852
|
const sourceParameters = sourceProperties["Parameters"];
|
|
7800
|
-
if (!isPlainObject$
|
|
7853
|
+
if (!isPlainObject$4(resolvedParameters) || !isPlainObject$4(sourceParameters)) return;
|
|
7801
7854
|
const positioned = redactSecretsForState(markSameGenerationBag({ ...resolvedParameters }), secrets, sourceParameters, rules);
|
|
7802
7855
|
let table = nestedStackParameterExpressions.get(secrets);
|
|
7803
7856
|
for (const [name, resolvedValue] of Object.entries(resolvedParameters)) {
|
|
@@ -7829,7 +7882,7 @@ function recordNestedStackParameterExpressions(secrets, resourceType, resolvedPr
|
|
|
7829
7882
|
if (typeof resolvedValue !== "string") return void 0;
|
|
7830
7883
|
const sourceLeaf = sourceParameters[name];
|
|
7831
7884
|
if (typeof sourceLeaf === "string") return sourceLeaf;
|
|
7832
|
-
if (!isPlainObject$
|
|
7885
|
+
if (!isPlainObject$4(sourceLeaf)) return void 0;
|
|
7833
7886
|
const written = positioned[name];
|
|
7834
7887
|
if (typeof written !== "string") return void 0;
|
|
7835
7888
|
const rendered = intrinsicSkeletonSegments(sourceLeaf)?.map((s) => s === UNKNOWN_PART ? "\0" : s).join("");
|
|
@@ -10787,7 +10840,7 @@ function probeFoundSameId(resourceType, a, b) {
|
|
|
10787
10840
|
//#region src/provisioning/config-shape.ts
|
|
10788
10841
|
function readConfigString(container, key, fallback, containerPath, options) {
|
|
10789
10842
|
if (container === void 0 || container === null) return fallback;
|
|
10790
|
-
if (!isPlainObject$
|
|
10843
|
+
if (!isPlainObject$3(container) || isUnresolvedIntrinsicContainer(container)) {
|
|
10791
10844
|
const detail = malformedShapeDetail(container);
|
|
10792
10845
|
if (options?.onUnusable) {
|
|
10793
10846
|
const named = fallback === "" ? "" : ` (${fallback})`;
|
|
@@ -10827,7 +10880,7 @@ function requireConfigArray(value, path, options) {
|
|
|
10827
10880
|
return value;
|
|
10828
10881
|
}
|
|
10829
10882
|
function requireConfigObject(value, path, options) {
|
|
10830
|
-
if (!isPlainObject$
|
|
10883
|
+
if (!isPlainObject$3(value) || isUnresolvedIntrinsicContainer(value)) {
|
|
10831
10884
|
const detail = malformedShapeDetail(value);
|
|
10832
10885
|
if (options?.onUnusable) {
|
|
10833
10886
|
options.onUnusable(`${path} must be an object ${detail}. Leaving this configuration unapplied here; the same value is REFUSED on a template-path create.`);
|
|
@@ -10839,7 +10892,7 @@ function requireConfigObject(value, path, options) {
|
|
|
10839
10892
|
}
|
|
10840
10893
|
function configStringRefusal(container, key, fallback, containerPath, options) {
|
|
10841
10894
|
if (container === void 0 || container === null) return void 0;
|
|
10842
|
-
if (!isPlainObject$
|
|
10895
|
+
if (!isPlainObject$3(container) || isUnresolvedIntrinsicContainer(container)) return `${containerPath} must be an object ${malformedShapeDetail(container)}`;
|
|
10843
10896
|
return configValueRefusal(container[key], fallback, `${containerPath}.${key}`, options);
|
|
10844
10897
|
}
|
|
10845
10898
|
function coerceCfnBoolean(value) {
|
|
@@ -10852,7 +10905,7 @@ function coerceCfnBoolean(value) {
|
|
|
10852
10905
|
}
|
|
10853
10906
|
function configBooleanRefusal(container, key, containerPath) {
|
|
10854
10907
|
if (container === void 0 || container === null) return void 0;
|
|
10855
|
-
if (!isPlainObject$
|
|
10908
|
+
if (!isPlainObject$3(container) || isUnresolvedIntrinsicContainer(container)) return `${containerPath} must be an object ${malformedShapeDetail(container)}`;
|
|
10856
10909
|
const value = container[key];
|
|
10857
10910
|
if (value === void 0) return void 0;
|
|
10858
10911
|
if (coerceCfnBoolean(value) !== void 0) return void 0;
|
|
@@ -10866,7 +10919,7 @@ function coerceCfnInteger(value) {
|
|
|
10866
10919
|
}
|
|
10867
10920
|
function configIntegerRefusal(container, key, containerPath, min, max) {
|
|
10868
10921
|
if (container === void 0 || container === null) return void 0;
|
|
10869
|
-
if (!isPlainObject$
|
|
10922
|
+
if (!isPlainObject$3(container) || isUnresolvedIntrinsicContainer(container)) return `${containerPath} must be an object ${malformedShapeDetail(container)}`;
|
|
10870
10923
|
const value = container[key];
|
|
10871
10924
|
if (value === void 0) return void 0;
|
|
10872
10925
|
const n = coerceCfnInteger(value);
|
|
@@ -10880,10 +10933,10 @@ function configValueRefusal(value, fallback, path, options) {
|
|
|
10880
10933
|
if (typeof value !== "string" || value.trim() === "") return `${path} must be a non-empty string ${malformedShapeDetail(value)}`;
|
|
10881
10934
|
}
|
|
10882
10935
|
function malformedShapeDetail(value) {
|
|
10883
|
-
if (isPlainObject$
|
|
10936
|
+
if (isPlainObject$3(value) && isUnresolvedIntrinsicContainer(value)) return `(got ${describe(value)} — nothing substituted it before this call)`;
|
|
10884
10937
|
return `(got ${describe(value)}) — check for an unresolved intrinsic or a mis-nested template value`;
|
|
10885
10938
|
}
|
|
10886
|
-
function isPlainObject$
|
|
10939
|
+
function isPlainObject$3(value) {
|
|
10887
10940
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
10888
10941
|
}
|
|
10889
10942
|
const NAMEABLE_INTRINSIC_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -10910,7 +10963,7 @@ function describe(value) {
|
|
|
10910
10963
|
if (value === null) return "null";
|
|
10911
10964
|
if (Array.isArray(value)) return "an array";
|
|
10912
10965
|
if (typeof value === "string") return value.trim() === "" ? "a blank string" : "a string";
|
|
10913
|
-
if (isPlainObject$
|
|
10966
|
+
if (isPlainObject$3(value) && isUnresolvedIntrinsicContainer(value)) {
|
|
10914
10967
|
const key = Object.keys(value)[0];
|
|
10915
10968
|
return NAMEABLE_INTRINSIC_KEYS.has(key) ? `an unresolved ${key} intrinsic` : "an unresolved intrinsic";
|
|
10916
10969
|
}
|
|
@@ -15683,9 +15736,20 @@ function malformedOrphansForOrphanRefusalMessage(rawStackName, rawRegion, logica
|
|
|
15683
15736
|
return orphanRefusal(stackName, region, recovery, `${stackClause(stackName, region)} holds ${logicalIds.length} rollback-orphan record(s) in 'orphans' that cannot be read — ${namedOrphanRows(logicalIds)} — because the record has no string 'logicalId' or shares it with another row, or its 'state' is not an object, names no resource type, has no non-empty string 'physicalId', or holds a 'properties' or 'attributes' map that is not an object. The record is malformed or truncated. ${verbatim} Those records are not inert: they are what the next 'cdkd deploy' may re-adopt into 'resources' and what 'cdkd diff' previews for adoption, so continuing would report success over damage the next command meets.`, "'cdkd orphan' cannot remove such a record itself: it is not in 'resources', so it has no construct path. Repair the record by hand rather than deleting it — it is the only record that an earlier failed deploy left its resource live in AWS.", ORPHANS_DROP_CAVEAT);
|
|
15684
15737
|
}
|
|
15685
15738
|
|
|
15739
|
+
//#endregion
|
|
15740
|
+
//#region src/deployment/assumed-conditions.ts
|
|
15741
|
+
const assumedConditionNames = /* @__PURE__ */ new WeakMap();
|
|
15742
|
+
function recordAssumedConditions(conditions, assumed) {
|
|
15743
|
+
assumedConditionNames.set(conditions, assumed);
|
|
15744
|
+
}
|
|
15745
|
+
function conditionsAssumedFalse(conditions) {
|
|
15746
|
+
return assumedConditionNames.get(conditions) ?? /* @__PURE__ */ new Set();
|
|
15747
|
+
}
|
|
15748
|
+
|
|
15686
15749
|
//#endregion
|
|
15687
15750
|
//#region src/deployment/masked-property-fingerprints.ts
|
|
15688
15751
|
const FINGERPRINT_LAYOUT$1 = 1;
|
|
15752
|
+
const INPUT_FINGERPRINT_LAYOUT = 2;
|
|
15689
15753
|
function canonicalJson$2(value) {
|
|
15690
15754
|
if (value === void 0) return "null";
|
|
15691
15755
|
if (Array.isArray(value)) return `[${value.map(canonicalJson$2).join(",")}]`;
|
|
@@ -15697,6 +15761,20 @@ function canonicalJson$2(value) {
|
|
|
15697
15761
|
}
|
|
15698
15762
|
const REFUSED_FINGERPRINT = "refused:secret-in-template";
|
|
15699
15763
|
const FINGERPRINT_PREFIX = "sha256:";
|
|
15764
|
+
const INPUT_FINGERPRINT_PREFIX = "inputs-sha256:";
|
|
15765
|
+
const TEXT_HALF_SEPARATOR = "+";
|
|
15766
|
+
function splitInputFingerprint(entry) {
|
|
15767
|
+
const at = entry.indexOf(TEXT_HALF_SEPARATOR);
|
|
15768
|
+
if (at < 0) return {
|
|
15769
|
+
input: entry,
|
|
15770
|
+
text: void 0
|
|
15771
|
+
};
|
|
15772
|
+
const text = entry.slice(at + 1);
|
|
15773
|
+
return {
|
|
15774
|
+
input: entry.slice(0, at),
|
|
15775
|
+
text: text.startsWith(FINGERPRINT_PREFIX) ? text : void 0
|
|
15776
|
+
};
|
|
15777
|
+
}
|
|
15700
15778
|
function templateCarriesNeedle(templateValue, secrets) {
|
|
15701
15779
|
const text = canonicalJson$2(templateValue);
|
|
15702
15780
|
for (const needle of printingCorpusOf(secrets).keys()) {
|
|
@@ -15712,6 +15790,725 @@ function maskedPropertyFingerprint(templateValue) {
|
|
|
15712
15790
|
})).digest("hex");
|
|
15713
15791
|
return `${FINGERPRINT_PREFIX}${digest}`;
|
|
15714
15792
|
}
|
|
15793
|
+
var UnknownInput = class extends Error {};
|
|
15794
|
+
function isPlainObject$2(value) {
|
|
15795
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
15796
|
+
}
|
|
15797
|
+
const DYNAMIC_REFERENCE_OPEN = "{{resolve:";
|
|
15798
|
+
const NESTED_STACK_TYPE$2 = "AWS::CloudFormation::Stack";
|
|
15799
|
+
const NESTED_OUTPUT_PREFIX = "Outputs.";
|
|
15800
|
+
function carriesSecretValue(value, corpora) {
|
|
15801
|
+
if (carriesSecretMask(value)) return true;
|
|
15802
|
+
const text = canonicalJson$2(value);
|
|
15803
|
+
if (text.includes(DYNAMIC_REFERENCE_OPEN)) return true;
|
|
15804
|
+
for (const corpus of corpora) {
|
|
15805
|
+
if (corpus === void 0) continue;
|
|
15806
|
+
for (const needle of printingCorpusOf(corpus).keys()) {
|
|
15807
|
+
if (needle.length === 0) continue;
|
|
15808
|
+
if (text.includes(needle) || text.includes(JSON.stringify(needle).slice(1, -1))) return true;
|
|
15809
|
+
}
|
|
15810
|
+
}
|
|
15811
|
+
return false;
|
|
15812
|
+
}
|
|
15813
|
+
function parameterInputsFor(args) {
|
|
15814
|
+
const declared = isPlainObject$2(args.template.Parameters) ? args.template.Parameters : {};
|
|
15815
|
+
const values = args.values ?? {};
|
|
15816
|
+
const inputs = /* @__PURE__ */ new Map();
|
|
15817
|
+
const bound = {};
|
|
15818
|
+
for (const name of Object.keys(declared)) {
|
|
15819
|
+
const definition = declared[name];
|
|
15820
|
+
if (args.unbound?.has(name) || !Object.hasOwn(values, name)) {
|
|
15821
|
+
inputs.set(name, { kind: "unknown" });
|
|
15822
|
+
continue;
|
|
15823
|
+
}
|
|
15824
|
+
const value = values[name];
|
|
15825
|
+
let secret = isPlainObject$2(definition) && (definition["NoEcho"] === true || definition["NoEcho"] === "true") || carriesSecretValue(value, []);
|
|
15826
|
+
if (!secret && args.nestedChild === true && args.supplied !== void 0) {
|
|
15827
|
+
if (Object.hasOwn(args.supplied, name)) {
|
|
15828
|
+
const passed = args.passedClasses?.get(name);
|
|
15829
|
+
if (passed === "unknown") {
|
|
15830
|
+
inputs.set(name, { kind: "unknown" });
|
|
15831
|
+
continue;
|
|
15832
|
+
}
|
|
15833
|
+
if (passed !== "clean") secret = true;
|
|
15834
|
+
}
|
|
15835
|
+
}
|
|
15836
|
+
if (secret) inputs.set(name, { kind: "secret" });
|
|
15837
|
+
else {
|
|
15838
|
+
inputs.set(name, {
|
|
15839
|
+
kind: "value",
|
|
15840
|
+
value
|
|
15841
|
+
});
|
|
15842
|
+
bound[name] = value;
|
|
15843
|
+
}
|
|
15844
|
+
}
|
|
15845
|
+
return {
|
|
15846
|
+
parameterInput: (name) => inputs.get(name) ?? { kind: "unknown" },
|
|
15847
|
+
bound
|
|
15848
|
+
};
|
|
15849
|
+
}
|
|
15850
|
+
function newShared() {
|
|
15851
|
+
return {
|
|
15852
|
+
steps: 0,
|
|
15853
|
+
passed: /* @__PURE__ */ new Map(),
|
|
15854
|
+
outputs: /* @__PURE__ */ new Map(),
|
|
15855
|
+
rowsPassed: /* @__PURE__ */ new Map()
|
|
15856
|
+
};
|
|
15857
|
+
}
|
|
15858
|
+
function subPlaceholders(text) {
|
|
15859
|
+
const names = [];
|
|
15860
|
+
for (const match of text.matchAll(/\$\{([^}]*)\}/g)) {
|
|
15861
|
+
const body = match[1] ?? "";
|
|
15862
|
+
if (body.startsWith("!") || body.length === 0) continue;
|
|
15863
|
+
if (!names.includes(body)) names.push(body);
|
|
15864
|
+
}
|
|
15865
|
+
return names;
|
|
15866
|
+
}
|
|
15867
|
+
function intrinsicKey(value) {
|
|
15868
|
+
const keys = Object.keys(value);
|
|
15869
|
+
if (keys.length !== 1) return void 0;
|
|
15870
|
+
const key = keys[0];
|
|
15871
|
+
return key === "Ref" || key.startsWith("Fn::") ? key : void 0;
|
|
15872
|
+
}
|
|
15873
|
+
const OPAQUE_ATTRIBUTE_TYPES = /* @__PURE__ */ new Set(["AWS::CloudFormation::CustomResource", NESTED_STACK_TYPE$2]);
|
|
15874
|
+
function hasOpaqueAttributes(logicalId, walk) {
|
|
15875
|
+
const definition = walk.resources[logicalId];
|
|
15876
|
+
const type = isPlainObject$2(definition) ? definition["Type"] : void 0;
|
|
15877
|
+
return typeof type === "string" && (type.startsWith("Custom::") || OPAQUE_ATTRIBUTE_TYPES.has(type));
|
|
15878
|
+
}
|
|
15879
|
+
function getAttTarget(operand) {
|
|
15880
|
+
if (Array.isArray(operand) && typeof operand[0] === "string") return operand[0];
|
|
15881
|
+
if (typeof operand === "string" && operand.includes(".")) return operand.split(".")[0];
|
|
15882
|
+
}
|
|
15883
|
+
function taintOf(logicalId, walk) {
|
|
15884
|
+
const cached = walk.taint.get(logicalId);
|
|
15885
|
+
if (cached !== void 0) return cached;
|
|
15886
|
+
if (walk.inProgress.has(logicalId)) return "tainted";
|
|
15887
|
+
walk.inProgress.add(logicalId);
|
|
15888
|
+
let unknown = false;
|
|
15889
|
+
const nameTaint = (name) => {
|
|
15890
|
+
if (name.startsWith("AWS::")) return "clean";
|
|
15891
|
+
if (Object.hasOwn(walk.resources, name)) return taintOf(name, walk);
|
|
15892
|
+
if (Object.hasOwn(walk.parameters, name)) {
|
|
15893
|
+
const input = walk.sources.parameterInput(name);
|
|
15894
|
+
return input.kind === "value" ? "clean" : input.kind === "secret" ? "tainted" : "unknown";
|
|
15895
|
+
}
|
|
15896
|
+
return "tainted";
|
|
15897
|
+
};
|
|
15898
|
+
const visit = (value) => {
|
|
15899
|
+
if (typeof value === "string") return value.includes(DYNAMIC_REFERENCE_OPEN);
|
|
15900
|
+
if (Array.isArray(value)) return value.some(visit);
|
|
15901
|
+
if (!isPlainObject$2(value)) return false;
|
|
15902
|
+
const key = intrinsicKey(value);
|
|
15903
|
+
const operand = key === void 0 ? void 0 : value[key];
|
|
15904
|
+
let verdict = "clean";
|
|
15905
|
+
if (key === "Ref" && typeof operand === "string") verdict = nameTaint(operand);
|
|
15906
|
+
else if (key === "Fn::GetAtt") {
|
|
15907
|
+
const target = getAttTarget(operand);
|
|
15908
|
+
verdict = target === void 0 || Object.hasOwn(walk.resources, target) && hasOpaqueAttributes(target, walk) ? "tainted" : nameTaint(target);
|
|
15909
|
+
} else if (key === "Fn::ImportValue" || key === "Fn::GetStackOutput") verdict = "tainted";
|
|
15910
|
+
else if (key === "Fn::FindInMap" && mapReadClass(operand, walk.sources.template) !== "clean") verdict = "tainted";
|
|
15911
|
+
else if (key === "Fn::Sub") {
|
|
15912
|
+
const text = Array.isArray(operand) ? operand[0] : operand;
|
|
15913
|
+
const vars = Array.isArray(operand) && isPlainObject$2(operand[1]) ? operand[1] : {};
|
|
15914
|
+
if (typeof text === "string") for (const name of subPlaceholders(text)) {
|
|
15915
|
+
if (Object.hasOwn(vars, name)) continue;
|
|
15916
|
+
const owner = name.includes(".") ? name.split(".")[0] : name;
|
|
15917
|
+
const t = name.includes(".") && Object.hasOwn(walk.resources, owner) && hasOpaqueAttributes(owner, walk) ? "tainted" : nameTaint(owner);
|
|
15918
|
+
if (t === "tainted") return true;
|
|
15919
|
+
if (t === "unknown") unknown = true;
|
|
15920
|
+
}
|
|
15921
|
+
}
|
|
15922
|
+
if (verdict === "tainted") return true;
|
|
15923
|
+
if (verdict === "unknown") unknown = true;
|
|
15924
|
+
return Object.values(value).some(visit);
|
|
15925
|
+
};
|
|
15926
|
+
const definition = walk.resources[logicalId];
|
|
15927
|
+
const result = visit(isPlainObject$2(definition) ? definition["Properties"] : void 0) ? "tainted" : unknown ? "unknown" : "clean";
|
|
15928
|
+
walk.inProgress.delete(logicalId);
|
|
15929
|
+
walk.taint.set(logicalId, result);
|
|
15930
|
+
return result;
|
|
15931
|
+
}
|
|
15932
|
+
function conditionInput(name, walk) {
|
|
15933
|
+
const closure = conditionClosure(name, walk);
|
|
15934
|
+
if (closure.unknown || closure.unread) return "unknown";
|
|
15935
|
+
if (closure.secret) return "secret";
|
|
15936
|
+
const conditions = walk.sources.conditions;
|
|
15937
|
+
if (conditions === void 0 || !Object.hasOwn(conditions, name)) return "unknown";
|
|
15938
|
+
if (conditionsAssumedFalse(conditions).has(name)) return "unknown";
|
|
15939
|
+
const verdict = conditions[name];
|
|
15940
|
+
return typeof verdict === "boolean" ? verdict : "unknown";
|
|
15941
|
+
}
|
|
15942
|
+
function conditionClosure(name, walk) {
|
|
15943
|
+
const definitions = isPlainObject$2(walk.sources.template.Conditions) ? walk.sources.template.Conditions : {};
|
|
15944
|
+
let secret = false;
|
|
15945
|
+
let unknown = false;
|
|
15946
|
+
let unread = false;
|
|
15947
|
+
const seen = /* @__PURE__ */ new Set();
|
|
15948
|
+
const pending = [name];
|
|
15949
|
+
const visit = (value) => {
|
|
15950
|
+
if (typeof value === "string") {
|
|
15951
|
+
if (value.includes(DYNAMIC_REFERENCE_OPEN)) secret = true;
|
|
15952
|
+
return;
|
|
15953
|
+
}
|
|
15954
|
+
if (Array.isArray(value)) {
|
|
15955
|
+
value.forEach(visit);
|
|
15956
|
+
return;
|
|
15957
|
+
}
|
|
15958
|
+
if (!isPlainObject$2(value)) return;
|
|
15959
|
+
const keys = Object.keys(value);
|
|
15960
|
+
if (keys.length === 1 && keys[0] === "Condition" && typeof value["Condition"] === "string") {
|
|
15961
|
+
pending.push(value["Condition"]);
|
|
15962
|
+
return;
|
|
15963
|
+
}
|
|
15964
|
+
const classifyName = (ref) => {
|
|
15965
|
+
if (ref.startsWith("AWS::")) return;
|
|
15966
|
+
if (!Object.hasOwn(walk.parameters, ref)) {
|
|
15967
|
+
unknown = true;
|
|
15968
|
+
return;
|
|
15969
|
+
}
|
|
15970
|
+
const input = walk.sources.parameterInput(ref);
|
|
15971
|
+
if (input.kind === "secret") secret = true;
|
|
15972
|
+
if (input.kind === "unknown") unread = true;
|
|
15973
|
+
};
|
|
15974
|
+
if (keys.length === 1 && keys[0] === "Ref" && typeof value["Ref"] === "string") {
|
|
15975
|
+
classifyName(value["Ref"]);
|
|
15976
|
+
return;
|
|
15977
|
+
}
|
|
15978
|
+
const key = keys.length === 1 ? keys[0] : void 0;
|
|
15979
|
+
if (key === "Fn::FindInMap") {
|
|
15980
|
+
const read = mapReadClass(value["Fn::FindInMap"], walk.sources.template);
|
|
15981
|
+
if (read === "secret") secret = true;
|
|
15982
|
+
if (read === "unknown") unknown = true;
|
|
15983
|
+
}
|
|
15984
|
+
if (key === "Fn::ImportValue" || key === "Fn::GetStackOutput" || key === "Fn::GetAtt") {
|
|
15985
|
+
secret = true;
|
|
15986
|
+
return;
|
|
15987
|
+
}
|
|
15988
|
+
if (key === "Fn::Sub") {
|
|
15989
|
+
const operand = value["Fn::Sub"];
|
|
15990
|
+
const text = Array.isArray(operand) ? operand[0] : operand;
|
|
15991
|
+
const vars = Array.isArray(operand) && isPlainObject$2(operand[1]) ? operand[1] : {};
|
|
15992
|
+
if (typeof text === "string") for (const name of subPlaceholders(text)) {
|
|
15993
|
+
if (Object.hasOwn(vars, name)) continue;
|
|
15994
|
+
if (name.includes(".") && !name.startsWith("AWS::")) secret = true;
|
|
15995
|
+
else classifyName(name);
|
|
15996
|
+
}
|
|
15997
|
+
}
|
|
15998
|
+
Object.values(value).forEach(visit);
|
|
15999
|
+
};
|
|
16000
|
+
while (pending.length > 0) {
|
|
16001
|
+
const current = pending.pop();
|
|
16002
|
+
if (seen.has(current)) continue;
|
|
16003
|
+
seen.add(current);
|
|
16004
|
+
if (!Object.hasOwn(definitions, current)) {
|
|
16005
|
+
unknown = true;
|
|
16006
|
+
continue;
|
|
16007
|
+
}
|
|
16008
|
+
visit(definitions[current]);
|
|
16009
|
+
}
|
|
16010
|
+
return {
|
|
16011
|
+
secret,
|
|
16012
|
+
unknown,
|
|
16013
|
+
unread
|
|
16014
|
+
};
|
|
16015
|
+
}
|
|
16016
|
+
function mapReadClass(operand, template) {
|
|
16017
|
+
const mapName = Array.isArray(operand) ? operand[0] : void 0;
|
|
16018
|
+
if (typeof mapName !== "string") return "unknown";
|
|
16019
|
+
const mappings = template.Mappings;
|
|
16020
|
+
const map = isPlainObject$2(mappings) && Object.hasOwn(mappings, mapName) ? mappings[mapName] : void 0;
|
|
16021
|
+
if (!isPlainObject$2(map)) return "unknown";
|
|
16022
|
+
return carriesSecretValue(map, []) ? "secret" : "clean";
|
|
16023
|
+
}
|
|
16024
|
+
async function resolvedInput(node, walk) {
|
|
16025
|
+
let resolved;
|
|
16026
|
+
try {
|
|
16027
|
+
resolved = await walk.sources.resolve(node);
|
|
16028
|
+
} catch {
|
|
16029
|
+
throw new UnknownInput();
|
|
16030
|
+
}
|
|
16031
|
+
if (resolved.keepAsWritten === true || carriesSecretValue(resolved.value, [resolved.secrets])) return {
|
|
16032
|
+
form: node,
|
|
16033
|
+
concrete: false
|
|
16034
|
+
};
|
|
16035
|
+
return {
|
|
16036
|
+
form: resolved.value,
|
|
16037
|
+
concrete: true
|
|
16038
|
+
};
|
|
16039
|
+
}
|
|
16040
|
+
async function nameInput(name, node, walk) {
|
|
16041
|
+
if (name === "AWS::NoValue") return {
|
|
16042
|
+
form: node,
|
|
16043
|
+
concrete: false
|
|
16044
|
+
};
|
|
16045
|
+
if (name.startsWith("AWS::")) return resolvedInput(node, walk);
|
|
16046
|
+
if (Object.hasOwn(walk.resources, name)) {
|
|
16047
|
+
const taint = taintOf(name, walk);
|
|
16048
|
+
if (taint === "unknown") throw new UnknownInput();
|
|
16049
|
+
if (taint === "tainted") return {
|
|
16050
|
+
form: node,
|
|
16051
|
+
concrete: false
|
|
16052
|
+
};
|
|
16053
|
+
return resolvedInput(node, walk);
|
|
16054
|
+
}
|
|
16055
|
+
if (Object.hasOwn(walk.parameters, name)) {
|
|
16056
|
+
const input = walk.sources.parameterInput(name);
|
|
16057
|
+
if (input.kind === "unknown") throw new UnknownInput();
|
|
16058
|
+
if (input.kind === "secret") return {
|
|
16059
|
+
form: node,
|
|
16060
|
+
concrete: false
|
|
16061
|
+
};
|
|
16062
|
+
return {
|
|
16063
|
+
form: input.value,
|
|
16064
|
+
concrete: true
|
|
16065
|
+
};
|
|
16066
|
+
}
|
|
16067
|
+
return {
|
|
16068
|
+
form: node,
|
|
16069
|
+
concrete: false
|
|
16070
|
+
};
|
|
16071
|
+
}
|
|
16072
|
+
async function inputForms(values, walk) {
|
|
16073
|
+
const parts = [];
|
|
16074
|
+
for (const element of values) parts.push(await inputForm(element, walk));
|
|
16075
|
+
return parts;
|
|
16076
|
+
}
|
|
16077
|
+
async function inputForm(value, walk) {
|
|
16078
|
+
if (typeof value === "string") return {
|
|
16079
|
+
form: value,
|
|
16080
|
+
concrete: !value.includes(DYNAMIC_REFERENCE_OPEN)
|
|
16081
|
+
};
|
|
16082
|
+
if (Array.isArray(value)) {
|
|
16083
|
+
const parts = await inputForms(value, walk);
|
|
16084
|
+
return {
|
|
16085
|
+
form: parts.map((p) => p.form),
|
|
16086
|
+
concrete: parts.every((p) => p.concrete)
|
|
16087
|
+
};
|
|
16088
|
+
}
|
|
16089
|
+
if (!isPlainObject$2(value)) return {
|
|
16090
|
+
form: value,
|
|
16091
|
+
concrete: true
|
|
16092
|
+
};
|
|
16093
|
+
const key = intrinsicKey(value);
|
|
16094
|
+
if (key === void 0) {
|
|
16095
|
+
const entries = Object.keys(value);
|
|
16096
|
+
const parts = await inputForms(entries.map((k) => value[k]), walk);
|
|
16097
|
+
return {
|
|
16098
|
+
form: Object.fromEntries(entries.map((k, i) => [k, parts[i].form])),
|
|
16099
|
+
concrete: parts.every((p) => p.concrete)
|
|
16100
|
+
};
|
|
16101
|
+
}
|
|
16102
|
+
const operand = value[key];
|
|
16103
|
+
switch (key) {
|
|
16104
|
+
case "Ref": return typeof operand === "string" ? nameInput(operand, value, walk) : {
|
|
16105
|
+
form: value,
|
|
16106
|
+
concrete: false
|
|
16107
|
+
};
|
|
16108
|
+
case "Fn::GetAtt": {
|
|
16109
|
+
const target = getAttTarget(operand);
|
|
16110
|
+
if (target !== void 0 && isNestedStackRow(target, walk)) return nestedOutputInput(target, getAttAttribute(operand, target), value, walk);
|
|
16111
|
+
if (target === void 0 || !Object.hasOwn(walk.resources, target) || hasOpaqueAttributes(target, walk)) return {
|
|
16112
|
+
form: value,
|
|
16113
|
+
concrete: false
|
|
16114
|
+
};
|
|
16115
|
+
if (Array.isArray(operand) && operand.length > 1 && typeof operand[1] !== "string") {
|
|
16116
|
+
const attribute = await inputForm(operand[1], walk);
|
|
16117
|
+
if (!attribute.concrete) return {
|
|
16118
|
+
form: { [key]: [operand[0], attribute.form] },
|
|
16119
|
+
concrete: false
|
|
16120
|
+
};
|
|
16121
|
+
}
|
|
16122
|
+
return nameInput(target, value, walk);
|
|
16123
|
+
}
|
|
16124
|
+
case "Fn::If": {
|
|
16125
|
+
if (!Array.isArray(operand) || typeof operand[0] !== "string") {
|
|
16126
|
+
const args = await inputForm(operand, walk);
|
|
16127
|
+
return {
|
|
16128
|
+
form: { [key]: args.form },
|
|
16129
|
+
concrete: false
|
|
16130
|
+
};
|
|
16131
|
+
}
|
|
16132
|
+
const verdict = conditionInput(operand[0], walk);
|
|
16133
|
+
if (verdict === "unknown") throw new UnknownInput();
|
|
16134
|
+
if (verdict === "secret") {
|
|
16135
|
+
const args = await inputForm(operand.slice(1), walk);
|
|
16136
|
+
return {
|
|
16137
|
+
form: { [key]: [operand[0], ...args.form] },
|
|
16138
|
+
concrete: false
|
|
16139
|
+
};
|
|
16140
|
+
}
|
|
16141
|
+
return inputForm(verdict ? operand[1] : operand[2], walk);
|
|
16142
|
+
}
|
|
16143
|
+
case "Fn::Sub": {
|
|
16144
|
+
const text = Array.isArray(operand) ? operand[0] : operand;
|
|
16145
|
+
if (typeof text !== "string") {
|
|
16146
|
+
const args = await inputForm(operand, walk);
|
|
16147
|
+
return {
|
|
16148
|
+
form: { [key]: args.form },
|
|
16149
|
+
concrete: false
|
|
16150
|
+
};
|
|
16151
|
+
}
|
|
16152
|
+
const explicit = Array.isArray(operand) && isPlainObject$2(operand[1]) ? operand[1] : {};
|
|
16153
|
+
const vars = await inputForm(explicit, walk);
|
|
16154
|
+
const placeholders = [];
|
|
16155
|
+
let concrete = vars.concrete && !text.includes(DYNAMIC_REFERENCE_OPEN);
|
|
16156
|
+
for (const name of subPlaceholders(text)) {
|
|
16157
|
+
if (Object.hasOwn(explicit, name)) continue;
|
|
16158
|
+
const dot = name.indexOf(".");
|
|
16159
|
+
const part = dot > 0 && !name.startsWith("AWS::") && isNestedStackRow(name.slice(0, dot), walk) ? await nestedOutputInput(name.slice(0, dot), name.slice(dot + 1), { "Fn::GetAtt": [name.slice(0, dot), name.slice(dot + 1)] }, walk) : dot > 0 && !name.startsWith("AWS::") ? Object.hasOwn(walk.resources, name.slice(0, dot)) && !hasOpaqueAttributes(name.slice(0, dot), walk) ? await nameInput(name.slice(0, dot), { "Fn::GetAtt": [name.slice(0, dot), name.slice(dot + 1)] }, walk) : {
|
|
16160
|
+
form: { "Fn::GetAtt": [name.slice(0, dot), name.slice(dot + 1)] },
|
|
16161
|
+
concrete: false
|
|
16162
|
+
} : await nameInput(name, { Ref: name }, walk);
|
|
16163
|
+
placeholders.push([name, part.form]);
|
|
16164
|
+
concrete &&= part.concrete;
|
|
16165
|
+
}
|
|
16166
|
+
return {
|
|
16167
|
+
form: { [key]: [
|
|
16168
|
+
text,
|
|
16169
|
+
vars.form,
|
|
16170
|
+
Object.fromEntries(placeholders)
|
|
16171
|
+
] },
|
|
16172
|
+
concrete
|
|
16173
|
+
};
|
|
16174
|
+
}
|
|
16175
|
+
case "Fn::ImportValue":
|
|
16176
|
+
case "Fn::GetStackOutput":
|
|
16177
|
+
case "Fn::FindInMap":
|
|
16178
|
+
case "Fn::GetAZs": {
|
|
16179
|
+
const args = await inputForm(operand, walk);
|
|
16180
|
+
if (!args.concrete) return {
|
|
16181
|
+
form: { [key]: args.form },
|
|
16182
|
+
concrete: false
|
|
16183
|
+
};
|
|
16184
|
+
const resolved = await resolvedInput(value, walk);
|
|
16185
|
+
return resolved.concrete ? resolved : {
|
|
16186
|
+
form: { [key]: args.form },
|
|
16187
|
+
concrete: false
|
|
16188
|
+
};
|
|
16189
|
+
}
|
|
16190
|
+
default: {
|
|
16191
|
+
const args = await inputForm(operand, walk);
|
|
16192
|
+
return {
|
|
16193
|
+
form: { [key]: args.form },
|
|
16194
|
+
concrete: args.concrete
|
|
16195
|
+
};
|
|
16196
|
+
}
|
|
16197
|
+
}
|
|
16198
|
+
}
|
|
16199
|
+
function newWalk(sources, nested = {
|
|
16200
|
+
stackChain: /* @__PURE__ */ new Set(),
|
|
16201
|
+
shared: newShared()
|
|
16202
|
+
}) {
|
|
16203
|
+
return {
|
|
16204
|
+
sources,
|
|
16205
|
+
resources: isPlainObject$2(sources.template.Resources) ? sources.template.Resources : {},
|
|
16206
|
+
parameters: isPlainObject$2(sources.template.Parameters) ? sources.template.Parameters : {},
|
|
16207
|
+
taint: /* @__PURE__ */ new Map(),
|
|
16208
|
+
inProgress: /* @__PURE__ */ new Set(),
|
|
16209
|
+
stackChain: nested.stackChain,
|
|
16210
|
+
shared: nested.shared
|
|
16211
|
+
};
|
|
16212
|
+
}
|
|
16213
|
+
const NESTED_OUTPUT_ORDER = {
|
|
16214
|
+
clean: 0,
|
|
16215
|
+
unread: 1,
|
|
16216
|
+
unknown: 2,
|
|
16217
|
+
secret: 3
|
|
16218
|
+
};
|
|
16219
|
+
function worseOf(a, b) {
|
|
16220
|
+
return NESTED_OUTPUT_ORDER[a] >= NESTED_OUTPUT_ORDER[b] ? a : b;
|
|
16221
|
+
}
|
|
16222
|
+
const MAX_NESTED_OUTPUT_DEPTH = 32;
|
|
16223
|
+
const MAX_NESTED_OUTPUT_STEPS = 1e4;
|
|
16224
|
+
function passedKey(passed) {
|
|
16225
|
+
return JSON.stringify([...passed.entries()]);
|
|
16226
|
+
}
|
|
16227
|
+
function isNestedStackRow(logicalId, walk) {
|
|
16228
|
+
if (!Object.hasOwn(walk.resources, logicalId)) return false;
|
|
16229
|
+
const definition = walk.resources[logicalId];
|
|
16230
|
+
return isPlainObject$2(definition) && definition["Type"] === NESTED_STACK_TYPE$2;
|
|
16231
|
+
}
|
|
16232
|
+
function getAttAttribute(operand, target) {
|
|
16233
|
+
if (Array.isArray(operand)) return operand.length === 2 && typeof operand[1] === "string" ? operand[1] : void 0;
|
|
16234
|
+
return typeof operand === "string" ? operand.slice(target.length + 1) : void 0;
|
|
16235
|
+
}
|
|
16236
|
+
function rowParameters(definition) {
|
|
16237
|
+
const properties = isPlainObject$2(definition) ? definition["Properties"] : void 0;
|
|
16238
|
+
if (properties === void 0) return {};
|
|
16239
|
+
if (!isPlainObject$2(properties)) return "unknown";
|
|
16240
|
+
const parameters = properties["Parameters"];
|
|
16241
|
+
if (parameters === void 0) return {};
|
|
16242
|
+
if (!isPlainObject$2(parameters) || intrinsicKey(parameters) !== void 0) return "unknown";
|
|
16243
|
+
return parameters;
|
|
16244
|
+
}
|
|
16245
|
+
function childParameterInputs(template, passed) {
|
|
16246
|
+
const declared = isPlainObject$2(template.Parameters) ? template.Parameters : {};
|
|
16247
|
+
const inputs = /* @__PURE__ */ new Map();
|
|
16248
|
+
for (const name of Object.keys(declared)) {
|
|
16249
|
+
const definition = declared[name];
|
|
16250
|
+
if (isPlainObject$2(definition) && (definition["NoEcho"] === true || definition["NoEcho"] === "true")) inputs.set(name, { kind: "secret" });
|
|
16251
|
+
else if (passed.has(name)) {
|
|
16252
|
+
const passedClass = passed.get(name);
|
|
16253
|
+
inputs.set(name, passedClass === "clean" ? {
|
|
16254
|
+
kind: "value",
|
|
16255
|
+
value: void 0
|
|
16256
|
+
} : passedClass === "unknown" ? { kind: "unknown" } : { kind: "secret" });
|
|
16257
|
+
} else if (isPlainObject$2(definition) && Object.hasOwn(definition, "Default") && !carriesSecretValue(definition["Default"], [])) inputs.set(name, {
|
|
16258
|
+
kind: "value",
|
|
16259
|
+
value: definition["Default"]
|
|
16260
|
+
});
|
|
16261
|
+
else inputs.set(name, { kind: "secret" });
|
|
16262
|
+
}
|
|
16263
|
+
return (name) => inputs.get(name) ?? { kind: "secret" };
|
|
16264
|
+
}
|
|
16265
|
+
function taintClass(taint) {
|
|
16266
|
+
return taint === "clean" ? "clean" : taint === "tainted" ? "secret" : "unread";
|
|
16267
|
+
}
|
|
16268
|
+
function closureClass(closure) {
|
|
16269
|
+
if (closure.secret) return "secret";
|
|
16270
|
+
if (closure.unknown) return "unknown";
|
|
16271
|
+
return closure.unread ? "unread" : "clean";
|
|
16272
|
+
}
|
|
16273
|
+
async function childOutputClass(loaded, outputName, passed, chain, shared) {
|
|
16274
|
+
if (loaded === void 0 || !isPlainObject$2(loaded.template)) return "unknown";
|
|
16275
|
+
const scopeKey = JSON.stringify([loaded.identity, passedKey(passed)]);
|
|
16276
|
+
const memoKey = JSON.stringify([scopeKey, outputName]);
|
|
16277
|
+
const memo = shared.outputs.get(memoKey);
|
|
16278
|
+
if (memo !== void 0) return memo;
|
|
16279
|
+
const outputClass = await classifyChildOutput(loaded, outputName, passed, chain, shared, scopeKey);
|
|
16280
|
+
shared.outputs.set(memoKey, outputClass);
|
|
16281
|
+
return outputClass;
|
|
16282
|
+
}
|
|
16283
|
+
async function classifyChildOutput(loaded, outputName, passed, chain, shared, scopeKey) {
|
|
16284
|
+
if (++shared.steps > MAX_NESTED_OUTPUT_STEPS) return "unknown";
|
|
16285
|
+
if (chain.includes(loaded.identity) || chain.length >= MAX_NESTED_OUTPUT_DEPTH) return "unknown";
|
|
16286
|
+
const template = loaded.template;
|
|
16287
|
+
const output = (isPlainObject$2(template.Outputs) ? template.Outputs : {})[outputName];
|
|
16288
|
+
if (!isPlainObject$2(output) || !Object.hasOwn(output, "Value")) return "unknown";
|
|
16289
|
+
const scope = {
|
|
16290
|
+
walk: newWalk({
|
|
16291
|
+
template,
|
|
16292
|
+
parameterInput: childParameterInputs(template, passed),
|
|
16293
|
+
resolve: () => Promise.reject(/* @__PURE__ */ new Error("a nested output is classified, never resolved"))
|
|
16294
|
+
}),
|
|
16295
|
+
childTemplate: loaded.childTemplate,
|
|
16296
|
+
chain: [...chain, loaded.identity],
|
|
16297
|
+
rows: /* @__PURE__ */ new Set(),
|
|
16298
|
+
key: scopeKey,
|
|
16299
|
+
shared
|
|
16300
|
+
};
|
|
16301
|
+
let outputClass = "clean";
|
|
16302
|
+
if (Object.hasOwn(output, "Condition")) {
|
|
16303
|
+
const condition = output["Condition"];
|
|
16304
|
+
outputClass = typeof condition === "string" ? closureClass(conditionClosure(condition, scope.walk)) : "unknown";
|
|
16305
|
+
}
|
|
16306
|
+
return worseOf(outputClass, await expressionClass(output["Value"], scope));
|
|
16307
|
+
}
|
|
16308
|
+
function nameClass(name, scope) {
|
|
16309
|
+
if (name.startsWith("AWS::")) return "clean";
|
|
16310
|
+
const walk = scope.walk;
|
|
16311
|
+
if (Object.hasOwn(walk.resources, name)) return taintClass(taintOf(name, walk));
|
|
16312
|
+
if (Object.hasOwn(walk.parameters, name)) {
|
|
16313
|
+
const input = walk.sources.parameterInput(name);
|
|
16314
|
+
return input.kind === "value" ? "clean" : input.kind === "secret" ? "secret" : "unread";
|
|
16315
|
+
}
|
|
16316
|
+
return "secret";
|
|
16317
|
+
}
|
|
16318
|
+
async function attributeClass(target, attribute, scope) {
|
|
16319
|
+
const walk = scope.walk;
|
|
16320
|
+
if (!Object.hasOwn(walk.resources, target)) return "secret";
|
|
16321
|
+
if (isNestedStackRow(target, walk)) {
|
|
16322
|
+
if (attribute === void 0 || !attribute.startsWith(NESTED_OUTPUT_PREFIX)) return "unknown";
|
|
16323
|
+
if (scope.rows.has(target)) return "unknown";
|
|
16324
|
+
const parameters = rowParameters(walk.resources[target]);
|
|
16325
|
+
if (parameters === "unknown") return "unknown";
|
|
16326
|
+
const rowKey = JSON.stringify([scope.key, target]);
|
|
16327
|
+
let passed = scope.shared.rowsPassed.get(rowKey);
|
|
16328
|
+
if (passed === void 0) {
|
|
16329
|
+
const inner = {
|
|
16330
|
+
...scope,
|
|
16331
|
+
rows: /* @__PURE__ */ new Set([...scope.rows, target])
|
|
16332
|
+
};
|
|
16333
|
+
const classes = /* @__PURE__ */ new Map();
|
|
16334
|
+
for (const [name, expression] of Object.entries(parameters)) {
|
|
16335
|
+
const passedClass = await expressionClass(expression, inner);
|
|
16336
|
+
classes.set(name, passedClass === "clean" ? "clean" : passedClass === "unread" ? "unknown" : "secret");
|
|
16337
|
+
}
|
|
16338
|
+
scope.shared.rowsPassed.set(rowKey, classes);
|
|
16339
|
+
passed = classes;
|
|
16340
|
+
}
|
|
16341
|
+
let loaded;
|
|
16342
|
+
try {
|
|
16343
|
+
loaded = scope.childTemplate(target);
|
|
16344
|
+
} catch {
|
|
16345
|
+
loaded = void 0;
|
|
16346
|
+
}
|
|
16347
|
+
return childOutputClass(loaded, attribute.slice(8), passed, scope.chain, scope.shared);
|
|
16348
|
+
}
|
|
16349
|
+
if (hasOpaqueAttributes(target, walk)) return "unknown";
|
|
16350
|
+
return taintClass(taintOf(target, walk));
|
|
16351
|
+
}
|
|
16352
|
+
async function expressionClass(value, scope) {
|
|
16353
|
+
if (typeof value === "string") return value.includes(DYNAMIC_REFERENCE_OPEN) ? "secret" : "clean";
|
|
16354
|
+
const all = async (values) => {
|
|
16355
|
+
let result = "clean";
|
|
16356
|
+
for (const element of values) result = worseOf(result, await expressionClass(element, scope));
|
|
16357
|
+
return result;
|
|
16358
|
+
};
|
|
16359
|
+
if (Array.isArray(value)) return all(value);
|
|
16360
|
+
if (!isPlainObject$2(value)) return "clean";
|
|
16361
|
+
const key = intrinsicKey(value);
|
|
16362
|
+
if (key === void 0) return all(Object.values(value));
|
|
16363
|
+
const operand = value[key];
|
|
16364
|
+
switch (key) {
|
|
16365
|
+
case "Ref": return typeof operand === "string" ? nameClass(operand, scope) : "unknown";
|
|
16366
|
+
case "Fn::GetAtt": {
|
|
16367
|
+
const target = getAttTarget(operand);
|
|
16368
|
+
if (target === void 0) return "secret";
|
|
16369
|
+
const attribute = getAttAttribute(operand, target);
|
|
16370
|
+
return worseOf(attribute === void 0 && Array.isArray(operand) ? await all(operand.slice(1)) : "clean", await attributeClass(target, attribute, scope));
|
|
16371
|
+
}
|
|
16372
|
+
case "Fn::Sub": {
|
|
16373
|
+
const text = Array.isArray(operand) ? operand[0] : operand;
|
|
16374
|
+
if (typeof text !== "string") return worseOf("unknown", await expressionClass(operand, scope));
|
|
16375
|
+
const vars = Array.isArray(operand) && isPlainObject$2(operand[1]) ? operand[1] : {};
|
|
16376
|
+
let result = text.includes(DYNAMIC_REFERENCE_OPEN) ? "secret" : "clean";
|
|
16377
|
+
result = worseOf(result, await all(Object.values(vars)));
|
|
16378
|
+
for (const name of subPlaceholders(text)) {
|
|
16379
|
+
if (Object.hasOwn(vars, name)) continue;
|
|
16380
|
+
const dot = name.indexOf(".");
|
|
16381
|
+
result = worseOf(result, dot > 0 && !name.startsWith("AWS::") ? await attributeClass(name.slice(0, dot), name.slice(dot + 1), scope) : nameClass(name, scope));
|
|
16382
|
+
}
|
|
16383
|
+
return result;
|
|
16384
|
+
}
|
|
16385
|
+
case "Fn::If":
|
|
16386
|
+
if (!Array.isArray(operand) || operand.length !== 3 || typeof operand[0] !== "string") return worseOf("unknown", await expressionClass(operand, scope));
|
|
16387
|
+
return worseOf(closureClass(conditionClosure(operand[0], scope.walk)), await all(operand.slice(1)));
|
|
16388
|
+
case "Fn::ImportValue":
|
|
16389
|
+
case "Fn::GetStackOutput": return "secret";
|
|
16390
|
+
case "Fn::FindInMap": {
|
|
16391
|
+
const read = mapReadClass(operand, scope.walk.sources.template);
|
|
16392
|
+
if (read === "unknown") return worseOf("unknown", await all([operand]));
|
|
16393
|
+
return worseOf(read, await all(operand.slice(1)));
|
|
16394
|
+
}
|
|
16395
|
+
default: return expressionClass(operand, scope);
|
|
16396
|
+
}
|
|
16397
|
+
}
|
|
16398
|
+
async function stackOutputClass(stackLogicalId, attribute, walk) {
|
|
16399
|
+
const loader = walk.sources.childTemplate;
|
|
16400
|
+
if (loader === void 0 || !isNestedStackRow(stackLogicalId, walk)) return "unknown";
|
|
16401
|
+
if (attribute === void 0 || !attribute.startsWith(NESTED_OUTPUT_PREFIX)) return "unknown";
|
|
16402
|
+
if (walk.stackChain.has(stackLogicalId)) return "unknown";
|
|
16403
|
+
const parameters = rowParameters(walk.resources[stackLogicalId]);
|
|
16404
|
+
if (parameters === "unknown") return "unknown";
|
|
16405
|
+
let passed = walk.shared.passed.get(stackLogicalId);
|
|
16406
|
+
if (passed === void 0) {
|
|
16407
|
+
if (++walk.shared.steps > MAX_NESTED_OUTPUT_STEPS) return "unknown";
|
|
16408
|
+
passed = await classifyPassed(parameters, walk.sources, {
|
|
16409
|
+
stackChain: /* @__PURE__ */ new Set([...walk.stackChain, stackLogicalId]),
|
|
16410
|
+
shared: walk.shared
|
|
16411
|
+
});
|
|
16412
|
+
walk.shared.passed.set(stackLogicalId, passed);
|
|
16413
|
+
}
|
|
16414
|
+
let loaded;
|
|
16415
|
+
try {
|
|
16416
|
+
loaded = loader(stackLogicalId);
|
|
16417
|
+
} catch {
|
|
16418
|
+
loaded = void 0;
|
|
16419
|
+
}
|
|
16420
|
+
return childOutputClass(loaded, attribute.slice(8), passed, [], walk.shared);
|
|
16421
|
+
}
|
|
16422
|
+
async function nestedOutputInput(stackLogicalId, attribute, node, walk) {
|
|
16423
|
+
const outputClass = await stackOutputClass(stackLogicalId, attribute, walk);
|
|
16424
|
+
if (outputClass === "unread") throw new UnknownInput();
|
|
16425
|
+
if (outputClass !== "clean") return {
|
|
16426
|
+
form: node,
|
|
16427
|
+
concrete: false
|
|
16428
|
+
};
|
|
16429
|
+
return resolvedInput(node, walk);
|
|
16430
|
+
}
|
|
16431
|
+
async function maskedInputFingerprint(templateValue, sources) {
|
|
16432
|
+
let form;
|
|
16433
|
+
try {
|
|
16434
|
+
form = (await inputForm(templateValue, newWalk(sources))).form;
|
|
16435
|
+
} catch (error) {
|
|
16436
|
+
if (error instanceof UnknownInput) return void 0;
|
|
16437
|
+
throw error;
|
|
16438
|
+
}
|
|
16439
|
+
const digest = createHash("sha256").update(canonicalJson$2({
|
|
16440
|
+
layout: INPUT_FINGERPRINT_LAYOUT,
|
|
16441
|
+
value: form
|
|
16442
|
+
})).digest("hex");
|
|
16443
|
+
return `${INPUT_FINGERPRINT_PREFIX}${digest}${TEXT_HALF_SEPARATOR}${maskedPropertyFingerprint(templateValue)}`;
|
|
16444
|
+
}
|
|
16445
|
+
async function classifyPassedParameters(parameters, sources) {
|
|
16446
|
+
return classifyPassed(parameters, sources, {
|
|
16447
|
+
stackChain: /* @__PURE__ */ new Set(),
|
|
16448
|
+
shared: newShared()
|
|
16449
|
+
});
|
|
16450
|
+
}
|
|
16451
|
+
async function classifyPassed(parameters, sources, nested) {
|
|
16452
|
+
const classes = /* @__PURE__ */ new Map();
|
|
16453
|
+
if (!isPlainObject$2(parameters)) return classes;
|
|
16454
|
+
for (const [name, expression] of Object.entries(parameters)) {
|
|
16455
|
+
let passedClass;
|
|
16456
|
+
try {
|
|
16457
|
+
passedClass = (await inputForm(expression, newWalk(sources, nested))).concrete ? "clean" : "secret";
|
|
16458
|
+
} catch {
|
|
16459
|
+
passedClass = "unknown";
|
|
16460
|
+
}
|
|
16461
|
+
classes.set(name, passedClass);
|
|
16462
|
+
}
|
|
16463
|
+
return classes;
|
|
16464
|
+
}
|
|
16465
|
+
const passedParameterClasses = /* @__PURE__ */ new WeakMap();
|
|
16466
|
+
function recordPassedParameterClasses(bag, classes) {
|
|
16467
|
+
passedParameterClasses.set(bag, classes);
|
|
16468
|
+
}
|
|
16469
|
+
function passedParameterClassesOf(bag) {
|
|
16470
|
+
return bag === void 0 ? void 0 : passedParameterClasses.get(bag);
|
|
16471
|
+
}
|
|
16472
|
+
function inputFingerprinter(templateProps, sources) {
|
|
16473
|
+
const memo = /* @__PURE__ */ new Map();
|
|
16474
|
+
return (key) => {
|
|
16475
|
+
let pending = memo.get(key);
|
|
16476
|
+
if (pending === void 0) {
|
|
16477
|
+
pending = Object.hasOwn(templateProps, key) ? maskedInputFingerprint(templateProps[key], sources).catch(() => void 0) : Promise.resolve(void 0);
|
|
16478
|
+
memo.set(key, pending);
|
|
16479
|
+
}
|
|
16480
|
+
return pending;
|
|
16481
|
+
};
|
|
16482
|
+
}
|
|
16483
|
+
function possiblyMaskedKeys(resolvedProps, corpora) {
|
|
16484
|
+
const needles = /* @__PURE__ */ new Set();
|
|
16485
|
+
for (const corpus of corpora) {
|
|
16486
|
+
if (corpus === void 0) continue;
|
|
16487
|
+
for (const needle of printingCorpusOf(corpus).keys()) if (needle.length > 0) needles.add(needle);
|
|
16488
|
+
}
|
|
16489
|
+
const short = [...needles].filter((needle) => needle.length < 4);
|
|
16490
|
+
const long = [...needles].filter((needle) => needle.length >= 4);
|
|
16491
|
+
const wholeShortLeaf = (value) => {
|
|
16492
|
+
if (typeof value === "string") return short.includes(value);
|
|
16493
|
+
if (Array.isArray(value)) return value.some(wholeShortLeaf);
|
|
16494
|
+
if (isPlainObject$2(value)) return Object.values(value).some(wholeShortLeaf);
|
|
16495
|
+
return false;
|
|
16496
|
+
};
|
|
16497
|
+
return Object.keys(resolvedProps).filter((key) => {
|
|
16498
|
+
const value = resolvedProps[key];
|
|
16499
|
+
if (carriesSecretMask(value) || wholeShortLeaf(value)) return true;
|
|
16500
|
+
const text = canonicalJson$2(value);
|
|
16501
|
+
return long.some((needle) => text.includes(needle) || text.includes(JSON.stringify(needle).slice(1, -1)));
|
|
16502
|
+
});
|
|
16503
|
+
}
|
|
16504
|
+
async function maskedInputFingerprintsFor(keys, fingerprinter) {
|
|
16505
|
+
const entries = [];
|
|
16506
|
+
for (const key of keys) {
|
|
16507
|
+
const fingerprint = await fingerprinter(key);
|
|
16508
|
+
if (fingerprint !== void 0) entries.push([key, fingerprint]);
|
|
16509
|
+
}
|
|
16510
|
+
return Object.fromEntries(entries);
|
|
16511
|
+
}
|
|
15715
16512
|
function maskedPropertyFingerprintsFor(recordedProperties, templateProps) {
|
|
15716
16513
|
const entries = [];
|
|
15717
16514
|
for (const key of Object.keys(recordedProperties)) {
|
|
@@ -15725,48 +16522,111 @@ function maskedPropertyFingerprintsOf(record) {
|
|
|
15725
16522
|
const read = /* @__PURE__ */ new Map();
|
|
15726
16523
|
if (record === null || typeof record !== "object") return read;
|
|
15727
16524
|
const field = record.maskedPropertyFingerprints;
|
|
15728
|
-
if (
|
|
16525
|
+
if (!isPlainObject$2(field)) return read;
|
|
15729
16526
|
for (const [key, value] of Object.entries(field)) if (typeof value === "string" && value.startsWith(FINGERPRINT_PREFIX)) read.set(key, value);
|
|
15730
16527
|
return read;
|
|
15731
16528
|
}
|
|
15732
|
-
function
|
|
16529
|
+
function maskedPropertyInputFingerprintsOf(record) {
|
|
16530
|
+
const read = /* @__PURE__ */ new Map();
|
|
16531
|
+
if (record === null || typeof record !== "object") return read;
|
|
16532
|
+
const field = record.maskedPropertyInputFingerprints;
|
|
16533
|
+
if (!isPlainObject$2(field)) return read;
|
|
16534
|
+
const text = maskedPropertyFingerprintsOf(record);
|
|
16535
|
+
for (const [key, value] of Object.entries(field)) {
|
|
16536
|
+
if (typeof value !== "string" || !value.startsWith(INPUT_FINGERPRINT_PREFIX)) continue;
|
|
16537
|
+
const half = splitInputFingerprint(value).text;
|
|
16538
|
+
if (half !== void 0 && text.get(key) === half) read.set(key, value);
|
|
16539
|
+
}
|
|
16540
|
+
return read;
|
|
16541
|
+
}
|
|
16542
|
+
function boundInputFingerprints(textFingerprints, inputFingerprints) {
|
|
16543
|
+
if (textFingerprints === void 0 || inputFingerprints === void 0) return void 0;
|
|
16544
|
+
const entries = [];
|
|
16545
|
+
for (const [key, text] of Object.entries(textFingerprints)) {
|
|
16546
|
+
if (!text.startsWith(FINGERPRINT_PREFIX) || !Object.hasOwn(inputFingerprints, key)) continue;
|
|
16547
|
+
const input = inputFingerprints[key];
|
|
16548
|
+
if (splitInputFingerprint(input).text === text) entries.push([key, input]);
|
|
16549
|
+
}
|
|
16550
|
+
return entries.length > 0 ? Object.fromEntries(entries) : void 0;
|
|
16551
|
+
}
|
|
16552
|
+
async function movedMaskedProperties(record, templateProps, fingerprinter, onRebaseline) {
|
|
15733
16553
|
const recorded = maskedPropertyFingerprintsOf(record);
|
|
15734
16554
|
if (recorded.size === 0) return [];
|
|
15735
16555
|
const properties = record.properties;
|
|
15736
16556
|
if (properties === null || typeof properties !== "object") return [];
|
|
16557
|
+
const inputs = maskedPropertyInputFingerprintsOf(record);
|
|
15737
16558
|
const moved = [];
|
|
15738
16559
|
for (const [key, fingerprint] of recorded) {
|
|
15739
16560
|
if (!Object.hasOwn(templateProps, key) || !Object.hasOwn(properties, key)) continue;
|
|
15740
16561
|
if (!carriesSecretMask(properties[key])) continue;
|
|
15741
|
-
if (maskedPropertyFingerprint(templateProps[key]) !== fingerprint)
|
|
16562
|
+
if (maskedPropertyFingerprint(templateProps[key]) !== fingerprint) {
|
|
16563
|
+
moved.push(key);
|
|
16564
|
+
continue;
|
|
16565
|
+
}
|
|
16566
|
+
if (fingerprinter === void 0) continue;
|
|
16567
|
+
const bound = inputs.get(key);
|
|
16568
|
+
if (bound === void 0 && onRebaseline === void 0) continue;
|
|
16569
|
+
const now = await fingerprinter(key);
|
|
16570
|
+
if (now === void 0) continue;
|
|
16571
|
+
if (bound !== void 0) {
|
|
16572
|
+
if (splitInputFingerprint(now).input !== splitInputFingerprint(bound).input) moved.push(key);
|
|
16573
|
+
} else onRebaseline(key, now);
|
|
15742
16574
|
}
|
|
15743
16575
|
return moved;
|
|
15744
16576
|
}
|
|
16577
|
+
function withRebaselinedFingerprints(record, fingerprints) {
|
|
16578
|
+
const text = maskedPropertyFingerprintsOf(record);
|
|
16579
|
+
const field = record.maskedPropertyInputFingerprints;
|
|
16580
|
+
const next = isPlainObject$2(field) ? Object.entries(field) : [];
|
|
16581
|
+
let changed = false;
|
|
16582
|
+
for (const [key, value] of Object.entries(fingerprints)) {
|
|
16583
|
+
if (text.get(key) !== splitInputFingerprint(value).text) continue;
|
|
16584
|
+
const at = next.findIndex(([k]) => k === key);
|
|
16585
|
+
if (at >= 0) next[at] = [key, value];
|
|
16586
|
+
else next.push([key, value]);
|
|
16587
|
+
changed = true;
|
|
16588
|
+
}
|
|
16589
|
+
return changed ? {
|
|
16590
|
+
...record,
|
|
16591
|
+
maskedPropertyInputFingerprints: Object.fromEntries(next)
|
|
16592
|
+
} : record;
|
|
16593
|
+
}
|
|
15745
16594
|
const writtenFromDeployedTemplate = /* @__PURE__ */ new WeakSet();
|
|
15746
16595
|
function markWrittenFromDeployedTemplate(bag) {
|
|
15747
16596
|
writtenFromDeployedTemplate.add(bag);
|
|
15748
16597
|
return bag;
|
|
15749
16598
|
}
|
|
15750
|
-
function withMaskedPropertyFingerprints(scrubbed, writtenBag, templateProps, secrets, noEchoParameterValues) {
|
|
16599
|
+
function withMaskedPropertyFingerprints(scrubbed, writtenBag, templateProps, secrets, noEchoParameterValues, inputFingerprints) {
|
|
15751
16600
|
if (templateProps === void 0) return scrubbed;
|
|
15752
16601
|
const corpora = [secrets, noEchoParameterValues].filter((corpus) => corpus !== void 0);
|
|
15753
16602
|
const written = writtenBag !== null && typeof writtenBag === "object" && writtenFromDeployedTemplate.has(writtenBag);
|
|
15754
|
-
const { maskedPropertyFingerprints: previous, ...rest } = scrubbed;
|
|
16603
|
+
const { maskedPropertyFingerprints: previous, maskedPropertyInputFingerprints: previousInputs, ...rest } = scrubbed;
|
|
15755
16604
|
let fingerprints;
|
|
15756
|
-
|
|
15757
|
-
|
|
15758
|
-
|
|
16605
|
+
let inputs;
|
|
16606
|
+
if (written) {
|
|
16607
|
+
fingerprints = maskedPropertyFingerprintsFor(scrubbed.properties, templateProps);
|
|
16608
|
+
inputs = boundInputFingerprints(fingerprints, inputFingerprints);
|
|
16609
|
+
} else {
|
|
16610
|
+
if (!isPlainObject$2(previous)) return scrubbed;
|
|
15759
16611
|
if (corpora.length === 0) return scrubbed;
|
|
15760
16612
|
fingerprints = { ...previous };
|
|
16613
|
+
inputs = isPlainObject$2(previousInputs) ? { ...previousInputs } : void 0;
|
|
15761
16614
|
}
|
|
15762
16615
|
if (fingerprints !== void 0 && corpora.length > 0) {
|
|
15763
16616
|
const refused = Object.keys(fingerprints).filter((key) => Object.hasOwn(templateProps, key) && corpora.some((corpus) => templateCarriesNeedle(templateProps[key], corpus)));
|
|
15764
|
-
if (refused.length > 0)
|
|
16617
|
+
if (refused.length > 0) {
|
|
16618
|
+
fingerprints = Object.fromEntries(Object.entries(fingerprints).map(([key, value]) => [key, refused.includes(key) ? REFUSED_FINGERPRINT : value]));
|
|
16619
|
+
if (inputs !== void 0) {
|
|
16620
|
+
const kept = Object.entries(inputs).filter(([key]) => !refused.includes(key));
|
|
16621
|
+
inputs = kept.length > 0 ? Object.fromEntries(kept) : void 0;
|
|
16622
|
+
}
|
|
16623
|
+
}
|
|
15765
16624
|
}
|
|
15766
|
-
if (!written && JSON.stringify(fingerprints) === JSON.stringify(previous)) return scrubbed;
|
|
15767
|
-
return
|
|
16625
|
+
if (!written && JSON.stringify(fingerprints) === JSON.stringify(previous) && JSON.stringify(inputs) === JSON.stringify(previousInputs)) return scrubbed;
|
|
16626
|
+
return {
|
|
15768
16627
|
...rest,
|
|
15769
|
-
maskedPropertyFingerprints: fingerprints
|
|
16628
|
+
...fingerprints !== void 0 && { maskedPropertyFingerprints: fingerprints },
|
|
16629
|
+
...inputs !== void 0 && { maskedPropertyInputFingerprints: inputs }
|
|
15770
16630
|
};
|
|
15771
16631
|
}
|
|
15772
16632
|
function backfillMaskedPropertyFingerprints(resources, template, noEchoParameterValues) {
|
|
@@ -16094,6 +16954,49 @@ const DEPLOY_RESOLVED_REFERENCE_SERVICES = /* @__PURE__ */ new Set([
|
|
|
16094
16954
|
"ssm",
|
|
16095
16955
|
"ssm-secure"
|
|
16096
16956
|
]);
|
|
16957
|
+
function sitsInsideResolvableReference(text, start, end) {
|
|
16958
|
+
const OPENING = "{{resolve:";
|
|
16959
|
+
const opening = text.lastIndexOf(OPENING, start);
|
|
16960
|
+
if (opening < 0) return false;
|
|
16961
|
+
const head = text.slice(opening + 10, start);
|
|
16962
|
+
if (head.includes("}}")) return false;
|
|
16963
|
+
const colon = head.indexOf(":");
|
|
16964
|
+
if (colon >= 0 && !DEPLOY_RESOLVED_REFERENCE_SERVICES.has(head.slice(0, colon))) return false;
|
|
16965
|
+
const close = text.indexOf("}}", end);
|
|
16966
|
+
if (close < 0) return false;
|
|
16967
|
+
const nextOpening = text.indexOf(OPENING, end);
|
|
16968
|
+
if (nextOpening >= 0 && nextOpening < close) return false;
|
|
16969
|
+
return !/["\r\n]/.test(text.slice(opening, close));
|
|
16970
|
+
}
|
|
16971
|
+
const KEPT_PLACEHOLDERS = /* @__PURE__ */ new WeakMap();
|
|
16972
|
+
function recordKeptPlaceholder(bag, placeholder, because) {
|
|
16973
|
+
let kept = KEPT_PLACEHOLDERS.get(bag);
|
|
16974
|
+
if (kept === void 0) {
|
|
16975
|
+
kept = /* @__PURE__ */ new Map();
|
|
16976
|
+
KEPT_PLACEHOLDERS.set(bag, kept);
|
|
16977
|
+
}
|
|
16978
|
+
if (!kept.has(placeholder)) kept.set(placeholder, {
|
|
16979
|
+
because,
|
|
16980
|
+
reported: false
|
|
16981
|
+
});
|
|
16982
|
+
}
|
|
16983
|
+
function takeKeptPlaceholdersInsideReferences(bag, text) {
|
|
16984
|
+
const kept = KEPT_PLACEHOLDERS.get(bag);
|
|
16985
|
+
if (kept === void 0) return [];
|
|
16986
|
+
const found = [];
|
|
16987
|
+
for (const [placeholder, entry] of kept) {
|
|
16988
|
+
if (entry.reported) continue;
|
|
16989
|
+
for (let at = text.indexOf(placeholder); at >= 0; at = text.indexOf(placeholder, at + 1)) if (sitsInsideResolvableReference(text, at, at + placeholder.length)) {
|
|
16990
|
+
entry.reported = true;
|
|
16991
|
+
found.push({
|
|
16992
|
+
placeholder,
|
|
16993
|
+
because: entry.because
|
|
16994
|
+
});
|
|
16995
|
+
break;
|
|
16996
|
+
}
|
|
16997
|
+
}
|
|
16998
|
+
return found;
|
|
16999
|
+
}
|
|
16097
17000
|
function keepsSecretReferenceToken(resolvedName) {
|
|
16098
17001
|
return dynamicReferenceTokens(resolvedName).some((token) => DEPLOY_RESOLVED_REFERENCE_SERVICES.has(token.slice(10, -2).split(":")[0] ?? ""));
|
|
16099
17002
|
}
|
|
@@ -17880,6 +18783,13 @@ async function resolveTemplateLeafReferences(value, context) {
|
|
|
17880
18783
|
return (await this.resolveDynamicReferencesWithLogTwin(value, value, context)).result;
|
|
17881
18784
|
}
|
|
17882
18785
|
async function resolveDynamicReferencesWithLogTwin(value, logTwin, context, inherited, persistedText = false) {
|
|
18786
|
+
if (context?.abandonedResolutions !== void 0) {
|
|
18787
|
+
const bag = context.abandonedResolutions;
|
|
18788
|
+
for (const { placeholder, because } of takeKeptPlaceholdersInsideReferences(bag, value)) {
|
|
18789
|
+
const reason = because instanceof Error ? because.message : String(because);
|
|
18790
|
+
bag.push(this.abandonedUnit("placeholder", placeholder, new Error(`Fn::Sub kept the placeholder ${placeholder} (${reason}) inside a {{resolve:...}} reference, so that reference was never resolved`, { cause: because }), context, value));
|
|
18791
|
+
}
|
|
18792
|
+
}
|
|
17883
18793
|
const pattern = /\{\{resolve:([^}]+)\}\}/g;
|
|
17884
18794
|
let result = value;
|
|
17885
18795
|
let twin = logTwin;
|
|
@@ -18342,6 +19252,15 @@ function rethrowStructuralSubFailure(varName, error, context) {
|
|
|
18342
19252
|
if (!this.subPlaceholderNamesADeclaredTemplateEntity(varName, context)) return;
|
|
18343
19253
|
throw error;
|
|
18344
19254
|
}
|
|
19255
|
+
function noteKeptSubPlaceholder(varName, placeholder, because, context) {
|
|
19256
|
+
if (context.abandonedResolutions === void 0) return;
|
|
19257
|
+
const firstDot = varName.indexOf(".");
|
|
19258
|
+
const head = firstDot >= 0 ? varName.slice(0, firstDot) : varName;
|
|
19259
|
+
for (const declared of [context.template?.Resources, context.template?.Parameters]) if (declared !== void 0 && declared !== null && typeof declared === "object") {
|
|
19260
|
+
if (Object.hasOwn(declared, head)) return;
|
|
19261
|
+
}
|
|
19262
|
+
recordKeptPlaceholder(context.abandonedResolutions, placeholder, because);
|
|
19263
|
+
}
|
|
18345
19264
|
function subListRefusal(subject, value, context) {
|
|
18346
19265
|
if (!Array.isArray(value)) return void 0;
|
|
18347
19266
|
const count = `${value.length} item${value.length === 1 ? "" : "s"}`;
|
|
@@ -18451,11 +19370,13 @@ async function resolveSub(subArgs, context, source) {
|
|
|
18451
19370
|
this.rethrowStructuralSubFailure(varNameStr, getAttError, context);
|
|
18452
19371
|
this.logger.warn(this.displayMasked(this.subPlaceholderWarning(varNameStr, getAttError), context));
|
|
18453
19372
|
replacement = match[0];
|
|
19373
|
+
noteKeptSubPlaceholder(varNameStr, match[0], getAttError, context);
|
|
18454
19374
|
}
|
|
18455
19375
|
else {
|
|
18456
19376
|
this.rethrowStructuralSubFailure(varNameStr, refError, context);
|
|
18457
19377
|
this.logger.warn(this.displayMasked(this.subPlaceholderWarning(varNameStr, refError), context));
|
|
18458
19378
|
replacement = match[0];
|
|
19379
|
+
noteKeptSubPlaceholder(varNameStr, match[0], refError, context);
|
|
18459
19380
|
}
|
|
18460
19381
|
}
|
|
18461
19382
|
}
|
|
@@ -18972,16 +19893,6 @@ function displayLeaf(value, context) {
|
|
|
18972
19893
|
return this.displayMasked(this.logTextOfLeaf(value, context), context);
|
|
18973
19894
|
}
|
|
18974
19895
|
|
|
18975
|
-
//#endregion
|
|
18976
|
-
//#region src/deployment/assumed-conditions.ts
|
|
18977
|
-
const assumedConditionNames = /* @__PURE__ */ new WeakMap();
|
|
18978
|
-
function recordAssumedConditions(conditions, assumed) {
|
|
18979
|
-
assumedConditionNames.set(conditions, assumed);
|
|
18980
|
-
}
|
|
18981
|
-
function conditionsAssumedFalse(conditions) {
|
|
18982
|
-
return assumedConditionNames.get(conditions) ?? /* @__PURE__ */ new Set();
|
|
18983
|
-
}
|
|
18984
|
-
|
|
18985
19896
|
//#endregion
|
|
18986
19897
|
//#region src/deployment/intrinsic-resolver/params-conditions.ts
|
|
18987
19898
|
async function resolveParameters(template, userParameters, options) {
|
|
@@ -19523,7 +20434,7 @@ var DiffCalculator = class DiffCalculator {
|
|
|
19523
20434
|
conditionalReplacementVerdict(resourceType, propertyPath, oldValue, newValue) {
|
|
19524
20435
|
return this.replacementRules.conditionalReplacementVerdict(resourceType, propertyPath, oldValue, newValue);
|
|
19525
20436
|
}
|
|
19526
|
-
async calculateDiff(currentState, desiredTemplate, resolveFn, canonicalizeProperties, allowedUnsupportedProperties, freshParameters, maskForLog, recreateTargets) {
|
|
20437
|
+
async calculateDiff(currentState, desiredTemplate, resolveFn, canonicalizeProperties, allowedUnsupportedProperties, freshParameters, maskForLog, recreateTargets, maskedInputs) {
|
|
19527
20438
|
const changes = /* @__PURE__ */ new Map();
|
|
19528
20439
|
refuseMalformedResourceEntriesForDeploy(currentState, void 0, void 0);
|
|
19529
20440
|
refuseMalformedResourceProperties(currentState, void 0, void 0);
|
|
@@ -19588,7 +20499,10 @@ var DiffCalculator = class DiffCalculator {
|
|
|
19588
20499
|
else if (canonicalizeProperties && !this.valuesEqual(desiredPropsForCompare, desiredAfterDrops)) this.logger.debug(`${logicalId} (${desiredResource.Type}): the provider normalizes part of the declared properties before sending them; the comparison uses the normalized form. Nothing is dropped.`);
|
|
19589
20500
|
const propertyChanges = await this.compareProperties(desiredResource.Type, currentPropsForCompare, desiredPropsForCompare, maskForLog);
|
|
19590
20501
|
const reported = new Set(propertyChanges.map((pc) => pc.path));
|
|
19591
|
-
|
|
20502
|
+
const rebaselined = [];
|
|
20503
|
+
const moved = await movedMaskedProperties(currentResource, rawDesiredProps, maskedInputs && inputFingerprinter(rawDesiredProps, maskedInputs.sources), maskedInputs?.rebaselined && ((key, fingerprint) => rebaselined.push([key, fingerprint])));
|
|
20504
|
+
if (rebaselined.length > 0) maskedInputs.rebaselined.set(logicalId, Object.fromEntries(rebaselined));
|
|
20505
|
+
for (const key of moved) {
|
|
19592
20506
|
if (reported.has(key)) continue;
|
|
19593
20507
|
if (!Object.hasOwn(currentPropsForCompare, key)) continue;
|
|
19594
20508
|
if (!Object.hasOwn(desiredPropsForCompare, key)) continue;
|
|
@@ -19601,7 +20515,7 @@ var DiffCalculator = class DiffCalculator {
|
|
|
19601
20515
|
requiresReplacement: await this.maskedEditRequiresReplacement(desiredResource.Type, key, oldValue, newValue),
|
|
19602
20516
|
maskedExpressionChanged: true
|
|
19603
20517
|
});
|
|
19604
|
-
this.logger.debug(safeMsg`${logicalId}: ${key} is recorded masked and its template expression changed (go-to-k/cdkd#4451)`);
|
|
20518
|
+
this.logger.debug(safeMsg`${logicalId}: ${key} is recorded masked and its template expression or a resolved input changed (go-to-k/cdkd#4451, go-to-k/cdkd#4543)`);
|
|
19605
20519
|
}
|
|
19606
20520
|
const attributeChanges = this.compareAttributes(currentResource, desiredResource);
|
|
19607
20521
|
if (propertyChanges.length > 0 || attributeChanges.length > 0) {
|
|
@@ -20914,7 +21828,7 @@ var CloudControlProvider = class {
|
|
|
20914
21828
|
const indeterminateGuard = await this.confirmDeleteTargetIdentity(logicalId, resourceType, physicalId, context);
|
|
20915
21829
|
if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
|
|
20916
21830
|
this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
|
|
20917
|
-
const { ASGProvider } = await import("./asg-provider-
|
|
21831
|
+
const { ASGProvider } = await import("./asg-provider-CbHiTBaE.js");
|
|
20918
21832
|
const delegateRegion = ambientRegion();
|
|
20919
21833
|
let asgProvider = this.asgDeleteDelegates.get(delegateRegion);
|
|
20920
21834
|
if (asgProvider === void 0) {
|
|
@@ -21020,7 +21934,7 @@ var CloudControlProvider = class {
|
|
|
21020
21934
|
const family = SDK_DELETE_FAMILIES.get(resourceType);
|
|
21021
21935
|
const cached = this.sdkDeleteDelegates.get(family);
|
|
21022
21936
|
if (cached !== void 0 && cached.region === ccRegion) return cached.provider;
|
|
21023
|
-
const provider = family === "rds" ? new (await (import("./rds-provider-
|
|
21937
|
+
const provider = family === "rds" ? new (await (import("./rds-provider-l9F4Y8YY.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-CS-r4Ufj.js"))).NeptuneProvider({ region: ccRegion });
|
|
21024
21938
|
this.sdkDeleteDelegates.set(family, {
|
|
21025
21939
|
region: ccRegion,
|
|
21026
21940
|
provider
|
|
@@ -25798,6 +26712,18 @@ function deploymentEventsIndexKey(prefix, stackName, region) {
|
|
|
25798
26712
|
function deploymentsDirPrefix(prefix, stackName, region) {
|
|
25799
26713
|
return `${prefix}/${stackName}/${region}/deployments/`;
|
|
25800
26714
|
}
|
|
26715
|
+
const DEPLOYMENT_EVENTS_OBJECT_DESCRIPTION = "deployment-event streams and their index, whose recorded error messages can quote values the secret mask does not catch";
|
|
26716
|
+
async function deleteAndPurgeEventObjects(backend, keys, dirPrefix) {
|
|
26717
|
+
if (keys.length === 0) return;
|
|
26718
|
+
try {
|
|
26719
|
+
await backend.deleteRawObjects(keys);
|
|
26720
|
+
} finally {
|
|
26721
|
+
await backend.purgeNoncurrentVersions(keys, {
|
|
26722
|
+
...keys.length > 1 && { listPrefix: dirPrefix },
|
|
26723
|
+
objectDescription: DEPLOYMENT_EVENTS_OBJECT_DESCRIPTION
|
|
26724
|
+
});
|
|
26725
|
+
}
|
|
26726
|
+
}
|
|
25801
26727
|
function runIdTimestampMs(runId) {
|
|
25802
26728
|
const m = /^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})(\d{3})Z/.exec(runId);
|
|
25803
26729
|
if (!m) return null;
|
|
@@ -25942,7 +26868,7 @@ var DeploymentEventsStore = class {
|
|
|
25942
26868
|
return runId !== null && runId < cutoff;
|
|
25943
26869
|
});
|
|
25944
26870
|
if (stale.length === 0) return;
|
|
25945
|
-
await this.backend
|
|
26871
|
+
await deleteAndPurgeEventObjects(this.backend, stale, dirPrefix);
|
|
25946
26872
|
this.logger.debug(`Pruned ${stale.length} superseded deployment-event stream(s) for ${this.stackName} (${this.region})`);
|
|
25947
26873
|
}
|
|
25948
26874
|
warnOnce(message) {
|
|
@@ -26034,7 +26960,7 @@ var DeploymentEventsReader = class {
|
|
|
26034
26960
|
const indexExisted = keys.includes(indexKey);
|
|
26035
26961
|
if (opts.all === true) {
|
|
26036
26962
|
const toDelete = runIdsDesc.map((id) => deploymentEventsKey(this.backend.prefix, stackName, region, id));
|
|
26037
|
-
await this.backend
|
|
26963
|
+
await deleteAndPurgeEventObjects(this.backend, [...toDelete, indexKey], dirPrefix);
|
|
26038
26964
|
return {
|
|
26039
26965
|
deletedRunIds: runIdsDesc,
|
|
26040
26966
|
remainingRunIds: [],
|
|
@@ -26060,35 +26986,39 @@ var DeploymentEventsReader = class {
|
|
|
26060
26986
|
const deletedSet = new Set(candidates);
|
|
26061
26987
|
const deleteKeys = candidates.map((id) => deploymentEventsKey(this.backend.prefix, stackName, region, id));
|
|
26062
26988
|
const remainingRunIds = runIdsDesc.filter((id) => !deletedSet.has(id));
|
|
26063
|
-
|
|
26064
|
-
|
|
26989
|
+
if (remainingRunIds.length === 0) {
|
|
26990
|
+
await deleteAndPurgeEventObjects(this.backend, [...deleteKeys, indexKey], dirPrefix);
|
|
26991
|
+
return {
|
|
26992
|
+
deletedRunIds: candidates,
|
|
26993
|
+
remainingRunIds,
|
|
26994
|
+
indexDeleted: indexExisted
|
|
26995
|
+
};
|
|
26996
|
+
}
|
|
26997
|
+
await this.rewriteIndexAfterPrune(indexKey, stackName, region, deletedSet);
|
|
26998
|
+
await deleteAndPurgeEventObjects(this.backend, deleteKeys, dirPrefix);
|
|
26065
26999
|
return {
|
|
26066
27000
|
deletedRunIds: candidates,
|
|
26067
27001
|
remainingRunIds,
|
|
26068
|
-
indexDeleted
|
|
27002
|
+
indexDeleted: false
|
|
26069
27003
|
};
|
|
26070
27004
|
}
|
|
26071
|
-
async rewriteIndexAfterPrune(indexKey, stackName, region, deletedRunIds
|
|
26072
|
-
if (noRunsRemain) {
|
|
26073
|
-
await this.backend.deleteRawObjects([indexKey]);
|
|
26074
|
-
return indexExisted;
|
|
26075
|
-
}
|
|
27005
|
+
async rewriteIndexAfterPrune(indexKey, stackName, region, deletedRunIds) {
|
|
26076
27006
|
let raw;
|
|
26077
27007
|
try {
|
|
26078
27008
|
raw = await this.backend.getRawObject(indexKey);
|
|
26079
27009
|
} catch {
|
|
26080
|
-
return
|
|
27010
|
+
return;
|
|
26081
27011
|
}
|
|
26082
|
-
if (raw === null) return
|
|
27012
|
+
if (raw === null) return;
|
|
26083
27013
|
let parsed;
|
|
26084
27014
|
try {
|
|
26085
27015
|
parsed = JSON.parse(raw);
|
|
26086
27016
|
} catch {
|
|
26087
|
-
return
|
|
27017
|
+
return;
|
|
26088
27018
|
}
|
|
26089
|
-
if (!Array.isArray(parsed.runs)) return
|
|
27019
|
+
if (!Array.isArray(parsed.runs)) return;
|
|
26090
27020
|
const remaining = parsed.runs.filter((r) => !deletedRunIds.has(r.runId));
|
|
26091
|
-
if (remaining.length === parsed.runs.length) return
|
|
27021
|
+
if (remaining.length === parsed.runs.length) return;
|
|
26092
27022
|
const file = {
|
|
26093
27023
|
indexVersion: 1,
|
|
26094
27024
|
stackName,
|
|
@@ -26097,7 +27027,6 @@ var DeploymentEventsReader = class {
|
|
|
26097
27027
|
lastModified: Date.now()
|
|
26098
27028
|
};
|
|
26099
27029
|
await this.backend.putRawObject(indexKey, JSON.stringify(file, null, 2));
|
|
26100
|
-
return false;
|
|
26101
27030
|
}
|
|
26102
27031
|
};
|
|
26103
27032
|
|
|
@@ -27093,7 +28022,7 @@ function classifyFailedOp(op, stateResources) {
|
|
|
27093
28022
|
if (op.changeType === "CREATE") {
|
|
27094
28023
|
if (!op.physicalId) return "skip-failed-unknown";
|
|
27095
28024
|
if (!current) return "skip-failed-noop";
|
|
27096
|
-
if (current.physicalId !== op.physicalId) return "skip-failed-
|
|
28025
|
+
if (current.physicalId !== op.physicalId) return "skip-failed-mismatch";
|
|
27097
28026
|
const policy = effectiveDeletionPolicy(current.resourceType, current.deletionPolicy, current.properties);
|
|
27098
28027
|
if (policy === "Retain") return "orphan-failed-create-retain";
|
|
27099
28028
|
if (policy === "Snapshot") return "delete-failed-create-with-final-snapshot";
|
|
@@ -27910,6 +28839,10 @@ async function replayFailedOperationsUnbound(failedOps, stateResources, stackNam
|
|
|
27910
28839
|
case "skip-failed-noop":
|
|
27911
28840
|
logger.info(` Rollback: failed ${safe(op.changeType)} of ${safe(op.logicalId)} (${safe(op.resourceType)}) left nothing to revert, skipping`);
|
|
27912
28841
|
break;
|
|
28842
|
+
case "skip-failed-mismatch":
|
|
28843
|
+
logger.warn(safeMsg` Rollback: Skipping failed CREATE of ${shownLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}) — it recorded ${mask(String(op.physicalId))}, which is not the resource state tracks under this id; manual attention may be required`);
|
|
28844
|
+
recordRollbackSkip(skipScope, op, "The failed CREATE recorded a physical id other than the one state now tracks under this logical id, so the rollback left it as it is; manual attention may be required.");
|
|
28845
|
+
break;
|
|
27913
28846
|
case "skip-failed-unknown":
|
|
27914
28847
|
logger.warn(` Rollback: failed CREATE of ${safe(op.logicalId)} (${safe(op.resourceType)}) recorded no physical id — if it was partially created in AWS, delete it manually`);
|
|
27915
28848
|
recordRollbackSkip(skipScope, op, "The failed CREATE recorded no physical id, so the rollback cannot address it; if it was partially created in AWS, delete it manually.");
|
|
@@ -28072,7 +29005,7 @@ async function replayFailedOperationsUnbound(failedOps, stateResources, stackNam
|
|
|
28072
29005
|
error: maskedRollbackEventError(revertError, mask)
|
|
28073
29006
|
});
|
|
28074
29007
|
}
|
|
28075
|
-
inlinePolicyWriters.noteOutcome(op, action === "skip-failed-noop" || ownRecord(stateResources, op.logicalId) !== recordBefore);
|
|
29008
|
+
inlinePolicyWriters.noteOutcome(op, action === "skip-failed-noop" || action === "skip-failed-mismatch" || ownRecord(stateResources, op.logicalId) !== recordBefore);
|
|
28076
29009
|
}
|
|
28077
29010
|
if (result.interrupted) await restoreHeldInlinePolicies(inlinePolicyWriters, stateResources, stackName, ctx, result, { refuseAll: true });
|
|
28078
29011
|
if (emitEnvelope) ctx.recordEvent?.({
|
|
@@ -28117,7 +29050,7 @@ async function collectNestedChildUnaddressed(fn) {
|
|
|
28117
29050
|
//#endregion
|
|
28118
29051
|
//#region src/deployment/nested-child-journal.ts
|
|
28119
29052
|
const NESTED_PENDING_PARENT_REASON = "nested-pending-parent";
|
|
28120
|
-
const NESTED_STACK_TYPE = "AWS::CloudFormation::Stack";
|
|
29053
|
+
const NESTED_STACK_TYPE$1 = "AWS::CloudFormation::Stack";
|
|
28121
29054
|
const MAX_NESTED_WALK_DEPTH = 32;
|
|
28122
29055
|
function nestedChildStackName(parentStackName, logicalId) {
|
|
28123
29056
|
return `${parentStackName}~${logicalId}`;
|
|
@@ -28134,8 +29067,46 @@ function nestedPendingSnapshot(state) {
|
|
|
28134
29067
|
}
|
|
28135
29068
|
};
|
|
28136
29069
|
}
|
|
29070
|
+
function displacedPhysicalIdShown(op, logger, physicalId = journalOpPhysicalId(op)) {
|
|
29071
|
+
if (physicalId === void 0) return void 0;
|
|
29072
|
+
const masker = createOpMasker(logger, /* @__PURE__ */ new Map());
|
|
29073
|
+
for (const properties of [
|
|
29074
|
+
op.properties,
|
|
29075
|
+
op.attemptedProperties,
|
|
29076
|
+
op.previousState?.properties
|
|
29077
|
+
]) {
|
|
29078
|
+
if (properties === void 0) continue;
|
|
29079
|
+
masker.addNamed({
|
|
29080
|
+
resourceType: op.resourceType,
|
|
29081
|
+
properties,
|
|
29082
|
+
logicalId: op.logicalId,
|
|
29083
|
+
physicalIds: [physicalId]
|
|
29084
|
+
});
|
|
29085
|
+
}
|
|
29086
|
+
return displaySafe(String(masker.mask(physicalId)));
|
|
29087
|
+
}
|
|
29088
|
+
function displacedOpClause(op, marks, logger) {
|
|
29089
|
+
const retainedOld = retainedOldPhysicalId(op);
|
|
29090
|
+
if (retainedOld !== void 0 && marks.some((m) => isMarkFor(m, op))) {
|
|
29091
|
+
const shownOld = displacedPhysicalIdShown(op, logger, retainedOld);
|
|
29092
|
+
return `replaced ${shownOld} ${op.oldResourceRetained === true ? "but kept it (UpdateReplacePolicy: Retain)" : "and may have kept it (the journal records no verdict)"}; cdkd import adopted the replacement, so ${shownOld} is left untracked`;
|
|
29093
|
+
}
|
|
29094
|
+
const shownId = displacedPhysicalIdShown(op, logger);
|
|
29095
|
+
return shownId !== void 0 ? `recorded ${shownId}, which cdkd import has since replaced under this id` : "recorded no physical id, and cdkd import has since put another resource under this id";
|
|
29096
|
+
}
|
|
29097
|
+
function recordDisplacedSkips(recordEvent, stackName, ops) {
|
|
29098
|
+
for (const op of ops) recordEvent?.({
|
|
29099
|
+
eventType: "ROLLBACK_RESOURCE_SKIPPED",
|
|
29100
|
+
stackName,
|
|
29101
|
+
operation: op.changeType,
|
|
29102
|
+
logicalId: op.logicalId,
|
|
29103
|
+
resourceType: op.resourceType,
|
|
29104
|
+
...op.provisionedBy && { provisionedBy: op.provisionedBy },
|
|
29105
|
+
reason: "cdkd import has since put another resource under this logical id, so the op was not reverted; check the resource it recorded by hand"
|
|
29106
|
+
});
|
|
29107
|
+
}
|
|
28137
29108
|
function revertedNestedRowIds(ops) {
|
|
28138
|
-
return ops.filter((op) => op.resourceType === NESTED_STACK_TYPE && op.changeType === "UPDATE").map((op) => op.logicalId);
|
|
29109
|
+
return ops.filter((op) => op.resourceType === NESTED_STACK_TYPE$1 && op.changeType === "UPDATE").map((op) => op.logicalId);
|
|
28139
29110
|
}
|
|
28140
29111
|
const revertRunStorage = new AsyncLocalStorage();
|
|
28141
29112
|
function withNestedRevertRun(runId, fn) {
|
|
@@ -28161,7 +29132,7 @@ async function dropNestedChildJournals(args) {
|
|
|
28161
29132
|
if (!isPlainRecord(resources)) return;
|
|
28162
29133
|
if (depthExceeded(depth, parentStackName, logger)) return;
|
|
28163
29134
|
for (const [logicalId, record] of Object.entries(resources)) {
|
|
28164
|
-
if (!isPlainRecord(record) || record["resourceType"] !== NESTED_STACK_TYPE) continue;
|
|
29135
|
+
if (!isPlainRecord(record) || record["resourceType"] !== NESTED_STACK_TYPE$1) continue;
|
|
28165
29136
|
const child = nestedChildStackName(parentStackName, logicalId);
|
|
28166
29137
|
try {
|
|
28167
29138
|
const data = await stateBackend.getState(child, region);
|
|
@@ -28319,8 +29290,9 @@ async function revertNestedChildFromJournal(args) {
|
|
|
28319
29290
|
for (let s = segments.length - 1; s >= 0; s--) {
|
|
28320
29291
|
const segment = segments[s];
|
|
28321
29292
|
const skipPrefix = segment.skipPrefix ?? getCurrentSkipPrefix();
|
|
29293
|
+
const split = splitImportedOps(segment.operations, segment);
|
|
28322
29294
|
const result = await withNestedStackContext(childCtx, () => withSkipPrefix(skipPrefix, () => withStackName(childStackName, () => withCreateTokenLedger(ledgerForStack(ctx.stateBackend, childStackName, region), () => withNestedRevertRun(runId, async (inner) => {
|
|
28323
|
-
const replayed = await replayRollback(
|
|
29295
|
+
const replayed = await replayRollback(split.replay, stateResources, childStackName, execCtx, {
|
|
28324
29296
|
afterOp: save,
|
|
28325
29297
|
onOrphan: (record) => mintedOrphans.push(record),
|
|
28326
29298
|
inlinePolicyWriters
|
|
@@ -28332,7 +29304,9 @@ async function revertNestedChildFromJournal(args) {
|
|
|
28332
29304
|
};
|
|
28333
29305
|
})))));
|
|
28334
29306
|
failures += result.failures;
|
|
28335
|
-
warnings += result.warnings;
|
|
29307
|
+
warnings += result.warnings + split.displaced.length;
|
|
29308
|
+
recordDisplacedSkips(execCtx.recordEvent, childStackName, split.displaced);
|
|
29309
|
+
for (const op of split.displaced) logger.warn(safeMsg`Nested stack ${childStackName}: ${op.logicalId} ` + safeMsg`${displacedOpClause(op, segment.importedResources ?? [], logger)}; ` + "not reverted, check that resource by hand");
|
|
28336
29310
|
}
|
|
28337
29311
|
restoring = failures === 0;
|
|
28338
29312
|
await save();
|
|
@@ -29737,8 +30711,15 @@ async function provisionCreate(logicalId, change, stateResources, stackName, tem
|
|
|
29737
30711
|
const resolvedProps = await this.resolver.resolve(desiredProps, context);
|
|
29738
30712
|
this.refuseRedactedAttributeReads(logicalId, resourceType, context);
|
|
29739
30713
|
this.perResourceTemplateProps.set(logicalId, desiredProps);
|
|
30714
|
+
const fingerprintSources = template && this.maskedInputSources(template, stateResources, conditions, stackName);
|
|
30715
|
+
if (fingerprintSources !== void 0) this.perResourceInputFingerprints.set(logicalId, await maskedInputFingerprintsFor(possiblyMaskedKeys(resolvedProps, [
|
|
30716
|
+
context.recordedSecretValues,
|
|
30717
|
+
this.fingerprintNoEchoValues,
|
|
30718
|
+
this.options.inheritedSecrets
|
|
30719
|
+
]), inputFingerprinter(desiredProps, fingerprintSources)));
|
|
29740
30720
|
this.perResourceResolvedType.set(logicalId, resourceType);
|
|
29741
30721
|
const createSecrets = context.recordedSecretValues ?? /* @__PURE__ */ new Map();
|
|
30722
|
+
if (fingerprintSources !== void 0 && resourceType === "AWS::CloudFormation::Stack") recordPassedParameterClasses(createSecrets, await classifyPassedParameters(desiredProps["Parameters"], fingerprintSources));
|
|
29742
30723
|
recordNestedStackParameterExpressions(createSecrets, resourceType, resolvedProps, desiredProps);
|
|
29743
30724
|
this.auditResolvedAssetReferences(logicalId, resourceType, resolvedProps);
|
|
29744
30725
|
this.attemptedResolvedProps.set(logicalId, resolvedProps);
|
|
@@ -32630,7 +33611,15 @@ async function provisionUpdate(logicalId, change, stateResources, stackName, tem
|
|
|
32630
33611
|
const lostChild = lostCandidate?.mode === "reattach" || lostCandidate !== void 0 && Object.hasOwn(resolvedProps, lostCandidate.property) && Object.hasOwn(currentProps, lostCandidate.property) && keyOrderFreeJson(resolvedProps[lostCandidate.property]) === keyOrderFreeJson(currentProps[lostCandidate.property]) ? lostCandidate : void 0;
|
|
32631
33612
|
const lostWithParent = lostChild?.mode === "recreate" ? lostChild.parent : void 0;
|
|
32632
33613
|
const suppliesFreshMaskOnlyValue = carriesFreshNoEchoValue(resolvedProps, updateSecrets);
|
|
32633
|
-
const
|
|
33614
|
+
const fingerprintSources = template && this.maskedInputSources(template, stateResources, conditions, stackName);
|
|
33615
|
+
const fingerprints = fingerprintSources && inputFingerprinter(desiredProps, fingerprintSources);
|
|
33616
|
+
const movedMasked = new Set(await movedMaskedProperties(currentResource, desiredProps, fingerprints));
|
|
33617
|
+
if (fingerprints !== void 0) this.perResourceInputFingerprints.set(logicalId, await maskedInputFingerprintsFor(possiblyMaskedKeys(resolvedProps, [
|
|
33618
|
+
updateSecrets,
|
|
33619
|
+
this.fingerprintNoEchoValues,
|
|
33620
|
+
this.options.inheritedSecrets
|
|
33621
|
+
]), fingerprints));
|
|
33622
|
+
if (fingerprintSources !== void 0 && resourceType === "AWS::CloudFormation::Stack") recordPassedParameterClasses(updateSecrets, await classifyPassedParameters(desiredProps["Parameters"], fingerprintSources));
|
|
32634
33623
|
const desiredForSkipCheck = redactSecretsForState(markSameGenerationBag({ ...resolvedProps }), updateSecrets, desiredProps);
|
|
32635
33624
|
const allowedSilentDrops = this.providerRegistry.getAllowedUnsupportedProperties?.();
|
|
32636
33625
|
const desiredForSkipCheckAsWritten = currentResource.provisionedBy !== "cc-api" && allowedSilentDrops ? withoutAcceptedSilentDropProperties(resourceType, desiredForSkipCheck, allowedSilentDrops, currentResource.properties) : desiredForSkipCheck;
|
|
@@ -34370,6 +35359,184 @@ function conditionVerdictRecordsEqual(a, b) {
|
|
|
34370
35359
|
return names.every((name) => Object.hasOwn(right, name) && left[name].verdict === right[name].verdict && left[name].fingerprint === right[name].fingerprint);
|
|
34371
35360
|
}
|
|
34372
35361
|
|
|
35362
|
+
//#endregion
|
|
35363
|
+
//#region src/utils/nested-template-cycle.ts
|
|
35364
|
+
const NESTED_STACK_TYPE = "AWS::CloudFormation::Stack";
|
|
35365
|
+
function isAbsoluteAssetPath(p) {
|
|
35366
|
+
return path.isAbsolute(p) || p.startsWith("/");
|
|
35367
|
+
}
|
|
35368
|
+
function templateIdentity(templatePath) {
|
|
35369
|
+
const dir = path.dirname(templatePath);
|
|
35370
|
+
let realDir;
|
|
35371
|
+
try {
|
|
35372
|
+
realDir = fs.realpathSync.native(dir);
|
|
35373
|
+
} catch {
|
|
35374
|
+
realDir = path.resolve(dir);
|
|
35375
|
+
}
|
|
35376
|
+
return path.join(realDir, path.basename(templatePath));
|
|
35377
|
+
}
|
|
35378
|
+
function listNestedTemplateRows(template) {
|
|
35379
|
+
if (template === null || typeof template !== "object") return [];
|
|
35380
|
+
const resources = template.Resources;
|
|
35381
|
+
if (resources === null || resources === void 0) return [];
|
|
35382
|
+
const rows = [];
|
|
35383
|
+
for (const [logicalId, resource] of Object.entries(resources)) {
|
|
35384
|
+
const row = resource;
|
|
35385
|
+
if (row?.Type !== NESTED_STACK_TYPE) continue;
|
|
35386
|
+
const assetPath = row.Metadata?.["aws:asset:path"];
|
|
35387
|
+
if (typeof assetPath !== "string" || assetPath.length === 0) continue;
|
|
35388
|
+
rows.push({
|
|
35389
|
+
logicalId,
|
|
35390
|
+
assetPath
|
|
35391
|
+
});
|
|
35392
|
+
}
|
|
35393
|
+
return rows;
|
|
35394
|
+
}
|
|
35395
|
+
function readNestedRows(templatePath) {
|
|
35396
|
+
let parsed;
|
|
35397
|
+
try {
|
|
35398
|
+
parsed = JSON.parse(fs.readFileSync(templatePath, "utf-8"));
|
|
35399
|
+
} catch {
|
|
35400
|
+
return;
|
|
35401
|
+
}
|
|
35402
|
+
return listNestedTemplateRows(parsed);
|
|
35403
|
+
}
|
|
35404
|
+
const MAX_NESTING_DEPTH = 512;
|
|
35405
|
+
const MAX_ROWS_FOLLOWED = 1e4;
|
|
35406
|
+
function findNestedTemplateTreeDefect(nestedTemplates, ancestorTemplatePaths = []) {
|
|
35407
|
+
const onChain = /* @__PURE__ */ new Set();
|
|
35408
|
+
for (const p of ancestorTemplatePaths) onChain.add(templateIdentity(p));
|
|
35409
|
+
const clean = /* @__PURE__ */ new Set();
|
|
35410
|
+
const chain = [];
|
|
35411
|
+
let rowsFollowed = 0;
|
|
35412
|
+
const visit = (logicalId, templatePath) => {
|
|
35413
|
+
if (typeof templatePath !== "string") return void 0;
|
|
35414
|
+
const identity = templateIdentity(templatePath);
|
|
35415
|
+
const lexical = path.resolve(templatePath);
|
|
35416
|
+
chain.push({
|
|
35417
|
+
logicalId,
|
|
35418
|
+
templatePath: identity
|
|
35419
|
+
});
|
|
35420
|
+
try {
|
|
35421
|
+
if (onChain.has(identity)) return {
|
|
35422
|
+
kind: "cycle",
|
|
35423
|
+
chain: [...chain]
|
|
35424
|
+
};
|
|
35425
|
+
if (chain.length > 512) return {
|
|
35426
|
+
kind: "too-deep",
|
|
35427
|
+
chain: [...chain]
|
|
35428
|
+
};
|
|
35429
|
+
if (++rowsFollowed > 1e4) return {
|
|
35430
|
+
kind: "too-large",
|
|
35431
|
+
chain: [...chain]
|
|
35432
|
+
};
|
|
35433
|
+
if (clean.has(lexical)) return void 0;
|
|
35434
|
+
const rows = readNestedRows(templatePath);
|
|
35435
|
+
if (rows === void 0) return void 0;
|
|
35436
|
+
onChain.add(identity);
|
|
35437
|
+
try {
|
|
35438
|
+
const dir = path.dirname(templatePath);
|
|
35439
|
+
for (const row of rows) {
|
|
35440
|
+
if (isAbsoluteAssetPath(row.assetPath)) return {
|
|
35441
|
+
kind: "absolute-path",
|
|
35442
|
+
chain: [...chain],
|
|
35443
|
+
logicalId: row.logicalId,
|
|
35444
|
+
assetPath: row.assetPath
|
|
35445
|
+
};
|
|
35446
|
+
const resolved = resolveAssemblyPath(dir, row.assetPath);
|
|
35447
|
+
if (!resolved.contained) return {
|
|
35448
|
+
kind: "escaping-path",
|
|
35449
|
+
chain: [...chain],
|
|
35450
|
+
logicalId: row.logicalId,
|
|
35451
|
+
assetPath: row.assetPath,
|
|
35452
|
+
escape: resolved,
|
|
35453
|
+
dir
|
|
35454
|
+
};
|
|
35455
|
+
const defect = visit(row.logicalId, resolved.path);
|
|
35456
|
+
if (defect) return defect;
|
|
35457
|
+
}
|
|
35458
|
+
} finally {
|
|
35459
|
+
onChain.delete(identity);
|
|
35460
|
+
}
|
|
35461
|
+
clean.add(lexical);
|
|
35462
|
+
return;
|
|
35463
|
+
} finally {
|
|
35464
|
+
chain.pop();
|
|
35465
|
+
}
|
|
35466
|
+
};
|
|
35467
|
+
for (const [logicalId, templatePath] of Object.entries(nestedTemplates)) {
|
|
35468
|
+
const defect = visit(logicalId, templatePath);
|
|
35469
|
+
if (defect) return defect;
|
|
35470
|
+
}
|
|
35471
|
+
}
|
|
35472
|
+
const MAX_RENDERED_HOPS = 8;
|
|
35473
|
+
function renderChain(chain) {
|
|
35474
|
+
const hop = (h) => `${displayIdent(h.logicalId)} (${displayAssemblyPath(h.templatePath)})`;
|
|
35475
|
+
if (chain.length <= MAX_RENDERED_HOPS) return chain.map(hop).join(" then ");
|
|
35476
|
+
const keep = MAX_RENDERED_HOPS / 2;
|
|
35477
|
+
return [
|
|
35478
|
+
...chain.slice(0, keep).map(hop),
|
|
35479
|
+
`... ${chain.length - 8} more ...`,
|
|
35480
|
+
...chain.slice(-4).map(hop)
|
|
35481
|
+
].join(" then ");
|
|
35482
|
+
}
|
|
35483
|
+
function renderNestedTemplateTreeDefect(defect, stackName, action) {
|
|
35484
|
+
const provenance = `CDK emits an acyclic nested template tree with relative asset paths, so this indicates the synth output was hand-modified or generated by a non-CDK toolchain. Refusing to ${action}.`;
|
|
35485
|
+
const owner = (chain) => {
|
|
35486
|
+
const ids = chain.slice(0, -1).map((h) => h.logicalId);
|
|
35487
|
+
const keep = MAX_RENDERED_HOPS / 2;
|
|
35488
|
+
if (ids.length <= MAX_RENDERED_HOPS) return displayStackName([stackName, ...ids].join("~"));
|
|
35489
|
+
const head = displayStackName([stackName, ...ids.slice(0, keep)].join("~"));
|
|
35490
|
+
const tail = displayStackName(ids.slice(-4).join("~"));
|
|
35491
|
+
return `${head}~...${ids.length - 8} more...~${tail}`;
|
|
35492
|
+
};
|
|
35493
|
+
if (defect.kind === "cycle") {
|
|
35494
|
+
const closing = defect.chain[defect.chain.length - 1];
|
|
35495
|
+
return `The nested template tree under stack ${displayStackName(stackName)} contains a cycle: ${renderChain(defect.chain)}. Nested stack ${displayIdent(closing.logicalId)} (declared in stack ${owner(defect.chain)}) resolves to a template that is already on that nesting chain, so its Metadata['aws:asset:path'] closes a cycle. ${provenance}`;
|
|
35496
|
+
}
|
|
35497
|
+
if (defect.kind === "too-large") return `The nested template tree under stack ${displayStackName(stackName)} has more than ${MAX_ROWS_FOLLOWED} nested-stack rows to follow (the walk stopped at ${renderChain(defect.chain)}). That is far beyond any CDK-generated assembly. Symlinked directories can give one template file many paths, which multiplies the tree without ever repeating on one chain. Refusing to ${action}.`;
|
|
35498
|
+
if (defect.kind === "too-deep") return `The nested template tree under stack ${displayStackName(stackName)} nests more than ${512} levels deep: ${renderChain(defect.chain)}. No tree that deep can deploy, because each level lengthens the child's state key and S3 caps a key at 1024 bytes. ${provenance}`;
|
|
35499
|
+
if (defect.kind === "escaping-path") return `The nested template tree under stack ${displayStackName(stackName)} has nested stack ${displayIdent(defect.logicalId)} (reached through ${renderChain(defect.chain)}) with Metadata['aws:asset:path']=${displayAssemblyPath(defect.assetPath)} which ${renderAssemblyPathEscape(defect.escape, defect.dir, action)}`;
|
|
35500
|
+
return `The nested template tree under stack ${displayStackName(stackName)} has nested stack ${displayIdent(defect.logicalId)} (reached through ${renderChain(defect.chain)}) with Metadata['aws:asset:path']=${displayAssemblyPath(defect.assetPath)} which is absolute. ${provenance}`;
|
|
35501
|
+
}
|
|
35502
|
+
|
|
35503
|
+
//#endregion
|
|
35504
|
+
//#region src/deployment/nested-output-templates.ts
|
|
35505
|
+
function childTemplateLoader(nestedTemplates) {
|
|
35506
|
+
if (nestedTemplates === void 0) return void 0;
|
|
35507
|
+
const read = /* @__PURE__ */ new Map();
|
|
35508
|
+
const loaderOver = (index) => (logicalId) => {
|
|
35509
|
+
const templatePath = index[logicalId];
|
|
35510
|
+
if (typeof templatePath !== "string") return void 0;
|
|
35511
|
+
const key = path.resolve(templatePath);
|
|
35512
|
+
if (read.has(key)) return read.get(key);
|
|
35513
|
+
let entry;
|
|
35514
|
+
try {
|
|
35515
|
+
const parsed = JSON.parse(fs.readFileSync(templatePath, "utf-8"));
|
|
35516
|
+
if (parsed !== null && typeof parsed === "object" && !Array.isArray(parsed)) entry = {
|
|
35517
|
+
template: parsed,
|
|
35518
|
+
identity: templateIdentity(templatePath),
|
|
35519
|
+
childTemplate: loaderOver(childIndex(parsed, templatePath))
|
|
35520
|
+
};
|
|
35521
|
+
} catch {
|
|
35522
|
+
entry = void 0;
|
|
35523
|
+
}
|
|
35524
|
+
read.set(key, entry);
|
|
35525
|
+
return entry;
|
|
35526
|
+
};
|
|
35527
|
+
return loaderOver(nestedTemplates);
|
|
35528
|
+
}
|
|
35529
|
+
function childIndex(template, templatePath) {
|
|
35530
|
+
const dir = path.dirname(templatePath);
|
|
35531
|
+
const index = Object.create(null);
|
|
35532
|
+
for (const { logicalId, assetPath } of listNestedTemplateRows(template)) {
|
|
35533
|
+
if (isAbsoluteAssetPath(assetPath)) continue;
|
|
35534
|
+
const resolved = resolveAssemblyPath(dir, assetPath);
|
|
35535
|
+
if (resolved.contained) index[logicalId] = resolved.path;
|
|
35536
|
+
}
|
|
35537
|
+
return index;
|
|
35538
|
+
}
|
|
35539
|
+
|
|
34373
35540
|
//#endregion
|
|
34374
35541
|
//#region src/deployment/recreate-target-promotion.ts
|
|
34375
35542
|
function recreateTargetIdsFor(recreateTargets, stackName) {
|
|
@@ -34476,6 +35643,14 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
|
|
|
34476
35643
|
this.logger.debug(`Resolved ${Object.keys(parameterValues).length} parameters: ${Object.keys(parameterValues).join(", ")}`);
|
|
34477
35644
|
const backfillNoEchoValues = noEchoParameterValueSeed(template.Parameters, parameterValues, this.options.inheritedSecrets, this.options.parameters);
|
|
34478
35645
|
this.fingerprintNoEchoValues = backfillNoEchoValues;
|
|
35646
|
+
this.fingerprintParameters = parameterInputsFor({
|
|
35647
|
+
template,
|
|
35648
|
+
values: parameterValues,
|
|
35649
|
+
nestedChild: this.options.parentStackInfo !== void 0,
|
|
35650
|
+
supplied: this.options.parameters,
|
|
35651
|
+
passedClasses: this.options.passedParameterClasses
|
|
35652
|
+
});
|
|
35653
|
+
this.fingerprintChildTemplates = childTemplateLoader(getCurrentNestedStackContext()?.nestedTemplates);
|
|
34479
35654
|
let maskedFingerprintsBackfilled = backfillMaskedPropertyFingerprints(currentState.resources, template, backfillNoEchoValues) > 0;
|
|
34480
35655
|
const context = this.buildResolverContext({
|
|
34481
35656
|
template,
|
|
@@ -34527,8 +35702,19 @@ async function doDeployWithPrefetch(stackName, template, createOnlyPrefetch) {
|
|
|
34527
35702
|
diffResolverContext.bestEffort = true;
|
|
34528
35703
|
diffResolverContext.skipDynamicReferences = true;
|
|
34529
35704
|
const diffResolveFn = (value) => this.resolver.resolve(value, diffResolverContext);
|
|
34530
|
-
const
|
|
35705
|
+
const maskedInputSourcesForDiff = this.maskedInputSources(effectiveTemplate, currentState.resources, conditions, stackName);
|
|
35706
|
+
const maskedInputs = maskedInputSourcesForDiff && {
|
|
35707
|
+
sources: maskedInputSourcesForDiff,
|
|
35708
|
+
rebaselined: /* @__PURE__ */ new Map()
|
|
35709
|
+
};
|
|
35710
|
+
const changes = await this.diffCalculator.calculateDiff(currentState, effectiveTemplate, diffResolveFn, makeCanonicalizePropertiesFn(this.providerRegistry), this.providerRegistry.getAllowedUnsupportedProperties?.(), this.freshNoEchoParameters(parameterValues), this.diffLogMasker(diffResolverContext.recordedSecretValues, effectiveTemplate, parameterValues), recreateTargetIdsFor(this.options.recreateTargets, stackName), maskedInputs);
|
|
34531
35711
|
createOnlyPrefetch.cancel();
|
|
35712
|
+
for (const [logicalId, fingerprints] of maskedInputs?.rebaselined ?? []) {
|
|
35713
|
+
const record = currentState.resources[logicalId];
|
|
35714
|
+
if (record === void 0) continue;
|
|
35715
|
+
currentState.resources[logicalId] = withRebaselinedFingerprints(record, fingerprints);
|
|
35716
|
+
maskedFingerprintsBackfilled = true;
|
|
35717
|
+
}
|
|
34532
35718
|
const nestedStackTypeChanges = findNestedStackTypeChanges({
|
|
34533
35719
|
changes,
|
|
34534
35720
|
stateResources: currentState.resources
|
|
@@ -34712,6 +35898,54 @@ function buildResolverContext(base, stackName) {
|
|
|
34712
35898
|
...base.redactedAttributeReads && { redactedAttributeReads: base.redactedAttributeReads }
|
|
34713
35899
|
};
|
|
34714
35900
|
}
|
|
35901
|
+
function getAttTargetOf(node) {
|
|
35902
|
+
if (node === null || typeof node !== "object" || Array.isArray(node)) return void 0;
|
|
35903
|
+
const getAtt = node["Fn::GetAtt"];
|
|
35904
|
+
if (Array.isArray(getAtt) && typeof getAtt[0] === "string") return getAtt[0];
|
|
35905
|
+
if (typeof getAtt === "string") return getAtt.split(".")[0];
|
|
35906
|
+
}
|
|
35907
|
+
function maskedInputSources(template, resources, conditions, stackName) {
|
|
35908
|
+
const parameters = this.fingerprintParameters;
|
|
35909
|
+
if (parameters === void 0) return void 0;
|
|
35910
|
+
return {
|
|
35911
|
+
template,
|
|
35912
|
+
parameterInput: parameters.parameterInput,
|
|
35913
|
+
conditions,
|
|
35914
|
+
childTemplate: this.fingerprintChildTemplates,
|
|
35915
|
+
resolve: async (node) => {
|
|
35916
|
+
const { attributeHealer: _healer, ...base } = this.buildResolverContext({
|
|
35917
|
+
template,
|
|
35918
|
+
resources,
|
|
35919
|
+
parameters: parameters.bound,
|
|
35920
|
+
...conditions && { conditions }
|
|
35921
|
+
}, stackName);
|
|
35922
|
+
const context = {
|
|
35923
|
+
...base,
|
|
35924
|
+
recordedImports: [],
|
|
35925
|
+
recordedOutputReads: [],
|
|
35926
|
+
bestEffort: true,
|
|
35927
|
+
skipDynamicReferences: true,
|
|
35928
|
+
staleAttributeHeal: { phase: "probe" }
|
|
35929
|
+
};
|
|
35930
|
+
const value = await this.resolver.resolve(structuredClone(node), context);
|
|
35931
|
+
const secrets = context.recordedSecretValues;
|
|
35932
|
+
const target = getAttTargetOf(node);
|
|
35933
|
+
const targetSecrets = target === void 0 ? void 0 : this.perResourceSecrets.get(target);
|
|
35934
|
+
if (targetSecrets !== void 0 && hasMaskableValues(targetSecrets)) {
|
|
35935
|
+
const probe = { value };
|
|
35936
|
+
const redacted = redactSecretsForState(probe, targetSecrets);
|
|
35937
|
+
if (JSON.stringify(redacted) !== JSON.stringify(probe)) return {
|
|
35938
|
+
value,
|
|
35939
|
+
keepAsWritten: true
|
|
35940
|
+
};
|
|
35941
|
+
}
|
|
35942
|
+
return {
|
|
35943
|
+
value,
|
|
35944
|
+
...secrets && { secrets }
|
|
35945
|
+
};
|
|
35946
|
+
}
|
|
35947
|
+
};
|
|
35948
|
+
}
|
|
34715
35949
|
|
|
34716
35950
|
//#endregion
|
|
34717
35951
|
//#region src/deployment/label-routing.ts
|
|
@@ -34936,6 +36170,9 @@ var DeployEngine = class {
|
|
|
34936
36170
|
perResourceTemplateProps = /* @__PURE__ */ new Map();
|
|
34937
36171
|
perResourceResolvedType = /* @__PURE__ */ new Map();
|
|
34938
36172
|
fingerprintNoEchoValues = void 0;
|
|
36173
|
+
fingerprintParameters = void 0;
|
|
36174
|
+
fingerprintChildTemplates = void 0;
|
|
36175
|
+
perResourceInputFingerprints = /* @__PURE__ */ new Map();
|
|
34939
36176
|
outputSecrets = /* @__PURE__ */ new Map();
|
|
34940
36177
|
outputsPassSecretMaps = [];
|
|
34941
36178
|
outputsTemplateSource = Object.create(null);
|
|
@@ -34984,6 +36221,9 @@ var DeployEngine = class {
|
|
|
34984
36221
|
this.perResourceTemplateProps = /* @__PURE__ */ new Map();
|
|
34985
36222
|
this.perResourceResolvedType = /* @__PURE__ */ new Map();
|
|
34986
36223
|
this.fingerprintNoEchoValues = void 0;
|
|
36224
|
+
this.fingerprintParameters = void 0;
|
|
36225
|
+
this.fingerprintChildTemplates = void 0;
|
|
36226
|
+
this.perResourceInputFingerprints = /* @__PURE__ */ new Map();
|
|
34987
36227
|
this.attemptedResolvedProps = /* @__PURE__ */ new Map();
|
|
34988
36228
|
this.liveTaskLabels = /* @__PURE__ */ new Map();
|
|
34989
36229
|
this.outputSecrets = /* @__PURE__ */ new Map();
|
|
@@ -35011,14 +36251,14 @@ var DeployEngine = class {
|
|
|
35011
36251
|
const secrets = this.perResourceSecrets.get(logicalId);
|
|
35012
36252
|
const templateProps = this.perResourceTemplateProps.get(logicalId);
|
|
35013
36253
|
const scrubbed = scrubResourceRecord(this.withHealedAttributes(logicalId, record), secrets ?? /* @__PURE__ */ new Map(), templateProps);
|
|
35014
|
-
resources[logicalId] = withMaskedPropertyFingerprints(scrubbed, record.properties, templateProps, secrets, this.fingerprintNoEchoValues);
|
|
36254
|
+
resources[logicalId] = withMaskedPropertyFingerprints(scrubbed, record.properties, templateProps, secrets, this.fingerprintNoEchoValues, this.perResourceInputFingerprints.get(logicalId));
|
|
35015
36255
|
}
|
|
35016
36256
|
const orphans = state.orphans?.map((entry) => {
|
|
35017
36257
|
const sameResource = this.perResourceResolvedType.get(entry.logicalId) === entry.state.resourceType;
|
|
35018
36258
|
const orphanTemplateProps = sameResource ? this.perResourceTemplateProps.get(entry.logicalId) : void 0;
|
|
35019
36259
|
return {
|
|
35020
36260
|
...entry,
|
|
35021
|
-
state: withMaskedPropertyFingerprints(scrubResourceRecord(entry.state, (sameResource ? this.perResourceSecrets.get(entry.logicalId) : void 0) ?? /* @__PURE__ */ new Map(), orphanTemplateProps), entry.state.properties, orphanTemplateProps, sameResource ? this.perResourceSecrets.get(entry.logicalId) : void 0, sameResource ? this.fingerprintNoEchoValues : void 0)
|
|
36261
|
+
state: withMaskedPropertyFingerprints(scrubResourceRecord(entry.state, (sameResource ? this.perResourceSecrets.get(entry.logicalId) : void 0) ?? /* @__PURE__ */ new Map(), orphanTemplateProps), entry.state.properties, orphanTemplateProps, sameResource ? this.perResourceSecrets.get(entry.logicalId) : void 0, sameResource ? this.fingerprintNoEchoValues : void 0, sameResource ? this.perResourceInputFingerprints.get(entry.logicalId) : void 0)
|
|
35022
36262
|
};
|
|
35023
36263
|
});
|
|
35024
36264
|
const outputs = this.redactOutputs(state.outputs);
|
|
@@ -35134,6 +36374,7 @@ DeployEngine.prototype.recreateDirectionFor = recreateDirectionFor;
|
|
|
35134
36374
|
DeployEngine.prototype.peekRoutingForLabel = peekRoutingForLabel;
|
|
35135
36375
|
DeployEngine.prototype.preparePropertiesForCcApi = preparePropertiesForCcApi;
|
|
35136
36376
|
DeployEngine.prototype.buildResolverContext = buildResolverContext;
|
|
36377
|
+
DeployEngine.prototype.maskedInputSources = maskedInputSources;
|
|
35137
36378
|
DeployEngine.prototype.doDeployWithPrefetch = doDeployWithPrefetch;
|
|
35138
36379
|
DeployEngine.prototype.executeDeployment = executeDeployment;
|
|
35139
36380
|
DeployEngine.prototype.persistStateAfterOutputFailure = persistStateAfterOutputFailure;
|
|
@@ -35191,5 +36432,5 @@ DeployEngine.prototype.replacementNameOrigin = replacementNameOrigin;
|
|
|
35191
36432
|
DeployEngine.prototype.orphanedNameCollisionAdvice = orphanedNameCollisionAdvice;
|
|
35192
36433
|
|
|
35193
36434
|
//#endregion
|
|
35194
|
-
export { nestedChildStackName as $, hasReadableExportSet as $a, requireConfigObject as $i, s3BucketDomainName as $n, resolveAutoAssetStorage as $o, refuseMalformedOrphanRecordsForDestroy as $r, earliestDefined as $t, ECR_AUTO_DELETE_IMAGES_TAG as A, recoverMaskedOutput as Aa, unwrittenCreateOnlyReplacement as Ai, ec2InstanceProtectionSite as An, describeDockerExecFailure as Ao, malformedDriftResourcePropertiesWarning as Ar, renderAssemblyPathEscape as As, redactedDeleteAddressSkip as At, gray as B, STATE_SOURCED_BASELINE_RULES as Ba, WARM_THROUGHPUT_MEMBERS as Bi, regionLessSecretName as Bn, redactedDockerCause as Bo, malformedOrphansWarning as Br, secretBearingStateKeyWarning as Bt, deleteBudgetKey as C, createSecretMasker as Ca, repairMalformedResourcePropertiesForReadOnly as Ci, UNSPECIFIED_SKIP_REASON as Cn, readBootstrapMarkerBody as Co, deployRefusesOrphanRowsReason as Cr, hasOwnKey as Cs, effectiveDeletionPolicy as Ct, INDEX_SETTLE_POLL_INTERVAL_MS as D, markSameGenerationBag as Da, unreadableResourceEntries as Di, isWaitAbandonedError as Dn, buildDockerImage as Do, hasReadableResources as Dr, absoluteAssemblyPathEscape as Ds, REDACTED_DELETE_ADDRESS_SKIP_REASON as Dt, DELETE_INDEX_WAIT_PROCEED_NOTE as E, maskSecretsInText as Ea, unreadableOrphanRecords as Ei, withIndeterminateGuard as En, buildDenyExternalAccessPolicy as Eo, hasReadableOutputs as Er, ownValue as Es, unsupportedFinalSnapshotError as Et, markRefusedBeforeApplying as F, identityKeyFor as Fa, shownType as Fi, DiffCalculator as Fn, getDockerCmd as Fo, malformedLocalResourcesWarning as Fr, extractDeploymentEventError as Ft, namesAnyDeclaredParameter as G, isSingleDynamicReferenceToken as Ga, coerceCfnBoolean as Gi, isIamRoleArn as Gn, stripControlChars as Go, malformedResourcePropertiesWarning as Gr, collectDeclaredOutputNames as Gt, red as H, STATE_SOURCED_READBACK_RULES as Ha, isWarmThroughputDecrease as Hi, assertFlagRoleArn as Hn, runDockerStreaming as Ho, malformedOutputsWarning as Hr, exportNameSecretExposure as Ht, formatResourceLine as I, carriesSecretMask as Ia, MULTI_REGION_RECREATE_BLOCKED_TYPES as Ii, INTRINSIC_KEYS as In, isDockerClientEnvKey as Io, malformedOrphanRecordsRefusalMessage as Ir, WITHHELD_NAME_DISPLAY as It, makeSiblingClaimReader as J, S3StateBackend as Ja, configIntegerRefusal as Ji, applyCallerIdentityCredentials as Jn, Synthesizer as Jo, malformedStateRefusalMessage as Jr, bindingSkippedOutputs as Jt, reachableDivergentParameters as K, LockManager as Ka, coerceCfnInteger as Ki, sendableAssumeRoleCommand as Kn, AssetManifestLoader as Ko, malformedResourcesWarning as Kr, collectPublishedOutputNames as Kt, createReadOnlyAttributeHealerFactory as L, recordMaskOnlyValue as La, isStatefulRecreateTargetForReplace as Li, IntrinsicFunctionResolver as Ln, isMalformedEnvKey as Lo, malformedOrphanRecordsWarning as Lr, displayTextOrWithheld as Lt, hasCdkAutoDeleteTag as M, dynamicReferenceTokens as Ma, NO_CC_HANDLERS_REASON as Mi, observeThenDisableInstanceApiTermination as Mn, dockerSpawnEnvWithSensitive as Mo, malformedExportSourceWarning as Mr, clearBucketRegionCache as Ms, updatePartialReason as Mt, isTruthyCfnBoolean as N, isUncertifiedBaselineMaskPosition as Na, hasNoCloudControlHandlers as Ni, reDisableInstanceApiTermination as Nn, finchSecretArgvRefusal as No, malformedLocalOutputsWarning as Nr, resolveBucketRegion as Ns, DeploymentEventsReader as Nt, deleteTableWithIndexBusyRetry as O, redactSecretsForState as Oa, findActionableSilentDrops as Oi, markWaitAbandoned as On, resolveDockerContextDirectory as Oo, isReadableOrphanRecord as Or, describeFileReadFailure as Os, isRedactedRecordedValue as Ot, getPriorAttempts as P, pathCrossesDottedKey as Pa, findReplacedReadersOfRecreateTargets as Pi, reEnableInstanceApiTermination as Pn, formatDockerLoginError as Po, malformedLocalResourceEntriesWarning as Pr, DeploymentEventsStore as Pt, getNestedRevertRun as Q, exportNamesCarriedFrom as Qa, requireConfigArray as Qi, s3BucketArn as Qn, resolveApp as Qo, refuseMalformedOrphanRecords as Qr, RollbackInlinePolicyWriters as Qt, bold as R, recordMaskOnlyValuesIn as Ra, isStatefulRecreateTargetSync as Ri, classifyReplaySecretRegion as Rn, partitionSensitiveEnv as Ro, malformedOrphanRowsKeptWarning as Rr, exportAliasCollisionScrubWarning as Rt, compensateRemovedDeletionProtection as S, shareLogOnlyValues as Sa, repairMalformedResourceEntriesForReadOnly as Si, unchangedBehindSecretReference as Sn, parseBootstrapMarker as So, UNREADABLE_RESOURCES_MAP_ROW as Sr, defineOwnKey as Ss, createPreDeleteFinalSnapshot as St, resolveDynamoDbDeleteBudgetMs as T, maskSecretsInError as Ta, unpreviewableOrphanRecords as Ti, deleteSkipReason as Tn, validateContainerRepoName as To, hasReadableOrphans as Tr, nullPrototypeRecord as Ts, refusesFinalSnapshot as Tt, yellow as U, TEMPLATE_SOURCED_RULES as Ua, toCfnInteger as Ui, assertSendableRoleArn as Un, warnFinchArgvExposure as Uo, malformedRenderedContainersWarning as Ur, isWholeDynamicReferenceValue as Ut, green as V, STATE_SOURCED_CROSS_GENERATION_RULES as Va, coerceWarmThroughput as Vi, applyRoleArnIfSet as Vn, runDockerForeground as Vo, malformedOutputsRefusalMessage as Vr, secretSafeKeyDisplay as Vt, computeParameterTaint as W, WHOLE_DYNAMIC_REFERENCE_PATTERN as Wa, toFiniteNumber as Wi, explicitRoleArnOrThrow as Wn, escapeRegExp$2 as Wo, malformedResourceEntriesWarning as Wr, noEchoParameterValueSeed as Wt, NESTED_PENDING_PARENT_REASON as X, acceptedCreateOnlyDropsOf as Xa, readConfigString as Xi, envCredentialsAreAssumedRole as Xn, getDefaultStateBucketName as Xo, refuseDivergentRecordRegionForDestroy as Xr, DEFAULT_RESOURCE_WARN_AFTER_MS as Xt, planOrphanAdoption as Y, rebuildClientForBucketRegion as Ya, configStringRefusal as Yi, callerEnvCredentials as Yn, synthesisStatusMessage as Yo, previewableOrphanRecords as Yr, DEFAULT_RESOURCE_TIMEOUT_MS as Yt, dropSettledNestedJournals as Z, describeRegionValueKind as Za, replayWarn as Zi, isSettledInstanceState as Zn, getLegacyStateBucketName as Zo, refuseMalformedNestedChildOutputs as Zr, maskingRetryLogger as Zt, perType as _, literalSplitDelimitersOf as _a, refuseMalformedResourcesForExport as _i, isCustomResourceType as _n, BOOTSTRAP_MARKER_PREFIX as _o, withSharedDrainBudget as _r, canonicalizeRegion as _s, inheritProducerRegions as _t, conditionInputsFrom as a, markAuxiliaryFailure as aa, refuseMalformedResourceAttributesForOrphan as ai, DBPROXY_TAG_OPTIONS as an, orphansAfterRollback as ao, parameterTypeMayLoseSecretIdentity as ar, stateBucketExistenceConfirmed as as, replayFailedOperations as at, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as b, recordLogOnlyParameterValue as ba, repairMalformedOrphansForReadOnly as bi, slowCcOperationTimeoutMs as bn, getBootstrapMarkerKey as bo, STATE_RESOURCES_MALFORMED as br, StageLoadError as bs, buildFinalSnapshotIdentifier as bt, isSecretBearingReferenceString as c, sameLambdaFunctionAddress as ca, refuseMalformedResourceEntriesForDestroy as ci, refuseMalformedDesiredTags as cn, AssetPublisher as co, carriesDynamicReference as cr, CFN_TEMPLATE_BODY_LIMIT as cs, destroyStackRecordsView as ct, makeCanonicalizePropertiesFn as d, liveMatchesUnresolvedTokenFrame as da, refuseMalformedResourceEntriesForOrphan as di, definedAttributes as dn, WorkGraph as do, keepsSecretReferenceToken as dr, findLargeInlineResources as ds, recordAfterRollbackUpdate as dt, requireConfigString as ea, refuseMalformedOrphans as ei, ledgerForStack as en, hasReasonlessBaselineRefusal as eo, s3BucketDualStackDomainName as er, resolveCaptureObservedState as es, revertNestedChildFromJournal as et, withResourceDeadline as f, inheritNestedStackParameterAssociations as fa, refuseMalformedResourcePropertiesForDrift as fi, stringifyIfAssigned as fn, buildAssetRedirectMap as fo, AWS_NO_VALUE as fr, uploadCfnTemplate as fs, planFailedOps as ft, isProtectionValueActive as g, hasMaskableValues as ga, refuseMalformedResourcesForDestroy as gi, wouldReturnToSdkProvider as gn, AssetModeResolver as go, parseWebACLArn as gr, PARTITION_TABLE as gs, getCurrentProducerRegions as gt, PROTECTION_PROPERTY_BY_TYPE as h, createUnionSecretMasker as ha, refuseMalformedResourcesForDeploy as hi, ccBrokenReason as hn, rewriteTemplateAssetReferences as ho, refStateLookupFromResource as hr, expectedOwnerParam as hs, findNestedStackTypeChanges as ht, conditionFingerprint as i, withRetry as ia, refuseMalformedOutputsForDestroy as ii, DBPROXY_TAGS_WHAT as in, isReadableBag as io, isUnboundTemplateParameter as ir, resolveUseCdkBootstrapAssets as is, withNestedStackContext as it, S3_AUTO_DELETE_OBJECTS_TAG as j, DYNAMIC_REFERENCE_TOKEN_SCAN as ja, withoutSilentDropProperties as ji, isTerminationProtectionPropagationError as jn, describeDockerFailure as jo, malformedExportNamesWarning as jr, resolveAssemblyPath as js, updatePartialMessage as jt, waitForIndexesSettled as k, scrubResourceRecord as ka, findSilentDropProperties as ki, disableInstanceApiTermination as kn, describeDockerCapturedOutput as ko, isReadableResourceEntry as kr, displayAssemblyPath as ks, redactedDeleteAddressFields as kt, keptWholeReasonText as l, DagBuilder as la, refuseMalformedResourceEntriesForImport as li, tagMapAsList as ln, isSensitiveAttributeName as lo, carriesFetchableDynamicReference as lr, CFN_TEMPLATE_URL_LIMIT as ls, getStackRecords as lt, recordedProtectionNote as m, carryLogOnlyValues as ma, refuseMalformedResourcePropertiesForOrphan as mi, ProviderRegistry as mn, loadPublishableAssetManifest as mo, isStalePlaceholderArnAttribute as mr, decodeListingKey as ms, resolveReplacementOldType as mt, IMPLICIT_DELETE_DEPENDENCIES as n, templateResourceTypes as na, refuseMalformedOrphansForOrphan as ni, withCreateTokenLedger as nn, importableOutputKeys as no, s3BucketWebsiteUrl as nr, resolveStateBucketWithDefault as ns, withNestedRevertRun as nt, parentSuppliedValues as o, canonicalLambdaFunctionName as oa, refuseMalformedResourceEntries as oi, planTagDiff as on, orphansCarriedFrom as oo, getAccountInfo as or, warnDeprecatedNoPrefixCliFlag as os, replayRollback as ot, recordedProtectionEvidence as p, recordNestedStackParameterExpressions as pa, refuseMalformedResourcePropertiesForExport as pi, CC_BROKEN_REASON as pn, createAssetRedirectResolver as po, cfnRefValueFromPhysicalId as pr, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as ps, planRollback as pt, resourcesNamingDeclaredParameter as q, isLockInfoExpired as qa, configBooleanRefusal as qi, AWS_CREDENTIAL_ENV_KEYS as qn, getDockerImageBySourceHash as qo, malformedScrubResourceEntriesRefusalMessage as qr, isExportAliasCollision as qt, computeImplicitDeleteEdges as r, describeTypeWithThrottleRetry as ra, refuseMalformedOutputs as ri, acquireIdempotencyToken as rn, importableOutputs as ro, coerceParameterTypedValue as rr, resolveStateBucketWithDefaultAndSource as rs, getCurrentNestedStackContext as rt, readRecordedConditionVerdicts as s, lambdaFunctionNameForMask as sa, refuseMalformedResourceEntriesForDeploy as si, readTagList as sn, shouldRetainResource as so, isImpossibleEmptyStoredAttribute as sr, ssmResolvedValueType as ss, awaitInFlightSibling as st, DeployEngine as t, prefetchCreateOnlyPropertyPaths as ta, refuseMalformedOrphansForDestroy as ti, reserveStackCreateToken as tn, hasUnverifiableParameterRefusal as to, s3BucketRegionalDomainName as tr, resolveSkipPrefix as ts, revertedNestedRowIds as tt, mergeNoChangeOutputs as u, TemplateParser as ua, refuseMalformedResourceEntriesForImportSave as ui, tagPlanWarning as un, stringifyValue as uo, isNamelessDynamicReferenceError as ur, MIGRATE_TMP_PREFIX as us, withStackRecords as ut, readProtection as v, logOnlyValueCount as va, refuseMalformedState as vi, getCurrentResourceSecrets as vn, assertAssetBucketRegion as vo, JSON_LISTING_HOLE_VALUE as vr, derivePartitionAndUrlSuffix as vs, ATOMIC_FINAL_SNAPSHOT_TYPES as vt, resolveDynamoDbDeleteBudgetClock as w, errorCauseChain as wa, repairMalformedResourcesForReadOnly as wi, deleteIndeterminateGuards as wn, validateAssetBucketName as wo, displayLogicalId as wr, hasPlainPrototype$1 as ws, isFinalSnapshotError as wt, beginDeleteWait as x, recordLogOnlyValue as xa, repairMalformedOutputsForReadOnly as xi, ccProtectionRegistryTypes as xn, isCrossRegionRedirect as xo, UNREADABLE_ORPHANS_CONTAINER_ROW as xr, processStackMessages as xs, ccRoutedFinalSnapshotError as xt, DynamoDBGlobalTableProvider as y, printingCorpusOf as ya, repairMalformedOrphanRecordsForReadOnly as yi, CloudControlProvider as yn, ensureAssetStorage as yo, STATE_REGION_DIVERGED as yr, AssemblyReader as ys, PRE_DELETE_SNAPSHOT_TYPES as yt, cyan as z, recordNoEchoAttributeValues as za, renderStatefulReason as zi, producerRegionsFromState as zn, redactDockerArgvValues as zo, malformedOrphansRefusalMessage as zr, secretBearing as zt };
|
|
35195
|
-
//# sourceMappingURL=deploy-engine-
|
|
36435
|
+
export { resourcesNamingDeclaredParameter as $, STATE_SOURCED_READBACK_RULES as $a, isWarmThroughputDecrease as $i, explicitRoleArnOrThrow as $n, runDockerForeground as $o, malformedOutputsWarning as $r, noEchoParameterValueSeed as $t, resolveDynamoDbDeleteBudgetClock as A, printingCorpusOf as Aa, repairMalformedOrphanRecordsForReadOnly as Ai, ccProtectionRegistryTypes as An, assertAssetBucketRegion as Ao, STATE_REGION_DIVERGED as Ar, derivePartitionAndUrlSuffix as As, ccRoutedFinalSnapshotError as At, getPriorAttempts as B, scrubResourceRecord as Ba, findSilentDropProperties as Bi, isTerminationProtectionPropagationError as Bn, resolveDockerContextDirectory as Bo, isReadableResourceEntry as Br, describeFileReadFailure as Bs, updatePartialMessage as Bt, perType as C, inheritNestedStackParameterAssociations as Ca, refuseMalformedResourcePropertiesForDrift as Ci, ProviderRegistry as Cn, WorkGraph as Co, isStalePlaceholderArnAttribute as Cr, findLargeInlineResources as Cs, resolveReplacementOldType as Ct, beginDeleteWait as D, hasMaskableValues as Da, refuseMalformedResourcesForDestroy as Di, getCurrentResourceSecrets as Dn, rewriteTemplateAssetReferences as Do, parameterInputsFor as Dr, expectedOwnerParam as Ds, ATOMIC_FINAL_SNAPSHOT_TYPES as Dt, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as E, createUnionSecretMasker as Ea, refuseMalformedResourcesForDeploy as Ei, isCustomResourceType as En, loadPublishableAssetManifest as Eo, withSharedDrainBudget as Er, decodeListingKey as Es, inheritProducerRegions as Et, waitForIndexesSettled as F, errorCauseChain as Fa, repairMalformedResourcesForReadOnly as Fi, withIndeterminateGuard as Fn, readBootstrapMarkerBody as Fo, displayLogicalId as Fr, hasOwnKey as Fs, unsupportedFinalSnapshotError as Ft, cyan as G, pathCrossesDottedKey as Ga, findReplacedReadersOfRecreateTargets as Gi, INTRINSIC_KEYS as Gn, finchSecretArgvRefusal as Go, malformedLocalResourceEntriesWarning as Gr, resolveBucketRegion as Gs, WITHHELD_NAME_DISPLAY as Gt, formatResourceLine as H, DYNAMIC_REFERENCE_TOKEN_SCAN as Ha, withoutSilentDropProperties as Hi, reDisableInstanceApiTermination as Hn, describeDockerExecFailure as Ho, malformedExportNamesWarning as Hr, renderAssemblyPathEscape as Hs, DeploymentEventsReader as Ht, ECR_AUTO_DELETE_IMAGES_TAG as I, maskSecretsInError as Ia, unpreviewableOrphanRecords as Ii, isWaitAbandonedError as In, validateAssetBucketName as Io, hasReadableOrphans as Ir, hasPlainPrototype$1 as Is, REDACTED_DELETE_ADDRESS_SKIP_REASON as It, red as J, recordMaskOnlyValue as Ja, isStatefulRecreateTargetForReplace as Ji, producerRegionsFromState as Jn, isDockerClientEnvKey as Jo, malformedOrphanRecordsWarning as Jr, secretBearing as Jt, gray as K, identityKeyFor as Ka, shownType as Ki, IntrinsicFunctionResolver as Kn, formatDockerLoginError as Ko, malformedLocalResourcesWarning as Kr, displayTextOrWithheld as Kt, S3_AUTO_DELETE_OBJECTS_TAG as L, maskSecretsInText as La, unreadableOrphanRecords as Li, markWaitAbandoned as Ln, validateContainerRepoName as Lo, hasReadableOutputs as Lr, nullPrototypeRecord as Ls, isRedactedRecordedValue as Lt, DELETE_INDEX_WAIT_PROCEED_NOTE as M, recordLogOnlyValue as Ma, repairMalformedOutputsForReadOnly as Mi, UNSPECIFIED_SKIP_REASON as Mn, getBootstrapMarkerKey as Mo, UNREADABLE_ORPHANS_CONTAINER_ROW as Mr, StageLoadError as Ms, effectiveDeletionPolicy as Mt, INDEX_SETTLE_POLL_INTERVAL_MS as N, shareLogOnlyValues as Na, repairMalformedResourceEntriesForReadOnly as Ni, deleteIndeterminateGuards as Nn, isCrossRegionRedirect as No, UNREADABLE_RESOURCES_MAP_ROW as Nr, processStackMessages as Ns, isFinalSnapshotError as Nt, compensateRemovedDeletionProtection as O, literalSplitDelimitersOf as Oa, refuseMalformedResourcesForExport as Oi, CloudControlProvider as On, AssetModeResolver as Oo, passedParameterClassesOf as Or, PARTITION_TABLE as Os, PRE_DELETE_SNAPSHOT_TYPES as Ot, deleteTableWithIndexBusyRetry as P, createSecretMasker as Pa, repairMalformedResourcePropertiesForReadOnly as Pi, deleteSkipReason as Pn, parseBootstrapMarker as Po, deployRefusesOrphanRowsReason as Pr, defineOwnKey as Ps, refusesFinalSnapshot as Pt, reachableDivergentParameters as Q, STATE_SOURCED_CROSS_GENERATION_RULES as Qa, coerceWarmThroughput as Qi, assertSendableRoleArn as Qn, redactedDockerCause as Qo, malformedOutputsRefusalMessage as Qr, isWholeDynamicReferenceValue as Qt, hasCdkAutoDeleteTag as R, markSameGenerationBag as Ra, unreadableResourceEntries as Ri, disableInstanceApiTermination as Rn, buildDenyExternalAccessPolicy as Ro, hasReadableResources as Rr, ownValue as Rs, redactedDeleteAddressFields as Rt, isProtectionValueActive as S, liveMatchesUnresolvedTokenFrame as Sa, refuseMalformedResourceEntriesForOrphan as Si, CC_BROKEN_REASON as Sn, stringifyValue as So, cfnRefValueFromPhysicalId as Sr, MIGRATE_TMP_PREFIX as Ss, planRollback as St, DynamoDBGlobalTableProvider as T, carryLogOnlyValues as Ta, refuseMalformedResourcePropertiesForOrphan as Ti, wouldReturnToSdkProvider as Tn, createAssetRedirectResolver as To, parseWebACLArn as Tr, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as Ts, getCurrentProducerRegions as Tt, createReadOnlyAttributeHealerFactory as U, dynamicReferenceTokens as Ua, NO_CC_HANDLERS_REASON as Ui, reEnableInstanceApiTermination as Un, describeDockerFailure as Uo, malformedExportSourceWarning as Ur, resolveAssemblyPath as Us, DeploymentEventsStore as Ut, markRefusedBeforeApplying as V, recoverMaskedOutput as Va, unwrittenCreateOnlyReplacement as Vi, observeThenDisableInstanceApiTermination as Vn, describeDockerCapturedOutput as Vo, malformedDriftResourcePropertiesWarning as Vr, displayAssemblyPath as Vs, updatePartialReason as Vt, bold as W, isUncertifiedBaselineMaskPosition as Wa, hasNoCloudControlHandlers as Wi, DiffCalculator as Wn, dockerSpawnEnvWithSensitive as Wo, malformedLocalOutputsWarning as Wr, clearBucketRegionCache as Ws, extractDeploymentEventError as Wt, computeParameterTaint as X, recordNoEchoAttributeValues as Xa, renderStatefulReason as Xi, applyRoleArnIfSet as Xn, partitionSensitiveEnv as Xo, malformedOrphansRefusalMessage as Xr, secretSafeKeyDisplay as Xt, yellow as Y, recordMaskOnlyValuesIn as Ya, isStatefulRecreateTargetSync as Yi, regionLessSecretName as Yn, isMalformedEnvKey as Yo, malformedOrphanRowsKeptWarning as Yr, secretBearingStateKeyWarning as Yt, namesAnyDeclaredParameter as Z, STATE_SOURCED_BASELINE_RULES as Za, WARM_THROUGHPUT_MEMBERS as Zi, assertFlagRoleArn as Zn, redactDockerArgvValues as Zo, malformedOrphansWarning as Zr, exportNameSecretExposure as Zt, makeCanonicalizePropertiesFn as _, canonicalLambdaFunctionName as _a, refuseMalformedResourceEntries as _i, refuseMalformedDesiredTags as _n, orphansAfterRollback as _o, carriesDynamicReference as _r, stateBucketExistenceConfirmed as _s, destroyStackRecordsView as _t, findNestedTemplateTreeDefect as a, configIntegerRefusal as aa, malformedStateRefusalMessage as ai, DEFAULT_RESOURCE_WARN_AFTER_MS as an, S3StateBackend as ao, envCredentialsAreAssumedRole as ar, getDockerImageBySourceHash as as, dropSettledNestedJournals as at, recordedProtectionNote as b, DagBuilder as ba, refuseMalformedResourceEntriesForImport as bi, definedAttributes as bn, AssetPublisher as bo, keepsSecretReferenceToken as br, CFN_TEMPLATE_BODY_LIMIT as bs, recordAfterRollbackUpdate as bt, renderNestedTemplateTreeDefect as c, replayWarn as ca, refuseMalformedNestedChildOutputs as ci, earliestDefined as cn, acceptedCreateOnlyDropsOf as co, s3BucketDomainName as cr, getDefaultStateBucketName as cs, recordDisplacedSkips as ct, conditionInputsFrom as d, requireConfigString as da, refuseMalformedOrphans as di, withCreateTokenLedger as dn, hasReadableExportSet as do, s3BucketWebsiteUrl as dr, resolveAutoAssetStorage as ds, withNestedRevertRun as dt, toCfnInteger as ea, malformedRenderedContainersWarning as ei, collectDeclaredOutputNames as en, TEMPLATE_SOURCED_RULES as eo, isIamRoleArn as er, runDockerStreaming as es, makeSiblingClaimReader as et, parentSuppliedValues as f, prefetchCreateOnlyPropertyPaths as fa, refuseMalformedOrphansForDestroy as fi, acquireIdempotencyToken as fn, hasReasonlessBaselineRefusal as fo, coerceParameterTypedValue as fr, resolveCaptureObservedState as fs, getCurrentNestedStackContext as ft, mergeNoChangeOutputs as g, markAuxiliaryFailure as ga, refuseMalformedResourceAttributesForOrphan as gi, readTagList as gn, isReadableBag as go, isImpossibleEmptyStoredAttribute as gr, resolveUseCdkBootstrapAssets as gs, awaitInFlightSibling as gt, keptWholeReasonText as h, withRetry as ha, refuseMalformedOutputsForDestroy as hi, planTagDiff as hn, importableOutputs as ho, getAccountInfo as hr, resolveStateBucketWithDefaultAndSource as hs, replayRollback as ht, childTemplateLoader as i, configBooleanRefusal as ia, malformedScrubResourceEntriesRefusalMessage as ii, DEFAULT_RESOURCE_TIMEOUT_MS as in, isLockInfoExpired as io, callerEnvCredentials as ir, AssetManifestLoader as is, displacedPhysicalIdShown as it, resolveDynamoDbDeleteBudgetMs as j, recordLogOnlyParameterValue as ja, repairMalformedOrphansForReadOnly as ji, unchangedBehindSecretReference as jn, ensureAssetStorage as jo, STATE_RESOURCES_MALFORMED as jr, AssemblyReader as js, createPreDeleteFinalSnapshot as jt, deleteBudgetKey as k, logOnlyValueCount as ka, refuseMalformedState as ki, slowCcOperationTimeoutMs as kn, BOOTSTRAP_MARKER_PREFIX as ko, JSON_LISTING_HOLE_VALUE as kr, canonicalizeRegion as ks, buildFinalSnapshotIdentifier as kt, templateIdentity as l, requireConfigArray as la, refuseMalformedOrphanRecords as li, ledgerForStack as ln, describeRegionValueKind as lo, s3BucketDualStackDomainName as lr, getLegacyStateBucketName as ls, revertNestedChildFromJournal as lt, isSecretBearingReferenceString as m, describeTypeWithThrottleRetry as ma, refuseMalformedOutputs as mi, DBPROXY_TAG_OPTIONS as mn, importableOutputKeys as mo, parameterTypeMayLoseSecretIdentity as mr, resolveStateBucketWithDefault as ms, replayFailedOperations as mt, IMPLICIT_DELETE_DEPENDENCIES as n, coerceCfnBoolean as na, malformedResourcePropertiesWarning as ni, isExportAliasCollision as nn, isSingleDynamicReferenceToken as no, AWS_CREDENTIAL_ENV_KEYS as nr, escapeRegExp$2 as ns, NESTED_PENDING_PARENT_REASON as nt, isAbsoluteAssetPath as o, configStringRefusal as oa, previewableOrphanRecords as oi, maskingRetryLogger as on, rebuildClientForBucketRegion as oo, isSettledInstanceState as or, Synthesizer as os, getNestedRevertRun as ot, readRecordedConditionVerdicts as p, templateResourceTypes as pa, refuseMalformedOrphansForOrphan as pi, DBPROXY_TAGS_WHAT as pn, hasUnverifiableParameterRefusal as po, isUnboundTemplateParameter as pr, resolveSkipPrefix as ps, withNestedStackContext as pt, green as q, carriesSecretMask as qa, MULTI_REGION_RECREATE_BLOCKED_TYPES as qi, classifyReplaySecretRegion as qn, getDockerCmd as qo, malformedOrphanRecordsRefusalMessage as qr, exportAliasCollisionScrubWarning as qt, computeImplicitDeleteEdges as r, coerceCfnInteger as ra, malformedResourcesWarning as ri, bindingSkippedOutputs as rn, LockManager as ro, applyCallerIdentityCredentials as rr, stripControlChars as rs, displacedOpClause as rt, listNestedTemplateRows as s, readConfigString as sa, refuseDivergentRecordRegionForDestroy as si, RollbackInlinePolicyWriters as sn, splitImportedOps as so, s3BucketArn as sr, synthesisStatusMessage as ss, nestedChildStackName as st, DeployEngine as t, toFiniteNumber as ta, malformedResourceEntriesWarning as ti, collectPublishedOutputNames as tn, WHOLE_DYNAMIC_REFERENCE_PATTERN as to, sendableAssumeRoleCommand as tr, warnFinchArgvExposure as ts, planOrphanAdoption as tt, conditionFingerprint as u, requireConfigObject as ua, refuseMalformedOrphanRecordsForDestroy as ui, reserveStackCreateToken as un, exportNamesCarriedFrom as uo, s3BucketRegionalDomainName as ur, resolveApp as us, revertedNestedRowIds as ut, withResourceDeadline as v, lambdaFunctionNameForMask as va, refuseMalformedResourceEntriesForDeploy as vi, tagMapAsList as vn, orphansCarriedFrom as vo, carriesFetchableDynamicReference as vr, warnDeprecatedNoPrefixCliFlag as vs, getStackRecords as vt, readProtection as w, recordNestedStackParameterExpressions as wa, refuseMalformedResourcePropertiesForExport as wi, ccBrokenReason as wn, buildAssetRedirectMap as wo, refStateLookupFromResource as wr, uploadCfnTemplate as ws, findNestedStackTypeChanges as wt, PROTECTION_PROPERTY_BY_TYPE as x, TemplateParser as xa, refuseMalformedResourceEntriesForImportSave as xi, stringifyIfAssigned as xn, isSensitiveAttributeName as xo, AWS_NO_VALUE as xr, CFN_TEMPLATE_URL_LIMIT as xs, planFailedOps as xt, recordedProtectionEvidence as y, sameLambdaFunctionAddress as ya, refuseMalformedResourceEntriesForDestroy as yi, tagPlanWarning as yn, shouldRetainResource as yo, isNamelessDynamicReferenceError as yr, ssmResolvedValueType as ys, withStackRecords as yt, isTruthyCfnBoolean as z, redactSecretsForState as za, findActionableSilentDrops as zi, ec2InstanceProtectionSite as zn, buildDockerImage as zo, isReadableOrphanRecord as zr, absoluteAssemblyPathEscape as zs, redactedDeleteAddressSkip as zt };
|
|
36436
|
+
//# sourceMappingURL=deploy-engine-CMRU0DTu.js.map
|