cdk-real-drift 0.12.40 → 0.12.41
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/cli.js +14 -8
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -4476,6 +4476,7 @@ async function listExports(client, accountId, region) {
|
|
|
4476
4476
|
return exports;
|
|
4477
4477
|
}
|
|
4478
4478
|
const crossRegionExportsCache = /* @__PURE__ */ new Map();
|
|
4479
|
+
const crossRegionExportsFetched = /* @__PURE__ */ new Map();
|
|
4479
4480
|
const CROSS_REGION_EXPORT_READER_TYPE = "Custom::CrossRegionExportReader";
|
|
4480
4481
|
/**
|
|
4481
4482
|
* Scan the parsed template for `Fn::GetAtt` references whose logicalId is a
|
|
@@ -4521,16 +4522,21 @@ function collectCrossRegionExportNames(template) {
|
|
|
4521
4522
|
}
|
|
4522
4523
|
async function getCrossRegionExports(ssm, accountId, region, names) {
|
|
4523
4524
|
const cacheKey = `${accountId}:${region}`;
|
|
4524
|
-
const
|
|
4525
|
-
|
|
4526
|
-
const
|
|
4527
|
-
|
|
4528
|
-
|
|
4525
|
+
const resolved = crossRegionExportsCache.get(cacheKey) ?? {};
|
|
4526
|
+
const attempted = crossRegionExportsFetched.get(cacheKey) ?? /* @__PURE__ */ new Set();
|
|
4527
|
+
const toFetch = names.filter((n) => !attempted.has(n));
|
|
4528
|
+
if (toFetch.length === 0) return resolved;
|
|
4529
|
+
const nextResolved = { ...resolved };
|
|
4530
|
+
const nextAttempted = new Set(attempted);
|
|
4531
|
+
for (let i = 0; i < toFetch.length; i += 10) {
|
|
4532
|
+
const batch = toFetch.slice(i, i + 10);
|
|
4529
4533
|
const res = await ssm.send(new GetParametersCommand({ Names: batch }));
|
|
4530
|
-
for (const p of res.Parameters ?? []) if (p.Name && typeof p.Value === "string")
|
|
4534
|
+
for (const p of res.Parameters ?? []) if (p.Name && typeof p.Value === "string") nextResolved[p.Name] = p.Value;
|
|
4535
|
+
for (const n of batch) nextAttempted.add(n);
|
|
4531
4536
|
}
|
|
4532
|
-
crossRegionExportsCache.set(cacheKey,
|
|
4533
|
-
|
|
4537
|
+
crossRegionExportsCache.set(cacheKey, nextResolved);
|
|
4538
|
+
crossRegionExportsFetched.set(cacheKey, nextAttempted);
|
|
4539
|
+
return nextResolved;
|
|
4534
4540
|
}
|
|
4535
4541
|
async function listStackResources(client, stackName) {
|
|
4536
4542
|
const physIds = {};
|