@go-to-k/cdkd 0.290.40 → 0.290.42
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-DPTeR_IT.js → asg-provider-Cms9Daqn.js} +3 -3
- package/dist/{asg-provider-DPTeR_IT.js.map → asg-provider-Cms9Daqn.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-DJxLBuTb.js → deploy-engine-C1dgx124.js} +176 -56
- package/dist/deploy-engine-C1dgx124.js.map +1 -0
- package/dist/index.d.ts +33 -33
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{logger-BkcLg0jL.js → logger-D-2HeLmd.js} +8 -4
- package/dist/logger-D-2HeLmd.js.map +1 -0
- package/dist/{program-BmtaBtO_.js → program-HtHlEaZm.js} +52 -30
- package/dist/{program-BmtaBtO_.js.map → program-HtHlEaZm.js.map} +1 -1
- package/dist/{version-CEKVu0mE.js → version-Divizw1k.js} +2 -2
- package/dist/{version-CEKVu0mE.js.map → version-Divizw1k.js.map} +1 -1
- package/package.json +4 -4
- package/dist/deploy-engine-DJxLBuTb.js.map +0 -1
- package/dist/logger-BkcLg0jL.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as isVersionOnlyInvocation, t as getCdkdVersion } from "./version-
|
|
2
|
+
import { n as isVersionOnlyInvocation, t as getCdkdVersion } from "./version-Divizw1k.js";
|
|
3
3
|
|
|
4
4
|
//#region src/cli/pipe-close-handler.ts
|
|
5
5
|
/**
|
|
@@ -74,7 +74,7 @@ async function main() {
|
|
|
74
74
|
console.log(getCdkdVersion());
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
|
-
const { buildProgram } = await import("./program-
|
|
77
|
+
const { buildProgram } = await import("./program-HtHlEaZm.js");
|
|
78
78
|
const program = buildProgram();
|
|
79
79
|
const args = reorderArgs(process.argv);
|
|
80
80
|
await program.parseAsync(args);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as displayAwsMessage, D as truncateCodePoints, E as isPasteableIdent, S as UNRENDERABLE, T as displaySafe, d as applyDefaultNameForFallback, f as explicitNamePropertyFor, g as looksLikeCdkdGeneratedName, h as getCurrentStackName, m as generateResourceNameWithFallback, n as getLogger, p as generateResourceName, r as isStdoutReservedForPayload, s as getLiveRenderer, v as withStackName, w as displayIdent, x as STACK_REF_MAX_CODE_POINTS, y as withoutGeneratedFallbackName } from "./logger-
|
|
1
|
+
import { C as displayAwsMessage, D as truncateCodePoints, E as isPasteableIdent, S as UNRENDERABLE, T as displaySafe, d as applyDefaultNameForFallback, f as explicitNamePropertyFor, g as looksLikeCdkdGeneratedName, h as getCurrentStackName, m as generateResourceNameWithFallback, n as getLogger, p as generateResourceName, r as isStdoutReservedForPayload, s as getLiveRenderer, v as withStackName, w as displayIdent, x as STACK_REF_MAX_CODE_POINTS, y as withoutGeneratedFallbackName } from "./logger-D-2HeLmd.js";
|
|
2
2
|
import { a as setAssumedRoleCredentials, i as getPreAssumeEnvCredentials, n as awsClientDefaults, o as setPreAssumeEnvCredentials, r as getAssumedRoleCredentials, t as SECOND_ROLE_PUBLISH_REFUSAL } from "./aws-client-defaults-BoIxyCir.js";
|
|
3
|
-
import { t as getCdkdVersion } from "./version-
|
|
3
|
+
import { t as getCdkdVersion } from "./version-Divizw1k.js";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { createHash, randomUUID } from "node:crypto";
|
|
6
6
|
import { CreateBucketCommand, DeleteObjectCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetBucketReplicationCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchKey, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutObjectCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -4411,6 +4411,141 @@ function decodeListingKey(value) {
|
|
|
4411
4411
|
}
|
|
4412
4412
|
}
|
|
4413
4413
|
|
|
4414
|
+
//#endregion
|
|
4415
|
+
//#region src/state/record-keys.ts
|
|
4416
|
+
/**
|
|
4417
|
+
* The ONE encoding anything that identifies a producer-side thing by a pair of
|
|
4418
|
+
* runtime strings goes through — a warned-once `Set`, a dedupe `Set`, a
|
|
4419
|
+
* memoization `Map`, a tree's node index.
|
|
4420
|
+
*
|
|
4421
|
+
* An import-free LEAF, the same shape as `src/utils/display-safe.ts` and
|
|
4422
|
+
* `src/utils/parameter-types.ts`, and that is load-bearing rather than tidy:
|
|
4423
|
+
* the consumers span the `cli`, `state` and `deployment` layers, and one of
|
|
4424
|
+
* them — `src/cli/commands/state-list-tree.ts` — is deliberately kept with NO
|
|
4425
|
+
* imports at all so the tree-building logic is unit-testable without mocking
|
|
4426
|
+
* anything. These functions previously lived in `malformed-resources-bag.ts`,
|
|
4427
|
+
* which reaches `error-handler` / `display-safe` / `lock-contention-message`,
|
|
4428
|
+
* and that module still RE-EXPORTS them so no existing importer moved.
|
|
4429
|
+
*
|
|
4430
|
+
* ENCODED, not separated. Issue
|
|
4431
|
+
* [#3308](https://github.com/go-to-k/cdkd/issues/3308) is the measurement
|
|
4432
|
+
* behind that and issue [#3323](https://github.com/go-to-k/cdkd/issues/3323)
|
|
4433
|
+
* is the one that found how far the class ran. Both halves of every key here
|
|
4434
|
+
* are attacker-influenced, and a separator only NARROWS a collision: with a
|
|
4435
|
+
* NUL separator, stack `Evil<NUL>us-east-1` in `ap-northeast-1` and stack
|
|
4436
|
+
* `Evil` in region `us-east-1<NUL>ap-northeast-1` produce the SAME key.
|
|
4437
|
+
*
|
|
4438
|
+
* `JSON.stringify` of a two-element array is injective over string pairs: the
|
|
4439
|
+
* quoting escapes anything that could imitate the separator, so no planted
|
|
4440
|
+
* value can produce another pair's key.
|
|
4441
|
+
*
|
|
4442
|
+
* **What a collision COSTS is per SITE, not a property of the key, and a note
|
|
4443
|
+
* here once claimed otherwise** — "one dropped warning LINE, never a wrong
|
|
4444
|
+
* resolution". That held for the two warned-once sets it was written for and
|
|
4445
|
+
* is false at three `cdkd scrub` sites, where a collision is a wrong ANSWER
|
|
4446
|
+
* feeding the pre-pass that decides whether a producer still holds plaintext.
|
|
4447
|
+
* Do not restore the narrower sentence: it reads as a licence to leave a
|
|
4448
|
+
* separator at a site nobody has re-checked.
|
|
4449
|
+
*
|
|
4450
|
+
* **Whether a separator was EVER injective is also per site**, because it
|
|
4451
|
+
* depends on each half's PROVENANCE. A half read out of an S3 key segment
|
|
4452
|
+
* cannot carry a NUL — measured on go-to-k/cdkd#3323, S3 refuses to store such
|
|
4453
|
+
* a key — so a key whose LEFT half is a segment splits uniquely at the FIRST
|
|
4454
|
+
* NUL. **The rule is two-sided and the dual is easy to miss**: a NUL-free
|
|
4455
|
+
* RIGHT half splits uniquely at the LAST one, which is what actually held at
|
|
4456
|
+
* one of the sites here. A half read out of a TEMPLATE or a state body is
|
|
4457
|
+
* gated by neither.
|
|
4458
|
+
*
|
|
4459
|
+
* Do not settle a site by asking whether the SEPARATOR is storable. That
|
|
4460
|
+
* question was asked twice on go-to-k/cdkd#3323 and gave the wrong answer both
|
|
4461
|
+
* times, in opposite directions. Encoding removes the need to ask at all,
|
|
4462
|
+
* which is why it is the fix rather than a wider separator.
|
|
4463
|
+
*/
|
|
4464
|
+
/** The ONE spelling of the encoding, private so no caller can re-derive it. */
|
|
4465
|
+
function injectivePairKey(first, second) {
|
|
4466
|
+
return JSON.stringify([first, second]);
|
|
4467
|
+
}
|
|
4468
|
+
/**
|
|
4469
|
+
* The same rule for a key of MORE than two parts.
|
|
4470
|
+
*
|
|
4471
|
+
* The named wrappers above stay, because a `(stack, region)` record and a
|
|
4472
|
+
* `(stack, export)` coordinate are things worth naming. This one is for the
|
|
4473
|
+
* keys that are just a tuple — an idempotency-token memo key, a resource-pair
|
|
4474
|
+
* edge — where a name would add nothing and a positional list is the honest
|
|
4475
|
+
* shape. It is exported rather than private for the same reason the two are:
|
|
4476
|
+
* so a call site can adopt the rule without re-spelling the encoding
|
|
4477
|
+
* (go-to-k/cdkd#3496).
|
|
4478
|
+
*
|
|
4479
|
+
* `number` is accepted because several of these tuples carry one, and
|
|
4480
|
+
* stringifying at the call site would put the coercion back where a caller can
|
|
4481
|
+
* get it wrong. `JSON.stringify` distinguishes `1` from `"1"`, so a mixed
|
|
4482
|
+
* tuple stays injective across the two.
|
|
4483
|
+
*
|
|
4484
|
+
* KNOWN HOLE in that, recorded rather than guarded: `NaN`, `Infinity` and
|
|
4485
|
+
* `-Infinity` all stringify to `null`, so those three collapse onto one key
|
|
4486
|
+
* and onto a literal `null`. No call site passes one — every numeric argument
|
|
4487
|
+
* today is a literal bound (`64`, `32`) — and a runtime refusal would turn a
|
|
4488
|
+
* key builder into a throwing path for a value that cannot arrive. Check this
|
|
4489
|
+
* note before passing a COMPUTED number.
|
|
4490
|
+
*
|
|
4491
|
+
* Note what this does to a DIGEST that hashes the result: the encoded string
|
|
4492
|
+
* carries no raw control character at all — `JSON.stringify` escapes a NUL to
|
|
4493
|
+
* the six-character text `\u0000` — so a hash input that separates this key
|
|
4494
|
+
* from its neighbours with a NUL is injective too, without the separator
|
|
4495
|
+
* having to be chosen carefully.
|
|
4496
|
+
*/
|
|
4497
|
+
function injectiveKey(...parts) {
|
|
4498
|
+
return JSON.stringify(parts);
|
|
4499
|
+
}
|
|
4500
|
+
/**
|
|
4501
|
+
* The prefix every {@link injectiveKey} OF TWO OR MORE PARTS whose first part
|
|
4502
|
+
* is `first` begins with. The arity matters and an earlier revision of this
|
|
4503
|
+
* line omitted it: a ONE-part key ends with a bracket where this prefix ends
|
|
4504
|
+
* with a comma, so it does not match one. Both call sites build two parts.
|
|
4505
|
+
*
|
|
4506
|
+
* It exists for the one reader shape an encoded key otherwise breaks: a cache that
|
|
4507
|
+
* evicts by scanning its keys for a leading component.
|
|
4508
|
+
*
|
|
4509
|
+
* DERIVED from the same encoder rather than spelled again, and that is the
|
|
4510
|
+
* whole point. go-to-k/cdkd#3496's first cut encoded three provider caches and
|
|
4511
|
+
* left `invalidateAttributeCache` testing the OLD `<physicalId>:` prefix, so
|
|
4512
|
+
* the scan matched nothing and every post-update `Fn::GetAtt` read the
|
|
4513
|
+
* pre-update value — silently, with every gate green. A prefix computed here
|
|
4514
|
+
* cannot drift from the key computed two functions up.
|
|
4515
|
+
*
|
|
4516
|
+
* Exact, not a heuristic: `JSON.stringify([first])` quotes and escapes `first`,
|
|
4517
|
+
* so replacing its closing `]` with `,` yields a string no OTHER first part can
|
|
4518
|
+
* begin with. Deriving it by searching the encoded key for a comma would NOT
|
|
4519
|
+
* be exact — a comma inside the value is not escaped by JSON.
|
|
4520
|
+
*/
|
|
4521
|
+
function injectiveKeyPrefix(first) {
|
|
4522
|
+
return JSON.stringify([first]).slice(0, -1) + ",";
|
|
4523
|
+
}
|
|
4524
|
+
/**
|
|
4525
|
+
* The key for a state RECORD: the `(stackName, region)` pair that names one
|
|
4526
|
+
* `state.json`.
|
|
4527
|
+
*/
|
|
4528
|
+
function producerRecordKey(stackName, region) {
|
|
4529
|
+
return injectivePairKey(stackName, region);
|
|
4530
|
+
}
|
|
4531
|
+
/**
|
|
4532
|
+
* The key for a producer COORDINATE: a `(stack, export-or-output name)` pair,
|
|
4533
|
+
* used by `cdkd scrub`'s re-export chain walk and its per-coordinate verdict
|
|
4534
|
+
* cache.
|
|
4535
|
+
*
|
|
4536
|
+
* A separate NAME because the subject is a different thing — a coordinate is
|
|
4537
|
+
* not a record, and a call site reading `producerRecordKey(stack, exportName)`
|
|
4538
|
+
* would say something false. ONE implementation, though, which is the property
|
|
4539
|
+
* the "one spelling" rule is actually about: two names over one implementation
|
|
4540
|
+
* cannot drift, two implementations can.
|
|
4541
|
+
*
|
|
4542
|
+
* An `exportName` is REDACTED on the way into state
|
|
4543
|
+
* (`StateImportEntry`'s JSDoc), so this half may hold any string at all.
|
|
4544
|
+
*/
|
|
4545
|
+
function producerCoordinateKey(stackName, exportOrOutputName) {
|
|
4546
|
+
return injectivePairKey(stackName, exportOrOutputName);
|
|
4547
|
+
}
|
|
4548
|
+
|
|
4414
4549
|
//#endregion
|
|
4415
4550
|
//#region src/state/s3-replication-purge-gap.ts
|
|
4416
4551
|
/**
|
|
@@ -4730,7 +4865,7 @@ async function runProbe(s3Client, bucket, requestFields) {
|
|
|
4730
4865
|
}
|
|
4731
4866
|
}
|
|
4732
4867
|
function probe(s3Client, bucket, requestFields) {
|
|
4733
|
-
const key =
|
|
4868
|
+
const key = injectiveKey(bucket, requestFields.ExpectedBucketOwner ?? "");
|
|
4734
4869
|
const cached = replicationProbeCache.get(key);
|
|
4735
4870
|
if (cached) return cached;
|
|
4736
4871
|
const pending = runProbe(s3Client, bucket, requestFields).then((result) => {
|
|
@@ -4790,11 +4925,7 @@ async function warnIfPurgeIsReplicated(s3Client, bucket, keys, options = {}) {
|
|
|
4790
4925
|
const covered = result.rules.filter((rule) => keys.some((key) => key.startsWith(rule.prefix)));
|
|
4791
4926
|
if (covered.length === 0) return;
|
|
4792
4927
|
const destinations = [...new Set(covered.map((rule) => rule.enabled ? rule.destination : `${rule.destination} (rule currently Disabled -- it stops FUTURE replication, not what it already copied)`))].sort();
|
|
4793
|
-
const warnKey =
|
|
4794
|
-
bucket,
|
|
4795
|
-
options.objectDescription ?? "",
|
|
4796
|
-
...destinations
|
|
4797
|
-
].join("\0");
|
|
4928
|
+
const warnKey = injectiveKey(bucket, options.objectDescription ?? "", ...destinations);
|
|
4798
4929
|
if (warnedWarnings.has(warnKey)) {
|
|
4799
4930
|
emitDebug(`S3 replication on s3://${safeBucket} still covers purged keys (${options.objectDescription ?? "the body of an object cdkd has just reported as removed"}); already reported once this run for ${destinations.map((d) => displaySafe(d, { asciiOnly: true })).join(", ")}.`);
|
|
4800
4931
|
return;
|
|
@@ -10677,7 +10808,7 @@ var S3StateBackend = class {
|
|
|
10677
10808
|
if (segments.length === NEW_KEY_DEPTH) {
|
|
10678
10809
|
const [stackName, region] = segments;
|
|
10679
10810
|
if (!stackName || !region) continue;
|
|
10680
|
-
const dedupeKey =
|
|
10811
|
+
const dedupeKey = producerRecordKey(stackName, region);
|
|
10681
10812
|
if (!seen.has(dedupeKey)) {
|
|
10682
10813
|
seen.add(dedupeKey);
|
|
10683
10814
|
refs.push({
|
|
@@ -10691,7 +10822,7 @@ var S3StateBackend = class {
|
|
|
10691
10822
|
const [stackName] = segments;
|
|
10692
10823
|
if (!stackName) continue;
|
|
10693
10824
|
const region = await this.readLegacyRegion(stackName);
|
|
10694
|
-
const dedupeKey =
|
|
10825
|
+
const dedupeKey = producerRecordKey(stackName, region ?? "");
|
|
10695
10826
|
if (!seen.has(dedupeKey)) {
|
|
10696
10827
|
seen.add(dedupeKey);
|
|
10697
10828
|
refs.push({
|
|
@@ -12796,10 +12927,17 @@ function recordedExpressionsOf(secrets) {
|
|
|
12796
12927
|
* the shape PR #2415 was forced to WITHDRAW (`provenPublicExpressions`,
|
|
12797
12928
|
* residual #2425): keyed on a value alone, one stack's answer is served to
|
|
12798
12929
|
* another stack's identically-spelled read. Here the key names the producer
|
|
12799
|
-
* stack, its region and the output — so a hit is served
|
|
12800
|
-
*
|
|
12801
|
-
*
|
|
12802
|
-
*
|
|
12930
|
+
* stack, its region and the output — so a hit is served to a resolution that
|
|
12931
|
+
* asked for that output of that stack, i.e. to the reader that would have
|
|
12932
|
+
* received the plaintext before this feature existed.
|
|
12933
|
+
*
|
|
12934
|
+
* `precisely`, in an earlier revision, overstated it. The key is
|
|
12935
|
+
* NUL-SEPARATED rather than encoded, and the halves are not all
|
|
12936
|
+
* charset-constrained, so a forged coordinate CAN collide with another's
|
|
12937
|
+
* key — see {@link maskedOutputKey} for why that is left standing and what
|
|
12938
|
+
* would change the answer (go-to-k/cdkd#3496). The bound that does hold is
|
|
12939
|
+
* the one above it: whoever can forge such a coordinate can already aim at
|
|
12940
|
+
* the real one, so nothing is widened by the collision either.
|
|
12803
12941
|
*
|
|
12804
12942
|
* A RECOVERED VALUE IS STILL SECRET, and every reader re-registers it as a
|
|
12805
12943
|
* mask-only needle in its OWN bag before using it — the recovery hands back the
|
|
@@ -12832,11 +12970,23 @@ const CONFLICTING_CROSS_STACK = Symbol("conflicting cross-stack association");
|
|
|
12832
12970
|
/**
|
|
12833
12971
|
* Separator for the composite keys {@link crossStackSourceKey} builds.
|
|
12834
12972
|
*
|
|
12835
|
-
* A NUL rather than a printable character
|
|
12836
|
-
*
|
|
12837
|
-
* source leaves can spell a single key. A printable separator (`:` / `|`) does
|
|
12838
|
-
* occur inside a real export name — CDK's own convention is
|
|
12973
|
+
* A NUL rather than a printable character: a printable separator (`:` / `|`)
|
|
12974
|
+
* does occur inside a real export name — CDK's own convention is
|
|
12839
12975
|
* `Stack:ExportName` — which would let one leaf's key be read as another's.
|
|
12976
|
+
*
|
|
12977
|
+
* **It does NOT follow that no two distinct source leaves can spell a single
|
|
12978
|
+
* key, and this note asserted that for a while** (go-to-k/cdkd#3496). The
|
|
12979
|
+
* reason given was that no AWS export name, stack name, output name, region or
|
|
12980
|
+
* role ARN can contain a NUL — a claim about what AWS ACCEPTS, while these
|
|
12981
|
+
* halves are TEMPLATE literals read straight out of the intrinsic. A hand-written
|
|
12982
|
+
* template can put a NUL in any of them.
|
|
12983
|
+
*
|
|
12984
|
+
* What makes the key safe is not injectivity but what happens on a collision:
|
|
12985
|
+
* the association store POISONS a slot recorded against a differing
|
|
12986
|
+
* (expression, plaintext) pair rather than overwriting it, and the scope is a
|
|
12987
|
+
* `WeakMap` on the pass's own bag. So a forged key degrades to a REFUSAL, never
|
|
12988
|
+
* to one leaf's expression being served for another's. Keep that property if
|
|
12989
|
+
* this separator is ever revisited; it, not the charset, is the guarantee.
|
|
12840
12990
|
*/
|
|
12841
12991
|
const CROSS_STACK_KEY_SEPARATOR = "\0";
|
|
12842
12992
|
/** A non-empty literal string, or `undefined` for anything else. */
|
|
@@ -17070,7 +17220,7 @@ function extractLambdaVpcDeleteDeps(resources) {
|
|
|
17070
17220
|
for (const targetId of targets) {
|
|
17071
17221
|
if (targetId === lambdaId) continue;
|
|
17072
17222
|
if (!(targetId in resources)) continue;
|
|
17073
|
-
const key =
|
|
17223
|
+
const key = injectiveKey(lambdaId, targetId);
|
|
17074
17224
|
if (seen.has(key)) continue;
|
|
17075
17225
|
seen.add(key);
|
|
17076
17226
|
edges.push({
|
|
@@ -22654,36 +22804,6 @@ function malformedResourcePropertiesWarning(stackName, region, logicalIds) {
|
|
|
22654
22804
|
return `${namedPropertyBagsClause(stackName, region, logicalIds)} Continuing with those maps EMPTY: what these records are stored as holding is NOT what this preview compares against. Where the template still declares the resource, every property it declares previews as an addition and a create-only one as a replacement; where it no longer declares it, the DELETE row shows an empty previous side instead of the stored one. Do NOT run 'cdkd deploy' against this record — it REFUSES on the same defect rather than acting on this preview. See the stored values with: ${inspectCommand(stackName, region)}`;
|
|
22655
22805
|
}
|
|
22656
22806
|
/**
|
|
22657
|
-
* The key a warned-once-per-record `Set` uses to identify a producer RECORD.
|
|
22658
|
-
*
|
|
22659
|
-
* ONE spelling, shared by `scrub.ts`'s cross-stack pre-pass and
|
|
22660
|
-
* `local-state-loader.ts`'s `Fn::GetStackOutput` reader, because two spellings
|
|
22661
|
-
* of one rule is how nine sites stay right and the tenth drifts — the same
|
|
22662
|
-
* reason every predicate in this module is here rather than at its call sites.
|
|
22663
|
-
*
|
|
22664
|
-
* ENCODED, not separated, and issue
|
|
22665
|
-
* [#3308](https://github.com/go-to-k/cdkd/issues/3308) is the measurement
|
|
22666
|
-
* behind that. Both sites previously joined the two halves with a NUL, which
|
|
22667
|
-
* NARROWS the collision without closing it: a stack name is read out of an S3
|
|
22668
|
-
* key and is exactly as attacker-controlled as the `outputs` bag, so it can
|
|
22669
|
-
* carry a NUL too — `tests/unit/cli/commands/scrub-malformed-and-nameless.test.ts`
|
|
22670
|
-
* already plants one. Measured: with a NUL separator, stack `Evil<NUL>us-east-1`
|
|
22671
|
-
* in `ap-northeast-1` and stack `Evil` in region `us-east-1<NUL>ap-northeast-1`
|
|
22672
|
-
* produce the SAME key, so whichever is warned about second is silently not
|
|
22673
|
-
* warned about at all.
|
|
22674
|
-
*
|
|
22675
|
-
* `JSON.stringify` of a two-element array is injective over string pairs: the
|
|
22676
|
-
* quoting escapes anything that could imitate the separator, so no planted name
|
|
22677
|
-
* can produce another pair's key.
|
|
22678
|
-
*
|
|
22679
|
-
* The consequence of a collision is one dropped warning LINE, never a wrong
|
|
22680
|
-
* resolution — both records are still read as empty and both reads still miss.
|
|
22681
|
-
* That is why this is worth one shared helper rather than a larger mechanism.
|
|
22682
|
-
*/
|
|
22683
|
-
function producerRecordKey(stackName, region) {
|
|
22684
|
-
return JSON.stringify([stackName, region]);
|
|
22685
|
-
}
|
|
22686
|
-
/**
|
|
22687
22807
|
* How many unreadable logical ids a message names before summarizing. Read by
|
|
22688
22808
|
* every builder that names ids — the refusal below, `namedEntriesClause` and
|
|
22689
22809
|
* `malformedOrphanRecordsWarning` — so "the refusal below" was the count of
|
|
@@ -27760,7 +27880,7 @@ var IntrinsicFunctionResolver = class IntrinsicFunctionResolver {
|
|
|
27760
27880
|
*/
|
|
27761
27881
|
cachedDynamicReferences = /* @__PURE__ */ new Map();
|
|
27762
27882
|
/**
|
|
27763
|
-
*
|
|
27883
|
+
* `(parameter name, reported Type)` pairs this resolver has already
|
|
27764
27884
|
* warned about (issue #1933 review).
|
|
27765
27885
|
*
|
|
27766
27886
|
* Keyed on the PAIR rather than the name alone: two different anomalous types
|
|
@@ -30378,7 +30498,7 @@ var IntrinsicFunctionResolver = class IntrinsicFunctionResolver {
|
|
|
30378
30498
|
* contract as {@link lookupCfnExport}.
|
|
30379
30499
|
*/
|
|
30380
30500
|
async lookupCfnStackOutputs(stackName, region, context, loggedRegionText) {
|
|
30381
|
-
const cacheKey =
|
|
30501
|
+
const cacheKey = injectiveKey(region, stackName);
|
|
30382
30502
|
let fetch = this.cfnStackOutputsCache.get(cacheKey);
|
|
30383
30503
|
if (!fetch) {
|
|
30384
30504
|
fetch = this.fetchCfnStackOutputs(stackName, region);
|
|
@@ -31877,8 +31997,8 @@ var IntrinsicFunctionResolver = class IntrinsicFunctionResolver {
|
|
|
31877
31997
|
if (paramValue === void 0 || paramValue === null) throw new Error(`Dynamic reference: SSM parameter '${loggedParameterName}' not found or has no value`);
|
|
31878
31998
|
const paramType = response.Parameter?.Type;
|
|
31879
31999
|
const secure = paramType !== "String" && paramType !== "StringList";
|
|
31880
|
-
if (secure && paramType !== "SecureString" && !this.warnedUnrecognizedSsmTypes.has(
|
|
31881
|
-
this.warnedUnrecognizedSsmTypes.add(
|
|
32000
|
+
if (secure && paramType !== "SecureString" && !this.warnedUnrecognizedSsmTypes.has(injectiveKey(parameterName, String(paramType)))) {
|
|
32001
|
+
this.warnedUnrecognizedSsmTypes.add(injectiveKey(parameterName, String(paramType)));
|
|
31882
32002
|
const reported = paramType === void 0 ? "(absent)" : `'${String(paramType)}'`;
|
|
31883
32003
|
this.logger.warn(`SSM parameter '${loggedParameterName}' reported an unrecognized Type ${reported} — treating its value as a secret, so cdkd will persist the {{resolve:${service}:...}} expression rather than the resolved value. Declare the parameter as String / StringList if it is public config.`);
|
|
31884
32004
|
}
|
|
@@ -33563,7 +33683,7 @@ var CloudControlProvider = class {
|
|
|
33563
33683
|
const indeterminateGuard = await this.confirmDeleteTargetIdentity(logicalId, resourceType, physicalId, context);
|
|
33564
33684
|
if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
|
|
33565
33685
|
this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
|
|
33566
|
-
const { ASGProvider } = await import("./asg-provider-
|
|
33686
|
+
const { ASGProvider } = await import("./asg-provider-Cms9Daqn.js").then((n) => n.n);
|
|
33567
33687
|
const asgProvider = new ASGProvider();
|
|
33568
33688
|
return withIndeterminateGuard(await asgProvider.delete(logicalId, physicalId, resourceType, _properties, context), indeterminateGuard);
|
|
33569
33689
|
}
|
|
@@ -47271,5 +47391,5 @@ var DeployEngine = class DeployEngine {
|
|
|
47271
47391
|
};
|
|
47272
47392
|
|
|
47273
47393
|
//#endregion
|
|
47274
|
-
export { yellow as $,
|
|
47275
|
-
//# sourceMappingURL=deploy-engine-
|
|
47394
|
+
export { yellow as $, AssetError as $i, STATE_SOURCED_BASELINE_RULES as $n, validateContainerRepoName as $r, requireConfigObject as $t, createPreDeleteFinalSnapshot as A, retryClassificationText as Aa, CFN_TEMPLATE_BODY_LIMIT as Ai, malformedResourcePropertiesWarning as An, hasUnverifiableParameterRefusal as Ar, carriesDynamicReference as At, isStatefulRecreateTargetSync as B, decodeListingKey as Bi, refuseMalformedState as Bn, buildAssetRedirectMap as Br, isSettledInstanceState as Bt, namesAnyDeclaredParameter as C, withErrorHandling as Ca, resolveSkipPrefix as Ci, malformedExportSourceWarning as Cn, formatLockExpiry as Cr, slowCcOperationTimeoutMs as Ct, PRE_DELETE_SNAPSHOT_TYPES as D, isTransientServerError as Da, stateBucketExistenceConfirmed as Di, malformedOutputsWarning as Dn, exportNamesCarriedFrom as Dr, disableInstanceApiTermination as Dt, ATOMIC_FINAL_SNAPSHOT_TYPES as E, isThrottlingError as Ea, resolveUseCdkBootstrapAssets as Ei, malformedOutputsRefusalMessage as En, DEFAULT_STATE_PREFIX as Er, deleteSkipReason as Et, extractDeploymentEventError as F, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as Fi, refuseMalformedOutputs as Fn, orphansCarriedFrom as Fr, isImpossibleEmptyStoredAttribute as Ft, toCfnInteger as G, AssemblyReader as Gi, safeRegion as Gn, BOOTSTRAP_MARKER_PREFIX as Gr, coerceCfnBoolean as Gt, WARM_THROUGHPUT_MEMBERS as H, PARTITION_TABLE as Hi, repairMalformedResourceEntriesForReadOnly as Hn, loadPublishableAssetManifest as Hr, normalizeAwsTagsToCfn as Ht, makeSiblingClaimReader as I, injectiveKey as Ii, refuseMalformedOutputsForDestroy as In, shouldRetainResource as Ir, isNamelessDynamicReferenceError as It, bold as J, resolveBucketRegion as Ji, findSilentDropProperties as Jn, getBootstrapMarkerKey as Jr, configIntegerRefusal as Jt, toFiniteNumber as K, processStackMessages as Ki, safeStackName as Kn, assertAssetBucketRegion as Kr, coerceCfnInteger as Kt, planOrphanAdoption as L, injectiveKeyPrefix as Li, refuseMalformedResourceEntries as Ln, AssetPublisher as Lr, isUnboundTemplateParameter as Lt, refusesFinalSnapshot as M, safeStringify$1 as Ma, MIGRATE_TMP_PREFIX as Mi, malformedStateRefusalMessage as Mn, importableOutputs as Mr, cfnRefValueFromPhysicalId as Mt, unsupportedFinalSnapshotError as N, __exportAll as Na, findLargeInlineResources as Ni, refuseDivergentRecordRegionForDestroy as Nn, isReadableBag as Nr, coerceParameterTypedValue as Nt, buildFinalSnapshotIdentifier as O, markNonRetryable as Oa, warnDeprecatedNoPrefixCliFlag as Oi, malformedRenderedContainersWarning as On, hasReadableExportSet as Or, isTerminationProtectionPropagationError as Ot, makeCanonicalizePropertiesFn as P, uploadCfnTemplate as Pi, refuseMalformedNestedChildOutputs as Pn, orphansAfterRollback as Pr, getAccountInfo as Pt, red as Q, setAwsClients as Qi, TemplateParser as Qn, validateAssetBucketName as Qr, requireConfigArray as Qt, MULTI_REGION_RECREATE_BLOCKED_TYPES as R, producerCoordinateKey as Ri, refuseMalformedResourcePropertiesForOrphan as Rn, stringifyValue as Rr, parameterTypeMayLoseSecretIdentity as Rt, computeParameterTaint as S, normalizeAwsError as Sa, resolveCaptureObservedState as Si, malformedExportNamesWarning as Sn, forceQuitRecoveryClause as Sr, isWaitAbandonedError as St, resourcesNamingDeclaredParameter as T, isRetryableTransientError as Ta, resolveStateBucketWithDefaultAndSource as Ti, malformedOrphanRecordsWarning as Tn, CUSTOM_RESOURCE_RESPONSE_PREFIX as Tr, deleteIndeterminateGuards as Tt, coerceWarmThroughput as U, canonicalizeRegion as Ui, repairMalformedResourcePropertiesForReadOnly as Un, rewriteTemplateAssetReferences as Ur, resolveExplicitPhysicalId as Ut, renderStatefulReason as V, expectedOwnerParam as Vi, repairMalformedOutputsForReadOnly as Vn, createAssetRedirectResolver as Vr, WAFv2WebACLProvider as Vt, isWarmThroughputDecrease as W, derivePartitionAndUrlSuffix as Wi, repairMalformedResourcesForReadOnly as Wn, AssetModeResolver as Wr, assertRegionMatch as Wt, gray as X, getAwsClients as Xi, withRetry as Xn, parseBootstrapMarker as Xr, readConfigString as Xt, cyan as Y, AwsClients as Yi, describeTypeWithThrottleRetry as Yn, isCrossRegionRedirect as Yr, configStringRefusal as Yt, green as Z, resetAwsClients as Zi, DagBuilder as Zn, readBootstrapMarkerBody as Zr, replayWarn as Zt, bagHoldsSecretExpression as _, StackTerminationProtectionError as _a, synthesisStatusMessage as _i, UNREADABLE_RESOURCES_MAP_ROW as _n, S3StateBackend as _r, endCommandInterruptScope as _t, DeploymentEventsStore as a, DynamicReferenceRegionAmbiguousError as aa, dockerSpawnEnvWithSensitive as ai, s3BucketDomainName as an, dynamicReferenceTokens as ar, secretBearingStateKeyWarning as at, mergeNoChangeOutputs as b, formatError as ba, resolveApp as bi, hasReadableResources as bn, buildForceUnlockCommand as br, startInterruptWatch as bt, replayFailedOperations as c, LocalStartServiceError as ca, partitionSensitiveEnv as ci, s3BucketWebsiteUrl as cn, isSingleDynamicReferenceToken as cr, IAMRoleProvider as ct, updatePartialMessage as d, NestedStackChildDirectDestroyError as da, runDockerStreaming as di, applyCallerIdentityCredentials as dn, maskSecretsInText as dr, ProviderRegistry as dt, CdkdError as ea, buildDenyExternalAccessPolicy as ei, requireConfigString as en, STATE_SOURCED_CROSS_GENERATION_RULES as er, collectDeclaredOutputNames as et, updatePartialReason as f, PartialFailureError as fa, escapeRegExp$1 as fi, callerEnvCredentials as fn, recordMaskOnlyValue as fr, wouldReturnToSdkProvider as ft, computeImplicitDeleteEdges as g, StackHasActiveImportsError as ga, Synthesizer as gi, STATE_RESOURCES_MALFORMED as gn, LockManager as gr, beginCommandInterruptScope as gt, IMPLICIT_DELETE_DEPENDENCIES as h, ResourceUpdateNotSupportedError as ha, getDockerImageBySourceHash as hi, INTRINSIC_KEYS as hn, scrubResourceRecord as hr, maskerOrIdentity as ht, DeploymentEventsReader as i, DeployCancelledError as ia, describeDockerFailure as ii, s3BucketArn as in, createSecretMasker as ir, secretBearing as it, isFinalSnapshotError as j, describeAwsFailure as ja, CFN_TEMPLATE_URL_LIMIT as ji, malformedResourcesWarning as jn, importableOutputKeys as jr, carriesFetchableDynamicReference as jt, ccRoutedFinalSnapshotError as k, markRedactedCause as ka, ssmResolvedValueType as ki, malformedResourceEntriesWarning as kn, hasReasonlessBaselineRefusal as kr, IntrinsicFunctionResolver as kt, replayRollback as l, LockError as la, redactDockerArgvValues as li, applyRoleArnIfSet as ln, markSameGenerationBag as lr, collectInlinePolicyNamesManagedBySiblings as lt, maskingRetryLogger as m, ResourceTimeoutError as ma, AssetManifestLoader as mi, DiffCalculator as mn, redactSecretsForState as mr, maskDeep as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, CrossAccountSecretRefusalError as na, describeDockerCapturedOutput as ni, producerRegionsFromState as nn, TEMPLATE_SOURCED_RULES as nr, exportAliasCollisionScrubWarning as nt, planFailedOps as o, IntrinsicResolutionRefusalError as oa, formatDockerLoginError as oi, s3BucketDualStackDomainName as on, errorCauseChain as or, secretSafeKeyDisplay as ot, withResourceDeadline as p, ProvisioningError as pa, stripControlChars as pi, envCredentialsAreAssumedRole as pn, recoverMaskedOutput as pr, createMaskedRetryLogger as pt, formatResourceLine as q, clearBucketRegionCache as qi, findActionableSilentDrops as qn, ensureAssetStorage as qr, configBooleanRefusal as qt, DeployEngine as r, DependencyError as ra, describeDockerExecFailure as ri, withSharedDrainBudget as rn, carriesSecretMask as rr, isExportAliasCollision as rt, planRollback as s, LocalInvokeBuildError as sa, getDockerCmd as si, s3BucketRegionalDomainName as sn, identityKeyFor as sr, getCurrentResourceSecrets as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, ConfigError as ta, buildDockerImage as ti, classifyReplaySecretRegion as tn, STATE_SOURCED_READBACK_RULES as tr, collectPublishedOutputNames as tt, resolveReplacementOldType as u, MalformedProducerRecordRefusalError as ua, runDockerForeground as ui, AWS_CREDENTIAL_ENV_KEYS as un, maskSecretsInError as ur, clearOnUpdateRemoval as ut, isSecretBearingReferenceString as v, StateError as va, getDefaultStateBucketName as vi, displayLogicalId as vn, rebuildClientForBucketRegion as vr, interruptWatchListenerCount as vt, reachableDivergentParameters as w, isMarkedNonRetryable as wa, resolveStateBucketWithDefault as wi, malformedLocalOutputsWarning as wn, shellQuote as wr, UNSPECIFIED_SKIP_REASON as wt, bindingSkippedOutputs as x, isCdkdError as xa, resolveAutoAssetStorage as xi, isReadableResourceEntry as xn, buildLockContentionMessage as xr, CloudControlProvider as xt, keptWholeReasonText as y, SynthesisError as ya, getLegacyStateBucketName as yi, hasReadableOutputs as yn, UNREPRODUCIBLE_LOCK_CLAUSE as yr, isInterruptedWaitError as yt, isStatefulRecreateTargetForReplace as z, producerRecordKey as zi, refuseMalformedResourcesForDestroy as zn, WorkGraph as zr, refStateLookupFromResource as zt };
|
|
47395
|
+
//# sourceMappingURL=deploy-engine-C1dgx124.js.map
|