@wraps.dev/cli 2.19.2 → 2.19.5
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
CHANGED
|
@@ -417,6 +417,7 @@ __export(errors_exports, {
|
|
|
417
417
|
awsErrorToWrapsError: () => awsErrorToWrapsError,
|
|
418
418
|
classifyDNSError: () => classifyDNSError,
|
|
419
419
|
errors: () => errors,
|
|
420
|
+
extractPulumiErrorSummary: () => extractPulumiErrorSummary,
|
|
420
421
|
handleCLIError: () => handleCLIError,
|
|
421
422
|
isAWSError: () => isAWSError,
|
|
422
423
|
isAWSNotFoundError: () => isAWSNotFoundError,
|
|
@@ -562,6 +563,38 @@ function sanitizeErrorMessage(error) {
|
|
|
562
563
|
}
|
|
563
564
|
return redacted;
|
|
564
565
|
}
|
|
566
|
+
function extractPulumiErrorSummary(pulumiOutput) {
|
|
567
|
+
const lines = pulumiOutput.split("\n");
|
|
568
|
+
const errorLines = [];
|
|
569
|
+
let inErrorBlock = false;
|
|
570
|
+
for (const line of lines) {
|
|
571
|
+
const trimmed = line.trim();
|
|
572
|
+
if (trimmed.match(/^error:\s+\d+ error/i) || trimmed.match(/^error: one or more/i)) {
|
|
573
|
+
inErrorBlock = true;
|
|
574
|
+
}
|
|
575
|
+
if (inErrorBlock) {
|
|
576
|
+
if (trimmed.startsWith("err?:") || trimmed.startsWith("code:") || trimmed.startsWith("stdout:")) {
|
|
577
|
+
break;
|
|
578
|
+
}
|
|
579
|
+
if (trimmed) {
|
|
580
|
+
errorLines.push(trimmed);
|
|
581
|
+
}
|
|
582
|
+
continue;
|
|
583
|
+
}
|
|
584
|
+
if (trimmed.startsWith("error:") && !trimmed.includes("verification warning") && !trimmed.includes("is deprecated") || trimmed.startsWith("Error:") || trimmed.startsWith("Failed to ") || trimmed.startsWith("panic:")) {
|
|
585
|
+
errorLines.push(trimmed);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
if (errorLines.length > 0) {
|
|
589
|
+
const summary = errorLines.slice(0, 15).join("\n");
|
|
590
|
+
return redactSensitiveValues(summary);
|
|
591
|
+
}
|
|
592
|
+
const redacted = redactSensitiveValues(pulumiOutput);
|
|
593
|
+
if (redacted.length > 1500) {
|
|
594
|
+
return `${redacted.slice(0, 1500)}...`;
|
|
595
|
+
}
|
|
596
|
+
return redacted;
|
|
597
|
+
}
|
|
565
598
|
function handleCLIError(error, command) {
|
|
566
599
|
const cmdContext = command || "unknown";
|
|
567
600
|
if (isJsonMode()) {
|
|
@@ -7968,11 +8001,23 @@ async function createMailManagerArchive(config2) {
|
|
|
7968
8001
|
resolve(name);
|
|
7969
8002
|
});
|
|
7970
8003
|
});
|
|
8004
|
+
if (!configSetName) {
|
|
8005
|
+
throw new Error(
|
|
8006
|
+
"Failed to resolve SES configuration set name from Pulumi output"
|
|
8007
|
+
);
|
|
8008
|
+
}
|
|
7971
8009
|
const putArchivingOptionsCommand = new PutConfigurationSetArchivingOptionsCommand({
|
|
7972
8010
|
ConfigurationSetName: configSetName,
|
|
7973
8011
|
ArchiveArn: archiveArn
|
|
7974
8012
|
});
|
|
7975
|
-
|
|
8013
|
+
try {
|
|
8014
|
+
await sesClient.send(putArchivingOptionsCommand);
|
|
8015
|
+
} catch (error) {
|
|
8016
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
8017
|
+
throw new Error(
|
|
8018
|
+
`Failed to link Mail Manager archive to SES config set '${configSetName}' in ${region}: ${detail}`
|
|
8019
|
+
);
|
|
8020
|
+
}
|
|
7976
8021
|
if (!(archiveId && archiveArn)) {
|
|
7977
8022
|
throw new Error("Failed to get archive ID or ARN");
|
|
7978
8023
|
}
|
|
@@ -27641,8 +27686,11 @@ ${pc35.bold("Cost Impact:")}`);
|
|
|
27641
27686
|
trackError("STACK_LOCKED", "email:upgrade", { step: "deploy" });
|
|
27642
27687
|
throw errors.stackLocked();
|
|
27643
27688
|
}
|
|
27644
|
-
trackError("UPGRADE_FAILED", "email:upgrade", {
|
|
27645
|
-
|
|
27689
|
+
trackError("UPGRADE_FAILED", "email:upgrade", {
|
|
27690
|
+
step: "deploy",
|
|
27691
|
+
error_detail: redactSensitiveValues(msg).slice(0, 3e3)
|
|
27692
|
+
});
|
|
27693
|
+
throw new Error(`Pulumi upgrade failed: ${extractPulumiErrorSummary(msg)}`);
|
|
27646
27694
|
}
|
|
27647
27695
|
let dnsAutoCreated = false;
|
|
27648
27696
|
if (!isJsonMode() && outputs.domain && outputs.dkimTokens && outputs.dkimTokens.length > 0) {
|