@wraps.dev/cli 2.11.4 → 2.11.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
@@ -7334,7 +7334,11 @@ async function login(options) {
7334
7334
  client_id: "wraps-cli"
7335
7335
  });
7336
7336
  if (codeError || !codeData) {
7337
- trackCommand("auth:login", { success: false, duration_ms: Date.now() - startTime, method: "device" });
7337
+ trackCommand("auth:login", {
7338
+ success: false,
7339
+ duration_ms: Date.now() - startTime,
7340
+ method: "device"
7341
+ });
7338
7342
  trackError("DEVICE_AUTH_FAILED", "auth:login", { step: "request_code" });
7339
7343
  clack.log.error("Failed to start device authorization.");
7340
7344
  process.exit(1);
@@ -7410,7 +7414,11 @@ async function login(options) {
7410
7414
  continue;
7411
7415
  }
7412
7416
  if (errorCode === "access_denied") {
7413
- trackCommand("auth:login", { success: false, duration_ms: Date.now() - startTime, method: "device" });
7417
+ trackCommand("auth:login", {
7418
+ success: false,
7419
+ duration_ms: Date.now() - startTime,
7420
+ method: "device"
7421
+ });
7414
7422
  trackError("ACCESS_DENIED", "auth:login", { step: "poll_token" });
7415
7423
  spinner8.stop("Denied.");
7416
7424
  clack.log.error("Authorization was denied.");
@@ -7421,7 +7429,11 @@ async function login(options) {
7421
7429
  }
7422
7430
  }
7423
7431
  }
7424
- trackCommand("auth:login", { success: false, duration_ms: Date.now() - startTime, method: "device" });
7432
+ trackCommand("auth:login", {
7433
+ success: false,
7434
+ duration_ms: Date.now() - startTime,
7435
+ method: "device"
7436
+ });
7425
7437
  trackError("DEVICE_CODE_EXPIRED", "auth:login", { step: "poll_token" });
7426
7438
  spinner8.stop("Expired.");
7427
7439
  clack.log.error("Device code expired. Run `wraps auth login` to try again.");
@@ -20686,12 +20698,19 @@ ${pc28.bold("Current Configuration:")}
20686
20698
  if (config2.domain) {
20687
20699
  console.log(` Sending Domain: ${pc28.cyan(config2.domain)}`);
20688
20700
  }
20701
+ const hasHttpsTrackingPending = config2.tracking?.httpsEnabled && config2.tracking?.customRedirectDomain;
20689
20702
  if (config2.tracking?.enabled) {
20690
20703
  console.log(` ${pc28.green("\u2713")} Open & Click Tracking`);
20691
20704
  if (config2.tracking.customRedirectDomain) {
20692
- console.log(
20693
- ` ${pc28.dim("\u2514\u2500")} Custom domain: ${pc28.cyan(config2.tracking.customRedirectDomain)}`
20694
- );
20705
+ if (hasHttpsTrackingPending) {
20706
+ console.log(
20707
+ ` ${pc28.dim("\u2514\u2500")} Custom domain: ${pc28.cyan(config2.tracking.customRedirectDomain)} ${pc28.yellow("(HTTPS pending - certificate validation required)")}`
20708
+ );
20709
+ } else {
20710
+ console.log(
20711
+ ` ${pc28.dim("\u2514\u2500")} Custom domain: ${pc28.cyan(config2.tracking.customRedirectDomain)}`
20712
+ );
20713
+ }
20695
20714
  }
20696
20715
  }
