cdk-real-drift 0.3.4 → 0.3.6
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 +6 -1
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -12974,6 +12974,7 @@ async function runRecord(args) {
|
|
|
12974
12974
|
config = await loadConfig();
|
|
12975
12975
|
} catch (e) {
|
|
12976
12976
|
console.error(`error: ${e.message}`);
|
|
12977
|
+
if (a.json) emitJsonArray([]);
|
|
12977
12978
|
return 2;
|
|
12978
12979
|
}
|
|
12979
12980
|
let stacks;
|
|
@@ -13081,6 +13082,7 @@ async function runIgnore(args) {
|
|
|
13081
13082
|
config = await loadConfig();
|
|
13082
13083
|
} catch (e) {
|
|
13083
13084
|
console.error(`error: ${e.message}`);
|
|
13085
|
+
if (a.json) emitJsonArray([]);
|
|
13084
13086
|
return 2;
|
|
13085
13087
|
}
|
|
13086
13088
|
let stacks;
|
|
@@ -14289,6 +14291,7 @@ async function runRevert(args) {
|
|
|
14289
14291
|
config = await loadConfig();
|
|
14290
14292
|
} catch (e) {
|
|
14291
14293
|
console.error(`error: ${e.message}`);
|
|
14294
|
+
if (a.json) emitJsonArray([]);
|
|
14292
14295
|
return 2;
|
|
14293
14296
|
}
|
|
14294
14297
|
let stacks;
|
|
@@ -14502,12 +14505,14 @@ async function main(argv) {
|
|
|
14502
14505
|
return 2;
|
|
14503
14506
|
}
|
|
14504
14507
|
}
|
|
14505
|
-
|
|
14508
|
+
const argv = process.argv.slice(2);
|
|
14509
|
+
main(argv).then((code) => flushAndExit(code)).catch((e) => {
|
|
14506
14510
|
const msg = e?.message ?? String(e);
|
|
14507
14511
|
if (/credential|could not load cred|security token/i.test(msg)) console.error("error: no AWS credentials available. Configure them (aws configure / AWS_PROFILE / env vars) and retry.");
|
|
14508
14512
|
else if (/stack/i.test(msg) && /(does not exist|ValidationError)/i.test(msg)) console.error("error: stack not found in this account/region. Check the stack name and --region.");
|
|
14509
14513
|
else if (/AccessDenied|not authorized/i.test(msg)) console.error(`error: access denied — ${msg}`);
|
|
14510
14514
|
else console.error(`error: ${msg}`);
|
|
14515
|
+
if (argv.includes("--json")) console.log("[]");
|
|
14511
14516
|
return flushAndExit(2);
|
|
14512
14517
|
});
|
|
14513
14518
|
|