@wraps.dev/cli 2.16.0 → 2.17.0

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,
@@ -36775,6 +36797,11 @@ args.options([
36775
36797
  name: "subdomain",
36776
36798
  description: "Subdomain for inbound email (e.g., inbound, support)",
36777
36799
  defaultValue: void 0
36800
+ },
36801
+ {
36802
+ name: "root",
36803
+ description: "Use root domain for inbound email (no subdomain)",
36804
+ defaultValue: false
36778
36805
  }
36779
36806
  ]);
36780
36807
  var flags = args.parse(process.argv);
@@ -37059,6 +37086,7 @@ Usage: ${pc53.cyan("wraps email verify --domain yourapp.com")}
37059
37086
  region: flags.region,
37060
37087
  subdomain: flags.domain,
37061
37088
  // reuse --domain flag for subdomain
37089
+ root: flags.root,
37062
37090
  yes: flags.yes,
37063
37091
  preview: flags.preview,
37064
37092
  json: flags.json
@@ -37093,6 +37121,7 @@ Usage: ${pc53.cyan("wraps email verify --domain yourapp.com")}
37093
37121
  await inboundAdd({
37094
37122
  region: flags.region,
37095
37123
  subdomain: flags.subdomain,
37124
+ root: flags.root,
37096
37125
  domain: flags.domain,
37097
37126
  yes: flags.yes,
37098
37127
  json: flags.json