@wraps.dev/cli 2.23.1 → 2.23.2

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.
Binary file
package/dist/cli.js CHANGED
@@ -528,6 +528,9 @@ function parsePulumiError(error) {
528
528
  if (message.includes("stack is currently locked")) {
529
529
  return { code: "STACK_LOCKED" };
530
530
  }
531
+ if (/ENOENT[:\s].*\bpulumi\b|spawn pulumi ENOENT/.test(message)) {
532
+ return { code: "NOT_INSTALLED" };
533
+ }
531
534
  return { code: "PULUMI_ERROR" };
532
535
  }
533
536
  function redactSensitiveValues(input) {
@@ -795,6 +798,8 @@ function pulumiErrorToWrapsError(code, iamAction, service, resourceName, resourc
795
798
  );
796
799
  case "STACK_LOCKED":
797
800
  return errors.stackLocked();
801
+ case "NOT_INSTALLED":
802
+ return errors.pulumiNotInstalled();
798
803
  case "SES_PERMISSION_DENIED":
799
804
  return errors.sesPermissionDenied(iamAction || "unknown");
800
805
  case "DYNAMODB_PERMISSION_DENIED":
@@ -34300,6 +34305,13 @@ async function selfhostDestroy(options) {
34300
34305
  process.exit(0);
34301
34306
  }
34302
34307
  }
34308
+ const wasAutoInstalled = await progress.execute(
34309
+ "Checking Pulumi CLI installation",
34310
+ async () => await ensurePulumiInstalled()
34311
+ );
34312
+ if (wasAutoInstalled) {
34313
+ progress.info("Pulumi CLI was automatically installed");
34314
+ }
34303
34315
  await progress.execute(
34304
34316
  "Destroying self-hosted infrastructure (this may take 2-3 minutes)",
34305
34317
  async () => {