@wraps.dev/cli 2.16.0 → 2.17.1

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
@@ -3434,6 +3434,28 @@ async function promptDNSProvider(domain, availableProviders) {
3434
3434
  return provider;
3435
3435
  }
3436
3436
  async function promptInboundSubdomain(domain) {
3437
+ const choice = await clack6.select({
3438
+ message: `Where should ${pc7.cyan(domain)} receive inbound email?`,
3439
+ options: [
3440
+ {
3441
+ value: "",
3442
+ label: `${domain} (root domain)`,
3443
+ hint: `e.g., support@${domain}`
3444
+ },
3445
+ {
3446
+ value: "__subdomain__",
3447
+ label: "Use a subdomain",
3448
+ hint: `e.g., inbound.${domain}`
3449
+ }
3450
+ ]
3451
+ });
3452
+ if (clack6.isCancel(choice)) {
3453
+ clack6.cancel("Operation cancelled.");
3454
+ process.exit(0);
3455
+ }
3456
+ if (choice === "") {
3457
+ return "";
3458
+ }
3437
3459
  const subdomain = await clack6.text({
3438
3460
  message: `Subdomain for receiving emails (e.g., inbound \u2192 inbound.${domain}):`,
3439
3461
  placeholder: "inbound",
@@ -4665,12 +4687,12 @@ function migrateInboundToMultiDomain(metadata) {
4665
4687
  return false;
4666
4688
  }
4667
4689
  const inbound = emailConfig.inbound;
4668
- const receivingDomain = inbound.receivingDomain || (inbound.subdomain && emailConfig.domain ? `${inbound.subdomain}.${emailConfig.domain}` : null);
4690
+ const receivingDomain = inbound.receivingDomain || (inbound.subdomain ? `${inbound.subdomain}.${emailConfig.domain}` : emailConfig.domain || null);
4669
4691
  if (!receivingDomain) {
4670
4692
  return false;
4671
4693
  }
4672
4694
  const parentDomain = emailConfig.domain || "";
4673
- const subdomain = inbound.subdomain || "inbound";
4695
+ const subdomain = inbound.subdomain ?? "";
4674
4696
  emailConfig.inboundDomains = [
4675
4697
  {
4676
4698
  subdomain,
@@ -10209,6 +10231,7 @@ async function withLockRetry(fn, options) {
10209
10231
 
10210
10232
  // src/commands/cdn/destroy.ts
10211
10233
  async function cdnDestroy(options) {
10234
+ await ensurePulumiInstalled();
10212
10235
  const startTime = Date.now();
10213
10236
  if (isJsonMode() && !options.force) {
10214
10237
  throw new WrapsError(
@@ -12124,6 +12147,7 @@ import * as clack11 from "@clack/prompts";
12124
12147
  import * as pulumi6 from "@pulumi/pulumi";
12125
12148
  import pc12 from "picocolors";
12126
12149
  async function cdnStatus(options) {
12150
+ await ensurePulumiInstalled();
12127
12151
  const startTime = Date.now();
12128
12152
  const progress = new DeploymentProgress();
12129
12153
  if (!isJsonMode()) {
@@ -12297,6 +12321,7 @@ init_json_output();
12297
12321
  init_metadata();
12298
12322
  init_output();
12299
12323
  async function cdnSync(options) {
12324
+ await ensurePulumiInstalled();
12300
12325
  const startTime = Date.now();
12301
12326
  const progress = new DeploymentProgress();
12302
12327
  if (!isJsonMode()) {
@@ -12476,6 +12501,7 @@ init_json_output();
12476
12501
  init_metadata();
12477
12502
  init_output();
12478
12503
  async function cdnUpgrade(options) {
12504
+ await ensurePulumiInstalled();
12479
12505
  const startTime = Date.now();
12480
12506
  const progress = new DeploymentProgress();
12481
12507
  if (!isJsonMode()) {
@@ -12828,6 +12854,7 @@ async function checkDistributionStatus(distributionId, region) {
12828
12854
  }
12829
12855
  }
12830
12856
  async function cdnVerify(options) {
12857
+ await ensurePulumiInstalled();
12831
12858
  const startTime = Date.now();
12832
12859
  const progress = new DeploymentProgress();
12833
12860
  if (!isJsonMode()) {
@@ -19796,6 +19823,7 @@ async function inboundDestroy(options) {
19796
19823
  clack20.intro(pc21.bold("Inbound Email Infrastructure Teardown"));
19797
19824
  }
19798
19825
  const progress = new DeploymentProgress();
19826
+ await ensurePulumiInstalled();
19799
19827
  const identity = await progress.execute(
19800
19828
  "Validating AWS credentials",
19801
19829
  async () => validateAWSCredentials()
@@ -21304,6 +21332,7 @@ async function restore(options) {
21304
21332
  );
21305
21333
  }
21306
21334
  const progress = new DeploymentProgress();
21335
+ await ensurePulumiInstalled();
21307
21336
  const identity = await progress.execute(
21308
21337
  "Validating AWS credentials",
21309
21338
  async () => validateAWSCredentials()
@@ -21485,6 +21514,7 @@ import * as clack25 from "@clack/prompts";
21485
21514
  import * as pulumi19 from "@pulumi/pulumi";
21486
21515
  import pc26 from "picocolors";
21487
21516
  async function emailStatus(options) {
21517
+ await ensurePulumiInstalled();
21488
21518
  const startTime = Date.now();
21489
21519
  const progress = new DeploymentProgress();
21490
21520
  if (!isJsonMode()) {
@@ -31668,6 +31698,7 @@ init_fs();
31668
31698
  init_metadata();
31669
31699
  init_output();
31670
31700
  async function dashboard(options) {
31701
+ await ensurePulumiInstalled();
31671
31702
  clack36.intro(pc39.bold("Wraps Dashboard"));
31672
31703
  const progress = new DeploymentProgress();
31673
31704
  const identity = await progress.execute(
@@ -31904,6 +31935,7 @@ import * as clack38 from "@clack/prompts";
31904
31935
  import * as pulumi23 from "@pulumi/pulumi";
31905
31936
  import pc41 from "picocolors";
31906
31937
  async function status(_options) {
31938
+ await ensurePulumiInstalled();
31907
31939
  const startTime = Date.now();
31908
31940
  const progress = new DeploymentProgress();
31909
31941
  if (!isJsonMode()) {
@@ -32849,6 +32881,7 @@ init_json_output();
32849
32881
  init_metadata();
32850
32882
  init_output();
32851
32883
  async function smsDestroy(options) {
32884
+ await ensurePulumiInstalled();
32852
32885
  const startTime = Date.now();
32853
32886
  if (isJsonMode() && !options.force) {
32854
32887
  throw new WrapsError(
@@ -34182,6 +34215,7 @@ function displaySMSStatus(options) {
34182
34215
  clack42.note(lines.join("\n"), "SMS Status");
34183
34216
  }
34184
34217
  async function smsStatus(_options) {
34218
+ await ensurePulumiInstalled();
34185
34219
  const startTime = Date.now();
34186
34220
  const progress = new DeploymentProgress();
34187
34221
  if (!isJsonMode()) {
@@ -34261,6 +34295,7 @@ init_json_output();
34261
34295
  init_metadata();
34262
34296
  init_output();
34263
34297
  async function smsSync(options) {
34298
+ await ensurePulumiInstalled();
34264
34299
  const startTime = Date.now();
34265
34300
  if (!isJsonMode()) {
34266
34301
  clack43.intro(pc46.bold("Wraps SMS Infrastructure Sync"));
@@ -36775,6 +36810,11 @@ args.options([
36775
36810
  name: "subdomain",
36776
36811
  description: "Subdomain for inbound email (e.g., inbound, support)",
36777
36812
  defaultValue: void 0
36813
+ },
36814
+ {
36815
+ name: "root",
36816
+ description: "Use root domain for inbound email (no subdomain)",
36817
+ defaultValue: false
36778
36818
  }
36779
36819
  ]);
36780
36820
  var flags = args.parse(process.argv);
@@ -37059,6 +37099,7 @@ Usage: ${pc53.cyan("wraps email verify --domain yourapp.com")}
37059
37099
  region: flags.region,
37060
37100
  subdomain: flags.domain,
37061
37101
  // reuse --domain flag for subdomain
37102
+ root: flags.root,
37062
37103
  yes: flags.yes,
37063
37104
  preview: flags.preview,
37064
37105
  json: flags.json
@@ -37093,6 +37134,7 @@ Usage: ${pc53.cyan("wraps email verify --domain yourapp.com")}
37093
37134
  await inboundAdd({
37094
37135
  region: flags.region,
37095
37136
  subdomain: flags.subdomain,
37137
+ root: flags.root,
37096
37138
  domain: flags.domain,
37097
37139
  yes: flags.yes,
37098
37140
  json: flags.json