@wraps.dev/cli 2.19.4 → 2.19.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
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()) {
|
|
@@ -17595,8 +17628,10 @@ async function createDynamoDBTables(config2) {
|
|
|
17595
17628
|
globalSecondaryIndexes: [
|
|
17596
17629
|
{
|
|
17597
17630
|
name: "accountId-sentAt-index",
|
|
17598
|
-
|
|
17599
|
-
|
|
17631
|
+
keySchemas: [
|
|
17632
|
+
{ attributeName: "accountId", keyType: "HASH" },
|
|
17633
|
+
{ attributeName: "sentAt", keyType: "RANGE" }
|
|
17634
|
+
],
|
|
17600
17635
|
projectionType: "ALL"
|
|
17601
17636
|
}
|
|
17602
17637
|
],
|
|
@@ -17626,8 +17661,10 @@ async function createDynamoDBTables(config2) {
|
|
|
17626
17661
|
globalSecondaryIndexes: [
|
|
17627
17662
|
{
|
|
17628
17663
|
name: "accountId-sentAt-index",
|
|
17629
|
-
|
|
17630
|
-
|
|
17664
|
+
keySchemas: [
|
|
17665
|
+
{ attributeName: "accountId", keyType: "HASH" },
|
|
17666
|
+
{ attributeName: "sentAt", keyType: "RANGE" }
|
|
17667
|
+
],
|
|
17631
17668
|
projectionType: "ALL"
|
|
17632
17669
|
}
|
|
17633
17670
|
],
|
|
@@ -27653,8 +27690,11 @@ ${pc35.bold("Cost Impact:")}`);
|
|
|
27653
27690
|
trackError("STACK_LOCKED", "email:upgrade", { step: "deploy" });
|
|
27654
27691
|
throw errors.stackLocked();
|
|
27655
27692
|
}
|
|
27656
|
-
trackError("UPGRADE_FAILED", "email:upgrade", {
|
|
27657
|
-
|
|
27693
|
+
trackError("UPGRADE_FAILED", "email:upgrade", {
|
|
27694
|
+
step: "deploy",
|
|
27695
|
+
error_detail: redactSensitiveValues(msg).slice(0, 3e3)
|
|
27696
|
+
});
|
|
27697
|
+
throw new Error(`Pulumi upgrade failed: ${extractPulumiErrorSummary(msg)}`);
|
|
27658
27698
|
}
|
|
27659
27699
|
let dnsAutoCreated = false;
|
|
27660
27700
|
if (!isJsonMode() && outputs.domain && outputs.dkimTokens && outputs.dkimTokens.length > 0) {
|