20697
20716
  if (config2.suppressionList?.enabled) {
@@ -20747,60 +20766,69 @@ ${pc28.bold("Current Configuration:")}
20747
20766
  Estimated Cost: ${pc28.cyan(`~${formatCost(currentCostData.total.monthly)}/mo`)}`
20748
20767
  );
20749
20768
  console.log("");
20769
+ const upgradeOptions = [];
20770
+ if (hasHttpsTrackingPending) {
20771
+ upgradeOptions.push({
20772
+ value: "finish-tracking-domain",
20773
+ label: "Finish setting up custom tracking domain",
20774
+ hint: `Complete HTTPS setup for ${config2.tracking.customRedirectDomain}`
20775
+ });
20776
+ }
20777
+ upgradeOptions.push(
20778
+ {
20779
+ value: "preset",
20780
+ label: "Upgrade to a different preset",
20781
+ hint: "Starter \u2192 Production \u2192 Enterprise"
20782
+ },
20783
+ {
20784
+ value: "archiving",
20785
+ label: config2.emailArchiving?.enabled ? "Change email archiving settings" : "Enable email archiving",
20786
+ hint: config2.emailArchiving?.enabled ? "Update retention or disable" : "Store full email content with HTML"
20787
+ },
20788
+ {
20789
+ value: "tracking-domain",
20790
+ label: "Add/change custom tracking domain",
20791
+ hint: "Use your own domain for email links"
20792
+ },
20793
+ {
20794
+ value: "retention",
20795
+ label: "Change email history retention",
20796
+ hint: "7 days, 30 days, 90 days, 6 months, 1 year, 18 months"
20797
+ },
20798
+ {
20799
+ value: "events",
20800
+ label: "Customize tracked event types",
20801
+ hint: "Choose which SES events to track"
20802
+ },
20803
+ {
20804
+ value: "dedicated-ip",
20805
+ label: "Enable dedicated IP address",
20806
+ hint: "Requires 100k+ emails/day ($50-100/mo)"
20807
+ },
20808
+ {
20809
+ value: "alerts",
20810
+ label: config2.alerts?.enabled ? "Manage reputation alerts" : "Enable reputation alerts",
20811
+ hint: config2.alerts?.enabled ? "Update thresholds or notification settings" : "Get notified before AWS suspends your account"
20812
+ },
20813
+ {
20814
+ value: "custom",
20815
+ label: "Custom configuration",
20816
+ hint: "Modify multiple settings at once"
20817
+ },
20818
+ {
20819
+ value: "wraps-dashboard",
20820
+ label: metadata.services.email?.webhookSecret ? "Manage Wraps Dashboard connection" : "Connect to Wraps Dashboard",
20821
+ hint: metadata.services.email?.webhookSecret ? "Regenerate secret or disconnect" : "Send events to dashboard for analytics"
20822
+ },
20823
+ {
20824
+ value: "smtp-credentials",
20825
+ label: metadata.services.email?.smtpCredentials?.enabled ? "Manage SMTP credentials" : "Enable SMTP credentials",
20826
+ hint: metadata.services.email?.smtpCredentials?.enabled ? "Rotate or disable credentials" : "Generate credentials for PHP, WordPress, etc."
20827
+ }
20828
+ );
20750
20829
  upgradeAction = await clack27.select({
20751
20830
  message: "What would you like to do?",
20752
- options: [
20753
- {
20754
- value: "preset",
20755
- label: "Upgrade to a different preset",
20756
- hint: "Starter \u2192 Production \u2192 Enterprise"
20757
- },
20758
- {
20759
- value: "archiving",
20760
- label: config2.emailArchiving?.enabled ? "Change email archiving settings" : "Enable email archiving",
20761
- hint: config2.emailArchiving?.enabled ? "Update retention or disable" : "Store full email content with HTML"
20762
- },
20763
- {
20764
- value: "tracking-domain",
20765
- label: "Add/change custom tracking domain",
20766
- hint: "Use your own domain for email links"
20767
- },
20768
- {
20769
- value: "retention",
20770
- label: "Change email history retention",
20771
- hint: "7 days, 30 days, 90 days, 6 months, 1 year, 18 months"
20772
- },
20773
- {
20774
- value: "events",
20775
- label: "Customize tracked event types",
20776
- hint: "Choose which SES events to track"
20777
- },
20778
- {
20779
- value: "dedicated-ip",
20780
- label: "Enable dedicated IP address",
20781
- hint: "Requires 100k+ emails/day ($50-100/mo)"
20782
- },
20783
- {
20784
- value: "alerts",
20785
- label: config2.alerts?.enabled ? "Manage reputation alerts" : "Enable reputation alerts",
20786
- hint: config2.alerts?.enabled ? "Update thresholds or notification settings" : "Get notified before AWS suspends your account"
20787
- },
20788
- {
20789
- value: "custom",
20790
- label: "Custom configuration",
20791
- hint: "Modify multiple settings at once"
20792
- },
20793
- {
20794
- value: "wraps-dashboard",
20795
- label: metadata.services.email?.webhookSecret ? "Manage Wraps Dashboard connection" : "Connect to Wraps Dashboard",
20796
- hint: metadata.services.email?.webhookSecret ? "Regenerate secret or disconnect" : "Send events to dashboard for analytics"
20797
- },
20798
- {
20799
- value: "smtp-credentials",
20800
- label: metadata.services.email?.smtpCredentials?.enabled ? "Manage SMTP credentials" : "Enable SMTP credentials",
20801
- hint: metadata.services.email?.smtpCredentials?.enabled ? "Rotate or disable credentials" : "Generate credentials for PHP, WordPress, etc."
20802
- }
20803
- ]
20831
+ options: upgradeOptions
20804
20832
  });
20805
20833
  if (clack27.isCancel(upgradeAction)) {
20806
20834
  clack27.cancel("Upgrade cancelled.");
@@ -20809,6 +20837,14 @@ ${pc28.bold("Current Configuration:")}
20809
20837
  let updatedConfig = { ...config2 };
20810
20838
  let newPreset = metadata.services.email?.preset;
20811
20839
  switch (upgradeAction) {
20840
+ case "finish-tracking-domain": {
20841
+ clack27.log.info(
20842
+ `Checking certificate status for ${pc28.cyan(config2.tracking.customRedirectDomain)}...`
20843
+ );
20844
+ updatedConfig = { ...config2 };
20845
+ newPreset = metadata.services.email?.preset;
20846
+ break;
20847
+ }
20812
20848
  case "preset": {
20813
20849
  const presets = getAllPresetInfo().filter(
20814
20850
  (p) => p.name.toLowerCase() !== "custom"