cdk-real-drift 0.2.65 → 0.2.67
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 +8 -6
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -854,9 +854,9 @@ async function resolveStacks(a) {
|
|
|
854
854
|
}
|
|
855
855
|
if (matched === 0) throw new Error(`glob "${name}" matched no stacks defined by the CDK app (found: ${known()})`);
|
|
856
856
|
} else {
|
|
857
|
-
const
|
|
858
|
-
if (
|
|
859
|
-
add(hit.stackName, hit.region ?? fallbackRegion, hit.template);
|
|
857
|
+
const hits = discovered.filter((s) => s.stackName === name);
|
|
858
|
+
if (hits.length === 0) throw new Error(`stack "${name}" is not defined by the CDK app (found: ${known()})`);
|
|
859
|
+
for (const hit of hits) add(hit.stackName, hit.region ?? fallbackRegion, hit.template);
|
|
860
860
|
}
|
|
861
861
|
if (out.length === 0) throw new Error(`no stacks match ${a.stackNames.join(", ")} (found: ${known()})`);
|
|
862
862
|
return out;
|
|
@@ -10001,12 +10001,13 @@ const writeEventBusPolicy = async (ctx) => {
|
|
|
10001
10001
|
const action = ctx.declared["Action"];
|
|
10002
10002
|
const principal = str(ctx.declared["Principal"]);
|
|
10003
10003
|
if (action === void 0 || principal === void 0) throw new Error("EventBusPolicy revert needs a Statement (or Action + Principal)");
|
|
10004
|
+
const { partition } = partitionForRegion(ctx.region);
|
|
10004
10005
|
desiredStatement = {
|
|
10005
10006
|
Sid: statementId,
|
|
10006
10007
|
Effect: "Allow",
|
|
10007
|
-
Principal: principal === "*" ? "*" : { AWS: `arn:
|
|
10008
|
+
Principal: principal === "*" ? "*" : { AWS: `arn:${partition}:iam::${principal}:root` },
|
|
10008
10009
|
Action: action,
|
|
10009
|
-
Resource: `arn:
|
|
10010
|
+
Resource: `arn:${partition}:events:${ctx.region}:${ctx.accountId}:event-bus/${eventBusName}`,
|
|
10010
10011
|
...ctx.declared["Condition"] !== void 0 ? { Condition: ctx.declared["Condition"] } : {}
|
|
10011
10012
|
};
|
|
10012
10013
|
}
|
|
@@ -13779,7 +13780,8 @@ async function runCheck(args) {
|
|
|
13779
13780
|
return 2;
|
|
13780
13781
|
}
|
|
13781
13782
|
if (stacks.length === 0) {
|
|
13782
|
-
console.
|
|
13783
|
+
if (a.json) console.log("[]");
|
|
13784
|
+
else console.error("note: the CDK app defines no stacks — nothing to check");
|
|
13783
13785
|
return 0;
|
|
13784
13786
|
}
|
|
13785
13787
|
if (!a.json) {
|