@wraps.dev/cli 2.22.2 → 2.22.3

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
@@ -1748,8 +1748,8 @@ async function ensurePulumiWorkDir(options) {
1748
1748
  );
1749
1749
  return;
1750
1750
  } catch (error) {
1751
- const clack64 = await import("@clack/prompts");
1752
- clack64.log.warn(
1751
+ const clack65 = await import("@clack/prompts");
1752
+ clack65.log.warn(
1753
1753
  `S3 state backend unavailable (${error instanceof Error ? error.message : error}). Using local state.`
1754
1754
  );
1755
1755
  }
@@ -1803,6 +1803,40 @@ async function clearAuthConfig() {
1803
1803
  await saveAuthConfig(existing);
1804
1804
  }
1805
1805
  }
1806
+ function normalizeInstanceKey(baseURL) {
1807
+ return baseURL.trim().replace(/\/+$/, "").toLowerCase();
1808
+ }
1809
+ async function saveSelfhostAuth(baseURL, auth) {
1810
+ const existing = await readAuthConfig();
1811
+ const selfhost = { ...existing?.selfhost };
1812
+ selfhost[normalizeInstanceKey(baseURL)] = auth;
1813
+ await saveAuthConfig({ ...existing, selfhost });
1814
+ }
1815
+ async function readSelfhostAuth(baseURL) {
1816
+ const config2 = await readAuthConfig();
1817
+ return config2?.selfhost?.[normalizeInstanceKey(baseURL)] ?? null;
1818
+ }
1819
+ async function clearSelfhostAuth(baseURL) {
1820
+ const existing = await readAuthConfig();
1821
+ if (!existing?.selfhost) {
1822
+ return;
1823
+ }
1824
+ delete existing.selfhost[normalizeInstanceKey(baseURL)];
1825
+ await saveAuthConfig(existing);
1826
+ }
1827
+ async function resolveSelfhostToken(baseURL, flags2) {
1828
+ if (flags2?.token) {
1829
+ return flags2.token;
1830
+ }
1831
+ const session = await readSelfhostAuth(baseURL);
1832
+ if (!session?.token) {
1833
+ return null;
1834
+ }
1835
+ if (session.expiresAt && new Date(session.expiresAt) <= /* @__PURE__ */ new Date()) {
1836
+ return null;
1837
+ }
1838
+ return session.token;
1839
+ }
1806
1840
  function resolveToken(flags2) {
1807
1841
  return flags2?.token || process.env.WRAPS_API_KEY || null;
1808
1842
  }
@@ -6855,23 +6889,23 @@ async function withLockRetry(fn, options) {
6855
6889
  if (parsed.code !== "STACK_LOCKED") {
6856
6890
  throw error;
6857
6891
  }
6858
- const clack64 = await import("@clack/prompts");
6859
- const pc68 = (await import("picocolors")).default;
6892
+ const clack65 = await import("@clack/prompts");
6893
+ const pc69 = (await import("picocolors")).default;
6860
6894
  if (options.autoConfirm) {
6861
- clack64.log.warn(
6895
+ clack65.log.warn(
6862
6896
  "Stack is locked from a previous interrupted run. Auto-clearing..."
6863
6897
  );
6864
6898
  } else {
6865
- const shouldClear = await clack64.confirm({
6866
- message: `Stack is locked from a previous interrupted run. ${pc68.yellow("Clear the stale lock and retry?")}`,
6899
+ const shouldClear = await clack65.confirm({
6900
+ message: `Stack is locked from a previous interrupted run. ${pc69.yellow("Clear the stale lock and retry?")}`,
6867
6901
  initialValue: true
6868
6902
  });
6869
- if (clack64.isCancel(shouldClear) || !shouldClear) {
6903
+ if (clack65.isCancel(shouldClear) || !shouldClear) {
6870
6904
  throw errors.stackLocked();
6871
6905
  }
6872
6906
  }
6873
6907
  const cleared = await clearStackLocks(options.accountId, options.region);
6874
- clack64.log.info(
6908
+ clack65.log.info(
6875
6909
  `Cleared ${cleared} lock file${cleared === 1 ? "" : "s"}. Retrying...`
6876
6910
  );
6877
6911
  return fn();
@@ -10205,8 +10239,8 @@ import { homedir as homedir4, tmpdir as tmpdir2 } from "os";
10205
10239
  import { join as join23 } from "path";
10206
10240
  import { Readable } from "stream";
10207
10241
  import { pipeline } from "stream/promises";
10208
- import { cancel as cancel35, confirm as confirm29, intro as intro58, isCancel as isCancel40, log as log57 } from "@clack/prompts";
10209
- import pc66 from "picocolors";
10242
+ import { cancel as cancel35, confirm as confirm29, intro as intro59, isCancel as isCancel40, log as log58 } from "@clack/prompts";
10243
+ import pc67 from "picocolors";
10210
10244
  function isStandaloneInstall() {
10211
10245
  return process.execPath.includes(".wraps/runtime");
10212
10246
  }
@@ -10235,7 +10269,7 @@ function detectPlatformArch() {
10235
10269
  return { platform: platform2, arch };
10236
10270
  }
10237
10271
  async function update(currentVersion) {
10238
- intro58(pc66.bold("Wraps CLI Update"));
10272
+ intro59(pc67.bold("Wraps CLI Update"));
10239
10273
  const progress = new DeploymentProgress();
10240
10274
  const result = await progress.execute(
10241
10275
  "Checking for updates...",
@@ -10247,20 +10281,20 @@ async function update(currentVersion) {
10247
10281
  }
10248
10282
  const { version: latestVersion, release } = result;
10249
10283
  if (currentVersion === latestVersion) {
10250
- progress.succeed(`Already up to date ${pc66.dim(`(v${currentVersion})`)}`);
10284
+ progress.succeed(`Already up to date ${pc67.dim(`(v${currentVersion})`)}`);
10251
10285
  return;
10252
10286
  }
10253
10287
  console.log();
10254
- log57.info(
10255
- `Current version: ${pc66.dim(`v${currentVersion}`)}
10256
- Latest version: ${pc66.cyan(`v${latestVersion}`)}`
10288
+ log58.info(
10289
+ `Current version: ${pc67.dim(`v${currentVersion}`)}
10290
+ Latest version: ${pc67.cyan(`v${latestVersion}`)}`
10257
10291
  );
10258
10292
  console.log();
10259
10293
  if (!isStandaloneInstall()) {
10260
- log57.info(
10294
+ log58.info(
10261
10295
  `You installed Wraps via npm. Update with:
10262
10296
 
10263
- ${pc66.cyan("npm update -g @wraps.dev/cli")}`
10297
+ ${pc67.cyan("npm update -g @wraps.dev/cli")}`
10264
10298
  );
10265
10299
  return;
10266
10300
  }
@@ -10335,7 +10369,7 @@ async function update(currentVersion) {
10335
10369
  });
10336
10370
  console.log();
10337
10371
  progress.succeed(
10338
- `Updated to ${pc66.cyan(`v${latestVersion}`)} successfully!`
10372
+ `Updated to ${pc67.cyan(`v${latestVersion}`)} successfully!`
10339
10373
  );
10340
10374
  } finally {
10341
10375
  rmSync(tmp, { recursive: true, force: true });
@@ -10358,8 +10392,8 @@ init_esm_shims();
10358
10392
  import { readFileSync as readFileSync3 } from "fs";
10359
10393
  import { dirname as dirname7, join as join24 } from "path";
10360
10394
  import { fileURLToPath as fileURLToPath8 } from "url";
10361
- import * as clack63 from "@clack/prompts";
10362
- import pc67 from "picocolors";
10395
+ import * as clack64 from "@clack/prompts";
10396
+ import pc68 from "picocolors";
10363
10397
 
10364
10398
  // src/commands/auth/login.ts
10365
10399
  init_esm_shims();
@@ -24180,12 +24214,12 @@ async function emailLogsList(options) {
24180
24214
  }
24181
24215
  const COL = { time: 8, status: 11, to: 28, subject: 40, msgId: 18 };
24182
24216
  const header = pc30.bold("Time".padEnd(COL.time)) + " " + pc30.bold("Status".padEnd(COL.status)) + " " + pc30.bold("To".padEnd(COL.to)) + " " + pc30.bold("Subject".padEnd(COL.subject)) + " " + pc30.bold("Message ID");
24183
- const rows = data.logs.map((log59) => {
24184
- const time = relativeTime(log59.createdAt).padEnd(COL.time);
24185
- const status2 = padVisible(colorStatus(log59.status), COL.status);
24186
- const to = padVisible(truncate(log59.recipient, COL.to), COL.to);
24187
- const subject = padVisible(truncate(log59.subject, COL.subject), COL.subject);
24188
- const msgId = truncate(log59.messageId, COL.msgId);
24217
+ const rows = data.logs.map((log60) => {
24218
+ const time = relativeTime(log60.createdAt).padEnd(COL.time);
24219
+ const status2 = padVisible(colorStatus(log60.status), COL.status);
24220
+ const to = padVisible(truncate(log60.recipient, COL.to), COL.to);
24221
+ const subject = padVisible(truncate(log60.subject, COL.subject), COL.subject);
24222
+ const msgId = truncate(log60.messageId, COL.msgId);
24189
24223
  return `${time} ${status2} ${to} ${subject} ${msgId}`;
24190
24224
  });
24191
24225
  clack28.note(
@@ -24241,32 +24275,32 @@ async function emailLogsGet(options) {
24241
24275
  }
24242
24276
  return;
24243
24277
  }
24244
- const log59 = await resp.json();
24278
+ const log60 = await resp.json();
24245
24279
  if (isJsonMode()) {
24246
- jsonSuccess("email.logs.get", log59);
24280
+ jsonSuccess("email.logs.get", log60);
24247
24281
  return;
24248
24282
  }
24249
24283
  const kv = (label, value) => `${pc30.dim(label.padEnd(16))} ${value ?? pc30.dim("\u2014")}`;
24250
- const sentAt = log59.sentAt ? new Date(log59.sentAt).toLocaleString() : null;
24251
- const deliveredAt = log59.deliveredAt ? new Date(log59.deliveredAt).toLocaleString() : null;
24252
- const bouncedAt = log59.bouncedAt ? new Date(log59.bouncedAt).toLocaleString() : null;
24253
- const createdAt = new Date(log59.createdAt).toLocaleString();
24284
+ const sentAt = log60.sentAt ? new Date(log60.sentAt).toLocaleString() : null;
24285
+ const deliveredAt = log60.deliveredAt ? new Date(log60.deliveredAt).toLocaleString() : null;
24286
+ const bouncedAt = log60.bouncedAt ? new Date(log60.bouncedAt).toLocaleString() : null;
24287
+ const createdAt = new Date(log60.createdAt).toLocaleString();
24254
24288
  const lines = [
24255
- kv("Message ID:", log59.messageId),
24256
- kv("Status:", log59.status ? colorStatus(log59.status) : null),
24257
- kv("To:", log59.recipient),
24258
- kv("From:", log59.from),
24259
- kv("Subject:", log59.subject),
24260
- kv("Source:", log59.sourceType),
24289
+ kv("Message ID:", log60.messageId),
24290
+ kv("Status:", log60.status ? colorStatus(log60.status) : null),
24291
+ kv("To:", log60.recipient),
24292
+ kv("From:", log60.from),
24293
+ kv("Subject:", log60.subject),
24294
+ kv("Source:", log60.sourceType),
24261
24295
  kv("Sent:", sentAt),
24262
24296
  kv("Delivered:", deliveredAt),
24263
24297
  kv("Bounced:", bouncedAt),
24264
- ...log59.bouncedSubType ? [kv("Bounce type:", log59.bouncedSubType)] : [],
24298
+ ...log60.bouncedSubType ? [kv("Bounce type:", log60.bouncedSubType)] : [],
24265
24299
  kv("Created:", createdAt)
24266
24300
  ];
24267
24301
  clack28.note(
24268
24302
  lines.join("\n"),
24269
- `Log Detail \u2014 ${log59.messageId ?? "(no message id)"}`
24303
+ `Log Detail \u2014 ${log60.messageId ?? "(no message id)"}`
24270
24304
  );
24271
24305
  }
24272
24306
 
@@ -32466,9 +32500,7 @@ async function updatePlatformRole(metadata, progress, externalId) {
32466
32500
  );
32467
32501
  }
32468
32502
  }
32469
- async function resolveOrganization() {
32470
- const config2 = await readAuthConfig();
32471
- const orgs = config2?.auth?.organizations;
32503
+ async function resolveOrganization(orgs) {
32472
32504
  if (!orgs || orgs.length === 0) {
32473
32505
  return null;
32474
32506
  }
@@ -32512,7 +32544,7 @@ async function registerConnection(params) {
32512
32544
  }
32513
32545
  return data;
32514
32546
  }
32515
- async function authenticatedConnect(token, options) {
32547
+ async function authenticatedConnect(options, saasToken) {
32516
32548
  const startTime = Date.now();
32517
32549
  const selfhosted = options.selfhosted === true;
32518
32550
  if (!isJsonMode()) {
@@ -32547,11 +32579,50 @@ Run ${pc44.cyan("wraps selfhost deploy")} to finish deploying the self-hosted co
32547
32579
  const apiBaseUrl = selfhosted && selfhostService ? selfhostService.apiUrl : getApiBaseUrl();
32548
32580
  const dashboardUrl = selfhosted && selfhostService ? selfhostService.config.appUrl : getAppBaseUrl();
32549
32581
  const hasEmail = !!metadata.services.email?.config;
32550
- const org = await resolveOrganization();
32582
+ let token;
32583
+ let organizations;
32584
+ if (selfhosted) {
32585
+ const instanceToken = await resolveSelfhostToken(dashboardUrl);
32586
+ if (!instanceToken) {
32587
+ progress.stop();
32588
+ if (isJsonMode()) {
32589
+ jsonError("platform.connect", {
32590
+ code: "NOT_AUTHENTICATED",
32591
+ message: "Not signed in to the self-hosted instance.",
32592
+ suggestion: "Run `wraps selfhost login` first."
32593
+ });
32594
+ } else {
32595
+ log38.error("You need to sign in to your self-hosted instance first.");
32596
+ console.log(`
32597
+ Run ${pc44.cyan("wraps selfhost login")} first.
32598
+ `);
32599
+ }
32600
+ process.exit(1);
32601
+ }
32602
+ token = instanceToken;
32603
+ organizations = (await readSelfhostAuth(dashboardUrl))?.organizations;
32604
+ } else {
32605
+ if (!saasToken) {
32606
+ progress.stop();
32607
+ if (isJsonMode()) {
32608
+ jsonError("platform.connect", {
32609
+ code: "NOT_AUTHENTICATED",
32610
+ message: "Not signed in.",
32611
+ suggestion: "Run `wraps auth login` first."
32612
+ });
32613
+ } else {
32614
+ log38.error("Not signed in. Run `wraps auth login` first.");
32615
+ }
32616
+ process.exit(1);
32617
+ }
32618
+ token = saasToken;
32619
+ organizations = (await readAuthConfig())?.auth?.organizations;
32620
+ }
32621
+ const org = await resolveOrganization(organizations);
32551
32622
  if (!org) {
32552
32623
  progress.stop();
32553
32624
  log38.error(
32554
- `No organizations found. Sign in at ${dashboardUrl} to create one.`
32625
+ selfhosted ? `No organizations found. Sign in at ${dashboardUrl} and run ${pc44.cyan("wraps selfhost login")} again.` : `No organizations found. Sign in at ${dashboardUrl} to create one.`
32555
32626
  );
32556
32627
  process.exit(1);
32557
32628
  }
@@ -32701,27 +32772,15 @@ You can try the manual flow: ${pc44.cyan("wraps auth logout")} then ${pc44.cyan(
32701
32772
  }
32702
32773
  }
32703
32774
  async function connect3(options) {
32775
+ if (options.selfhosted) {
32776
+ await authenticatedConnect(options, null);
32777
+ return;
32778
+ }
32704
32779
  const token = await resolveTokenAsync();
32705
32780
  if (token) {
32706
- await authenticatedConnect(token, options);
32781
+ await authenticatedConnect(options, token);
32707
32782
  return;
32708
32783
  }
32709
- if (options.selfhosted) {
32710
- if (isJsonMode()) {
32711
- jsonError("platform.connect", {
32712
- code: "NOT_AUTHENTICATED",
32713
- message: "Not signed in to the self-hosted instance.",
32714
- suggestion: "Run `wraps selfhost login` first."
32715
- });
32716
- } else {
32717
- intro36(pc44.bold("Connect to Self-Hosted Wraps"));
32718
- log38.error("You need to sign in to your self-hosted instance first.");
32719
- console.log(`
32720
- Run ${pc44.cyan("wraps selfhost login")} first.
32721
- `);
32722
- }
32723
- process.exit(1);
32724
- }
32725
32784
  const startTime = Date.now();
32726
32785
  intro36(pc44.bold("Connect to Wraps Platform"));
32727
32786
  const progress = new DeploymentProgress();
@@ -34359,13 +34418,11 @@ Run ${pc49.cyan("wraps selfhost deploy")} to deploy the self-hosted control plan
34359
34418
  baseURL,
34360
34419
  tokenData.access_token
34361
34420
  );
34362
- await saveAuthConfig({
34363
- auth: {
34364
- token: tokenData.access_token,
34365
- tokenType: "session",
34366
- expiresAt: tokenData.expires_in ? new Date(Date.now() + tokenData.expires_in * 1e3).toISOString() : void 0,
34367
- organizations: organizations.length > 0 ? organizations : void 0
34368
- }
34421
+ await saveSelfhostAuth(baseURL, {
34422
+ token: tokenData.access_token,
34423
+ tokenType: "session",
34424
+ expiresAt: tokenData.expires_in ? new Date(Date.now() + tokenData.expires_in * 1e3).toISOString() : void 0,
34425
+ organizations: organizations.length > 0 ? organizations : void 0
34369
34426
  });
34370
34427
  trackCommand("selfhost:login", {
34371
34428
  success: true,
@@ -34424,11 +34481,68 @@ Run ${pc49.cyan("wraps selfhost deploy")} to deploy the self-hosted control plan
34424
34481
  throw new Error("Device code expired.");
34425
34482
  }
34426
34483
 
34427
- // src/commands/selfhost/status.ts
34484
+ // src/commands/selfhost/logout.ts
34428
34485
  init_esm_shims();
34429
34486
  init_events();
34487
+ init_aws();
34488
+ init_config();
34489
+ init_json_output();
34490
+ init_metadata();
34491
+ init_region_resolver();
34430
34492
  import * as clack47 from "@clack/prompts";
34431
34493
  import pc50 from "picocolors";
34494
+ async function selfhostLogout(options) {
34495
+ if (!isJsonMode()) {
34496
+ clack47.intro(pc50.bold("Wraps Self-Hosted \u203A Sign Out"));
34497
+ }
34498
+ const identity = await validateAWSCredentials();
34499
+ const region = await resolveRegionForCommand({
34500
+ accountId: identity.accountId,
34501
+ optionRegion: options.region,
34502
+ service: "selfhost",
34503
+ label: "self-hosted deployment"
34504
+ });
34505
+ const metadata = await loadConnectionMetadata(identity.accountId, region);
34506
+ if (!metadata?.services?.selfhost) {
34507
+ clack47.log.error("No self-hosted deployment found.");
34508
+ console.log(
34509
+ `
34510
+ Run ${pc50.cyan("wraps selfhost deploy")} to deploy the self-hosted control plane first.
34511
+ `
34512
+ );
34513
+ process.exit(1);
34514
+ return;
34515
+ }
34516
+ const { appUrl: baseURL } = metadata.services.selfhost.config;
34517
+ if (!await readSelfhostAuth(baseURL)) {
34518
+ trackCommand("selfhost:logout", {
34519
+ success: true,
34520
+ already_logged_out: true
34521
+ });
34522
+ if (isJsonMode()) {
34523
+ jsonSuccess("selfhost.logout", {
34524
+ loggedOut: false,
34525
+ alreadyLoggedOut: true
34526
+ });
34527
+ return;
34528
+ }
34529
+ clack47.log.info(`Not signed in to ${pc50.cyan(baseURL)}.`);
34530
+ return;
34531
+ }
34532
+ await clearSelfhostAuth(baseURL);
34533
+ trackCommand("selfhost:logout", { success: true });
34534
+ if (isJsonMode()) {
34535
+ jsonSuccess("selfhost.logout", { loggedOut: true });
34536
+ return;
34537
+ }
34538
+ clack47.log.success(`Signed out of ${pc50.cyan(baseURL)}.`);
34539
+ }
34540
+
34541
+ // src/commands/selfhost/status.ts
34542
+ init_esm_shims();
34543
+ init_events();
34544
+ import * as clack48 from "@clack/prompts";
34545
+ import pc51 from "picocolors";
34432
34546
  init_aws();
34433
34547
  init_json_output();
34434
34548
  init_metadata();
@@ -34436,26 +34550,26 @@ init_output();
34436
34550
  init_region_resolver();
34437
34551
  function displaySelfhostStatus(options) {
34438
34552
  const lines = [];
34439
- lines.push(pc50.bold(pc50.green("Self-Hosted Control Plane Active")));
34553
+ lines.push(pc51.bold(pc51.green("Self-Hosted Control Plane Active")));
34440
34554
  lines.push("");
34441
- lines.push(pc50.bold("API"));
34442
- lines.push(` URL: ${pc50.cyan(options.apiUrl)}`);
34443
- lines.push(` Region: ${pc50.cyan(options.region)}`);
34444
- lines.push(` Deployed: ${pc50.dim(options.deployedAt)}`);
34555
+ lines.push(pc51.bold("API"));
34556
+ lines.push(` URL: ${pc51.cyan(options.apiUrl)}`);
34557
+ lines.push(` Region: ${pc51.cyan(options.region)}`);
34558
+ lines.push(` Deployed: ${pc51.dim(options.deployedAt)}`);
34445
34559
  lines.push("");
34446
- lines.push(pc50.bold("Configuration"));
34447
- lines.push(` App URL: ${pc50.cyan(options.appUrl)}`);
34448
- lines.push(` License Key: ${pc50.dim(`${options.licenseKeyPrefix}...`)}`);
34560
+ lines.push(pc51.bold("Configuration"));
34561
+ lines.push(` App URL: ${pc51.cyan(options.appUrl)}`);
34562
+ lines.push(` License Key: ${pc51.dim(`${options.licenseKeyPrefix}...`)}`);
34449
34563
  if (options.neonProjectId) {
34450
- lines.push(` Neon Project: ${pc50.dim(options.neonProjectId)}`);
34564
+ lines.push(` Neon Project: ${pc51.dim(options.neonProjectId)}`);
34451
34565
  }
34452
- clack47.note(lines.join("\n"), "Self-Hosted Status");
34566
+ clack48.note(lines.join("\n"), "Self-Hosted Status");
34453
34567
  }
34454
34568
  async function selfhostStatus(options) {
34455
34569
  const startTime = Date.now();
34456
34570
  const progress = new DeploymentProgress();
34457
34571
  if (!isJsonMode()) {
34458
- clack47.intro(pc50.bold("Wraps Self-Hosted Status"));
34572
+ clack48.intro(pc51.bold("Wraps Self-Hosted Status"));
34459
34573
  }
34460
34574
  const identity = await progress.execute(
34461
34575
  "Loading self-hosted status",
@@ -34470,10 +34584,10 @@ async function selfhostStatus(options) {
34470
34584
  const metadata = await loadConnectionMetadata(identity.accountId, region);
34471
34585
  if (!metadata?.services?.selfhost) {
34472
34586
  progress.stop();
34473
- clack47.log.error("No self-hosted deployment found");
34587
+ clack48.log.error("No self-hosted deployment found");
34474
34588
  console.log(
34475
34589
  `
34476
- Run ${pc50.cyan("wraps selfhost deploy")} to deploy the self-hosted control plane.
34590
+ Run ${pc51.cyan("wraps selfhost deploy")} to deploy the self-hosted control plane.
34477
34591
  `
34478
34592
  );
34479
34593
  process.exit(1);
@@ -34496,15 +34610,15 @@ Run ${pc50.cyan("wraps selfhost deploy")} to deploy the self-hosted control plan
34496
34610
  }
34497
34611
  displaySelfhostStatus(statusData);
34498
34612
  console.log("");
34499
- clack47.log.info(pc50.bold("Commands:"));
34613
+ clack48.log.info(pc51.bold("Commands:"));
34500
34614
  console.log(
34501
- ` ${pc50.cyan("wraps selfhost upgrade")} - Rebuild and redeploy the API Lambda`
34615
+ ` ${pc51.cyan("wraps selfhost upgrade")} - Rebuild and redeploy the API Lambda`
34502
34616
  );
34503
34617
  trackCommand("selfhost:status", {
34504
34618
  success: true,
34505
34619
  duration_ms: Date.now() - startTime
34506
34620
  });
34507
- clack47.outro(pc50.dim("Self-hosted deployment is active"));
34621
+ clack48.outro(pc51.dim("Self-hosted deployment is active"));
34508
34622
  }
34509
34623
 
34510
34624
  // src/commands/selfhost/upgrade.ts
@@ -34512,9 +34626,9 @@ init_esm_shims();
34512
34626
  import { existsSync as existsSync19 } from "fs";
34513
34627
  import { dirname as dirname6, join as join21 } from "path";
34514
34628
  import { fileURLToPath as fileURLToPath6 } from "url";
34515
- import * as clack48 from "@clack/prompts";
34629
+ import * as clack49 from "@clack/prompts";
34516
34630
  import * as pulumi27 from "@pulumi/pulumi";
34517
- import pc51 from "picocolors";
34631
+ import pc52 from "picocolors";
34518
34632
  init_events();
34519
34633
  init_aws();
34520
34634
  init_errors();
@@ -34530,7 +34644,7 @@ var bundledLambdaZip2 = join21(cliDir2, "api-lambda.zip");
34530
34644
  async function selfhostUpgrade(options) {
34531
34645
  const startTime = Date.now();
34532
34646
  if (!isJsonMode()) {
34533
- clack48.intro(pc51.bold("Wraps Self-Hosted Control Plane Upgrade"));
34647
+ clack49.intro(pc52.bold("Wraps Self-Hosted Control Plane Upgrade"));
34534
34648
  }
34535
34649
  const progress = new DeploymentProgress();
34536
34650
  const wasAutoInstalled = await progress.execute(
@@ -34545,7 +34659,7 @@ async function selfhostUpgrade(options) {
34545
34659
  async () => validateAWSCredentialsWithDetails()
34546
34660
  );
34547
34661
  const identity = credentialResult.identity;
34548
- progress.info(`Connected to AWS account: ${pc51.cyan(identity.accountId)}`);
34662
+ progress.info(`Connected to AWS account: ${pc52.cyan(identity.accountId)}`);
34549
34663
  const region = await resolveRegionForCommand({
34550
34664
  accountId: identity.accountId,
34551
34665
  optionRegion: options.region,
@@ -34554,20 +34668,20 @@ async function selfhostUpgrade(options) {
34554
34668
  });
34555
34669
  const metadata = await loadConnectionMetadata(identity.accountId, region);
34556
34670
  if (!metadata?.services?.selfhost) {
34557
- clack48.log.error("No self-hosted deployment found.");
34558
- clack48.log.info(`Run ${pc51.cyan("wraps selfhost deploy")} first.`);
34671
+ clack49.log.error("No self-hosted deployment found.");
34672
+ clack49.log.info(`Run ${pc52.cyan("wraps selfhost deploy")} first.`);
34559
34673
  process.exit(1);
34560
34674
  }
34561
34675
  const selfhostService = metadata.services.selfhost;
34562
34676
  progress.info(`Found deployment from: ${selfhostService.deployedAt}`);
34563
- progress.info(`API URL: ${pc51.cyan(selfhostService.apiUrl)}`);
34677
+ progress.info(`API URL: ${pc52.cyan(selfhostService.apiUrl)}`);
34564
34678
  if (!(options.yes || options.preview)) {
34565
- const confirmed = await clack48.confirm({
34566
- message: `Upgrade self-hosted deployment in ${pc51.cyan(identity.accountId)} / ${pc51.cyan(region)}?`,
34679
+ const confirmed = await clack49.confirm({
34680
+ message: `Upgrade self-hosted deployment in ${pc52.cyan(identity.accountId)} / ${pc52.cyan(region)}?`,
34567
34681
  initialValue: true
34568
34682
  });
34569
- if (clack48.isCancel(confirmed) || !confirmed) {
34570
- clack48.cancel("Upgrade cancelled.");
34683
+ if (clack49.isCancel(confirmed) || !confirmed) {
34684
+ clack49.cancel("Upgrade cancelled.");
34571
34685
  process.exit(0);
34572
34686
  }
34573
34687
  }
@@ -34641,8 +34755,8 @@ async function selfhostUpgrade(options) {
34641
34755
  resourceChanges: previewResult.resourceChanges,
34642
34756
  commandName: "wraps selfhost upgrade"
34643
34757
  });
34644
- clack48.outro(
34645
- pc51.green("Preview complete. Run without --preview to upgrade.")
34758
+ clack49.outro(
34759
+ pc52.green("Preview complete. Run without --preview to upgrade.")
34646
34760
  );
34647
34761
  return;
34648
34762
  } catch (error) {
@@ -34713,28 +34827,28 @@ async function selfhostUpgrade(options) {
34713
34827
  }
34714
34828
  progress.info("Deployment metadata updated");
34715
34829
  console.log("\n");
34716
- clack48.log.success(pc51.green(pc51.bold("Self-hosted Wraps API upgraded!")));
34830
+ clack49.log.success(pc52.green(pc52.bold("Self-hosted Wraps API upgraded!")));
34717
34831
  console.log("\n");
34718
- clack48.note(
34832
+ clack49.note(
34719
34833
  [
34720
- `${pc51.bold("API URL:")} ${pc51.cyan(outputs.apiUrl || selfhostService.apiUrl)}`,
34721
- `${pc51.bold("Region:")} ${pc51.cyan(region)}`,
34722
- `${pc51.bold("Lambda ARN:")} ${pc51.dim(outputs.lambdaArn)}`
34834
+ `${pc52.bold("API URL:")} ${pc52.cyan(outputs.apiUrl || selfhostService.apiUrl)}`,
34835
+ `${pc52.bold("Region:")} ${pc52.cyan(region)}`,
34836
+ `${pc52.bold("Lambda ARN:")} ${pc52.dim(outputs.lambdaArn)}`
34723
34837
  ].join("\n"),
34724
34838
  "Self-Hosted Deployment"
34725
34839
  );
34726
- clack48.outro(
34727
- pc51.green(`Upgraded in ${((Date.now() - startTime) / 1e3).toFixed(1)}s`)
34840
+ clack49.outro(
34841
+ pc52.green(`Upgraded in ${((Date.now() - startTime) / 1e3).toFixed(1)}s`)
34728
34842
  );
34729
34843
  }
34730
34844
 
34731
34845
  // src/commands/shared/dashboard.ts
34732
34846
  init_esm_shims();
34733
- import * as clack49 from "@clack/prompts";
34847
+ import * as clack50 from "@clack/prompts";
34734
34848
  import * as pulumi28 from "@pulumi/pulumi";
34735
34849
  import getPort from "get-port";
34736
34850
  import open3 from "open";
34737
- import pc52 from "picocolors";
34851
+ import pc53 from "picocolors";
34738
34852
 
34739
34853
  // src/console/server.ts
34740
34854
  init_esm_shims();
@@ -35934,13 +36048,13 @@ function createMetricsRouter(config2) {
35934
36048
  const router = createRouter5();
35935
36049
  router.get("/stream", async (req, res) => {
35936
36050
  const connectionId = randomUUID().slice(0, 8);
35937
- const log59 = (msg, data) => {
36051
+ const log60 = (msg, data) => {
35938
36052
  console.log(JSON.stringify({ connectionId, msg, ...data }));
35939
36053
  };
35940
36054
  res.setHeader("Content-Type", "text/event-stream");
35941
36055
  res.setHeader("Cache-Control", "no-cache");
35942
36056
  res.setHeader("Connection", "keep-alive");
35943
- log59("SSE connected");
36057
+ log60("SSE connected");
35944
36058
  res.write('data: {"type":"connected"}\n\n');
35945
36059
  const { startTime, endTime } = req.query;
35946
36060
  const getTimeRange = () => ({
@@ -35950,7 +36064,7 @@ function createMetricsRouter(config2) {
35950
36064
  const sendMetrics = async () => {
35951
36065
  try {
35952
36066
  const timeRange = getTimeRange();
35953
- log59("Fetching metrics", {
36067
+ log60("Fetching metrics", {
35954
36068
  start: timeRange.start.toISOString(),
35955
36069
  end: timeRange.end.toISOString()
35956
36070
  });
@@ -35963,7 +36077,7 @@ function createMetricsRouter(config2) {
35963
36077
  ),
35964
36078
  fetchSendQuota(config2.roleArn, config2.region)
35965
36079
  ]);
35966
- log59("Metrics fetched successfully");
36080
+ log60("Metrics fetched successfully");
35967
36081
  const data = {
35968
36082
  type: "metrics",
35969
36083
  timestamp: Date.now(),
@@ -35993,7 +36107,7 @@ function createMetricsRouter(config2) {
35993
36107
  const interval = setInterval(sendMetrics, 6e4);
35994
36108
  req.on("close", () => {
35995
36109
  clearInterval(interval);
35996
- log59("SSE disconnected");
36110
+ log60("SSE disconnected");
35997
36111
  });
35998
36112
  });
35999
36113
  router.get("/snapshot", async (_req, res) => {
@@ -37388,7 +37502,7 @@ init_output();
37388
37502
  init_pulumi();
37389
37503
  async function dashboard(options) {
37390
37504
  await ensurePulumiInstalled();
37391
- clack49.intro(pc52.bold("Wraps Dashboard"));
37505
+ clack50.intro(pc53.bold("Wraps Dashboard"));
37392
37506
  const progress = new DeploymentProgress();
37393
37507
  const identity = await progress.execute(
37394
37508
  "Validating AWS credentials",
@@ -37429,9 +37543,9 @@ async function dashboard(options) {
37429
37543
  }
37430
37544
  } catch (_error) {
37431
37545
  progress.stop();
37432
- clack49.log.error("No Wraps infrastructure found");
37546
+ clack50.log.error("No Wraps infrastructure found");
37433
37547
  console.log(
37434
- `\\nRun ${pc52.cyan("wraps email init")}, ${pc52.cyan("wraps sms init")}, or ${pc52.cyan("wraps storage init")} to deploy infrastructure first.\\n`
37548
+ `\\nRun ${pc53.cyan("wraps email init")}, ${pc53.cyan("wraps sms init")}, or ${pc53.cyan("wraps storage init")} to deploy infrastructure first.\\n`
37435
37549
  );
37436
37550
  process.exit(1);
37437
37551
  }
@@ -37473,9 +37587,9 @@ async function dashboard(options) {
37473
37587
  }
37474
37588
  const port = options.port || await getPort({ port: [5555, 5556, 5557, 5558, 5559] });
37475
37589
  progress.stop();
37476
- clack49.log.success("Starting dashboard server...");
37590
+ clack50.log.success("Starting dashboard server...");
37477
37591
  console.log(
37478
- `${pc52.dim("Using current AWS credentials (no role assumption)")}\\n`
37592
+ `${pc53.dim("Using current AWS credentials (no role assumption)")}\\n`
37479
37593
  );
37480
37594
  const { url } = await startConsoleServer({
37481
37595
  port,
@@ -37508,8 +37622,8 @@ async function dashboard(options) {
37508
37622
  cdnCustomDomain,
37509
37623
  cdnCertificateArn
37510
37624
  });
37511
- console.log(`\\n${pc52.bold("Dashboard:")} ${pc52.cyan(url)}`);
37512
- console.log(`${pc52.dim("Press Ctrl+C to stop")}\\n`);
37625
+ console.log(`\\n${pc53.bold("Dashboard:")} ${pc53.cyan(url)}`);
37626
+ console.log(`${pc53.dim("Press Ctrl+C to stop")}\\n`);
37513
37627
  getTelemetryClient().showFooterOnce();
37514
37628
  if (!options.noOpen) {
37515
37629
  await open3(url);
@@ -37530,8 +37644,8 @@ init_aws();
37530
37644
  init_errors();
37531
37645
  init_json_output();
37532
37646
  init_metadata();
37533
- import * as clack50 from "@clack/prompts";
37534
- import pc53 from "picocolors";
37647
+ import * as clack51 from "@clack/prompts";
37648
+ import pc54 from "picocolors";
37535
37649
  async function destroy(options) {
37536
37650
  trackCommand("destroy", { success: true });
37537
37651
  if (isJsonMode() && !options.force) {
@@ -37542,9 +37656,9 @@ async function destroy(options) {
37542
37656
  );
37543
37657
  }
37544
37658
  if (!isJsonMode()) {
37545
- clack50.intro(pc53.bold("Wraps Infrastructure Teardown"));
37659
+ clack51.intro(pc54.bold("Wraps Infrastructure Teardown"));
37546
37660
  }
37547
- const spinner11 = clack50.spinner();
37661
+ const spinner11 = clack51.spinner();
37548
37662
  spinner11.start("Validating AWS credentials");
37549
37663
  let identity;
37550
37664
  try {
@@ -37561,17 +37675,17 @@ async function destroy(options) {
37561
37675
  deployedServices.push("email");
37562
37676
  }
37563
37677
  if (deployedServices.length === 0) {
37564
- clack50.log.warn("No Wraps services found in this region");
37678
+ clack51.log.warn("No Wraps services found in this region");
37565
37679
  console.log(
37566
37680
  `
37567
- Run ${pc53.cyan("wraps email init")} to deploy infrastructure.
37681
+ Run ${pc54.cyan("wraps email init")} to deploy infrastructure.
37568
37682
  `
37569
37683
  );
37570
37684
  process.exit(0);
37571
37685
  }
37572
37686
  if (deployedServices.length === 1) {
37573
37687
  const service = deployedServices[0];
37574
- clack50.log.info(`Found ${pc53.cyan(service)} service deployed`);
37688
+ clack51.log.info(`Found ${pc54.cyan(service)} service deployed`);
37575
37689
  if (service === "email") {
37576
37690
  await emailDestroy(options);
37577
37691
  return;
@@ -37586,7 +37700,7 @@ Run ${pc53.cyan("wraps email init")} to deploy infrastructure.
37586
37700
  jsonSuccess("destroy", { destroyed: true });
37587
37701
  return;
37588
37702
  }
37589
- const serviceToDestroy = await clack50.select({
37703
+ const serviceToDestroy = await clack51.select({
37590
37704
  message: "Which service would you like to destroy?",
37591
37705
  options: [
37592
37706
  ...deployedServices.map((s) => ({
@@ -37601,15 +37715,15 @@ Run ${pc53.cyan("wraps email init")} to deploy infrastructure.
37601
37715
  }
37602
37716
  ]
37603
37717
  });
37604
- if (clack50.isCancel(serviceToDestroy)) {
37605
- clack50.cancel("Operation cancelled.");
37718
+ if (clack51.isCancel(serviceToDestroy)) {
37719
+ clack51.cancel("Operation cancelled.");
37606
37720
  process.exit(0);
37607
37721
  }
37608
37722
  if ((serviceToDestroy === "email" || serviceToDestroy === "all") && deployedServices.includes("email")) {
37609
37723
  await emailDestroy(options);
37610
37724
  }
37611
37725
  if (serviceToDestroy === "all") {
37612
- clack50.outro(pc53.green("All Wraps infrastructure has been removed"));
37726
+ clack51.outro(pc54.green("All Wraps infrastructure has been removed"));
37613
37727
  }
37614
37728
  }
37615
37729
 
@@ -37621,26 +37735,26 @@ init_fs();
37621
37735
  init_json_output();
37622
37736
  init_output();
37623
37737
  init_pulumi();
37624
- import * as clack51 from "@clack/prompts";
37738
+ import * as clack52 from "@clack/prompts";
37625
37739
  import * as pulumi29 from "@pulumi/pulumi";
37626
- import pc54 from "picocolors";
37740
+ import pc55 from "picocolors";
37627
37741
  async function status(options) {
37628
37742
  await ensurePulumiInstalled();
37629
37743
  const startTime = Date.now();
37630
37744
  const progress = new DeploymentProgress();
37631
37745
  if (!isJsonMode()) {
37632
- clack51.intro(pc54.bold("Wraps Infrastructure Status"));
37746
+ clack52.intro(pc55.bold("Wraps Infrastructure Status"));
37633
37747
  }
37634
37748
  const identity = await progress.execute(
37635
37749
  "Loading infrastructure status",
37636
37750
  async () => validateAWSCredentials()
37637
37751
  );
37638
37752
  if (!isJsonMode()) {
37639
- progress.info(`AWS Account: ${pc54.cyan(identity.accountId)}`);
37753
+ progress.info(`AWS Account: ${pc55.cyan(identity.accountId)}`);
37640
37754
  }
37641
37755
  const region = options.region || await getAWSRegion();
37642
37756
  if (!isJsonMode()) {
37643
- progress.info(`Region: ${pc54.cyan(region)}`);
37757
+ progress.info(`Region: ${pc55.cyan(region)}`);
37644
37758
  }
37645
37759
  const services = [];
37646
37760
  try {
@@ -37692,35 +37806,35 @@ async function status(options) {
37692
37806
  return;
37693
37807
  }
37694
37808
  console.log();
37695
- clack51.note(
37809
+ clack52.note(
37696
37810
  services.map((s) => {
37697
37811
  if (s.status === "deployed") {
37698
- const details = s.details ? pc54.dim(` (${s.details})`) : "";
37699
- return ` ${pc54.green("\u2713")} ${s.name}${details}`;
37812
+ const details = s.details ? pc55.dim(` (${s.details})`) : "";
37813
+ return ` ${pc55.green("\u2713")} ${s.name}${details}`;
37700
37814
  }
37701
- return ` ${pc54.dim("\u25CB")} ${s.name} ${pc54.dim("(not deployed)")}`;
37815
+ return ` ${pc55.dim("\u25CB")} ${s.name} ${pc55.dim("(not deployed)")}`;
37702
37816
  }).join("\n"),
37703
37817
  "Services"
37704
37818
  );
37705
37819
  const hasDeployedServices = services.some((s) => s.status === "deployed");
37706
37820
  if (hasDeployedServices) {
37707
37821
  console.log(`
37708
- ${pc54.bold("Details:")}`);
37822
+ ${pc55.bold("Details:")}`);
37709
37823
  if (services.find((s) => s.name === "Email")?.status === "deployed") {
37710
- console.log(` ${pc54.dim("Email:")} ${pc54.cyan("wraps email status")}`);
37824
+ console.log(` ${pc55.dim("Email:")} ${pc55.cyan("wraps email status")}`);
37711
37825
  }
37712
37826
  if (services.find((s) => s.name === "SMS")?.status === "deployed") {
37713
- console.log(` ${pc54.dim("SMS:")} ${pc54.cyan("wraps sms status")}`);
37827
+ console.log(` ${pc55.dim("SMS:")} ${pc55.cyan("wraps sms status")}`);
37714
37828
  }
37715
37829
  } else {
37716
37830
  console.log(`
37717
- ${pc54.bold("Get started:")}`);
37718
- console.log(` ${pc54.dim("Deploy email:")} ${pc54.cyan("wraps email init")}`);
37719
- console.log(` ${pc54.dim("Deploy SMS:")} ${pc54.cyan("wraps sms init")}`);
37831
+ ${pc55.bold("Get started:")}`);
37832
+ console.log(` ${pc55.dim("Deploy email:")} ${pc55.cyan("wraps email init")}`);
37833
+ console.log(` ${pc55.dim("Deploy SMS:")} ${pc55.cyan("wraps sms init")}`);
37720
37834
  }
37721
37835
  console.log(`
37722
- ${pc54.bold("Dashboard:")} ${pc54.blue("https://app.wraps.dev")}`);
37723
- console.log(`${pc54.bold("Docs:")} ${pc54.blue("https://wraps.dev/docs")}
37836
+ ${pc55.bold("Dashboard:")} ${pc55.blue("https://app.wraps.dev")}`);
37837
+ console.log(`${pc55.bold("Docs:")} ${pc55.blue("https://wraps.dev/docs")}
37724
37838
  `);
37725
37839
  trackCommand("status", {
37726
37840
  success: true,
@@ -37731,9 +37845,9 @@ ${pc54.bold("Dashboard:")} ${pc54.blue("https://app.wraps.dev")}`);
37731
37845
 
37732
37846
  // src/commands/sms/destroy.ts
37733
37847
  init_esm_shims();
37734
- import * as clack52 from "@clack/prompts";
37848
+ import * as clack53 from "@clack/prompts";
37735
37849
  import * as pulumi31 from "@pulumi/pulumi";
37736
- import pc55 from "picocolors";
37850
+ import pc56 from "picocolors";
37737
37851
 
37738
37852
  // src/infrastructure/sms-stack.ts
37739
37853
  init_esm_shims();
@@ -38424,18 +38538,18 @@ async function createSMSProtectConfigurationWithSDK(configurationSetName, region
38424
38538
  const existing = await client.send(
38425
38539
  new DescribeProtectConfigurationsCommand({})
38426
38540
  );
38427
- for (const pc68 of existing.ProtectConfigurations || []) {
38428
- if (!(pc68.ProtectConfigurationArn && pc68.ProtectConfigurationId)) {
38541
+ for (const pc69 of existing.ProtectConfigurations || []) {
38542
+ if (!(pc69.ProtectConfigurationArn && pc69.ProtectConfigurationId)) {
38429
38543
  continue;
38430
38544
  }
38431
38545
  const tagsResponse = await client.send(
38432
38546
  new ListTagsForResourceCommand({
38433
- ResourceArn: pc68.ProtectConfigurationArn
38547
+ ResourceArn: pc69.ProtectConfigurationArn
38434
38548
  })
38435
38549
  );
38436
38550
  const nameTag = tagsResponse.Tags?.find((t) => t.Key === "Name");
38437
38551
  if (nameTag?.Value === protectConfigName) {
38438
- existingProtectConfigId = pc68.ProtectConfigurationId;
38552
+ existingProtectConfigId = pc69.ProtectConfigurationId;
38439
38553
  break;
38440
38554
  }
38441
38555
  }
@@ -38531,13 +38645,13 @@ async function deleteSMSProtectConfigurationWithSDK(region) {
38531
38645
  new DescribeProtectConfigurationsCommand({})
38532
38646
  );
38533
38647
  if (existing.ProtectConfigurations) {
38534
- for (const pc68 of existing.ProtectConfigurations) {
38535
- if (!(pc68.ProtectConfigurationArn && pc68.ProtectConfigurationId)) {
38648
+ for (const pc69 of existing.ProtectConfigurations) {
38649
+ if (!(pc69.ProtectConfigurationArn && pc69.ProtectConfigurationId)) {
38536
38650
  continue;
38537
38651
  }
38538
38652
  const tagsResponse = await client.send(
38539
38653
  new ListTagsForResourceCommand({
38540
- ResourceArn: pc68.ProtectConfigurationArn
38654
+ ResourceArn: pc69.ProtectConfigurationArn
38541
38655
  })
38542
38656
  );
38543
38657
  const isWrapsManaged = tagsResponse.Tags?.some(
@@ -38546,7 +38660,7 @@ async function deleteSMSProtectConfigurationWithSDK(region) {
38546
38660
  if (isWrapsManaged) {
38547
38661
  await client.send(
38548
38662
  new DeleteProtectConfigurationCommand({
38549
- ProtectConfigurationId: pc68.ProtectConfigurationId
38663
+ ProtectConfigurationId: pc69.ProtectConfigurationId
38550
38664
  })
38551
38665
  );
38552
38666
  }
@@ -38581,8 +38695,8 @@ async function smsDestroy(options) {
38581
38695
  );
38582
38696
  }
38583
38697
  if (!isJsonMode()) {
38584
- clack52.intro(
38585
- pc55.bold(
38698
+ clack53.intro(
38699
+ pc56.bold(
38586
38700
  options.preview ? "SMS Infrastructure Destruction Preview" : "SMS Infrastructure Teardown"
38587
38701
  )
38588
38702
  );
@@ -38608,15 +38722,15 @@ async function smsDestroy(options) {
38608
38722
  `Available regions: ${smsConnections.map((c) => c.region).join(", ")}`
38609
38723
  );
38610
38724
  }
38611
- const selectedRegion = await clack52.select({
38725
+ const selectedRegion = await clack53.select({
38612
38726
  message: "Multiple SMS deployments found. Which region to destroy?",
38613
38727
  options: smsConnections.map((conn) => ({
38614
38728
  value: conn.region,
38615
38729
  label: conn.region
38616
38730
  }))
38617
38731
  });
38618
- if (clack52.isCancel(selectedRegion)) {
38619
- clack52.cancel("Operation cancelled");
38732
+ if (clack53.isCancel(selectedRegion)) {
38733
+ clack53.cancel("Operation cancelled");
38620
38734
  process.exit(0);
38621
38735
  }
38622
38736
  region = selectedRegion;
@@ -38627,18 +38741,18 @@ async function smsDestroy(options) {
38627
38741
  const storedStackName = smsService?.pulumiStackName;
38628
38742
  if (!smsService) {
38629
38743
  progress.stop();
38630
- clack52.log.warn("No SMS infrastructure found");
38744
+ clack53.log.warn("No SMS infrastructure found");
38631
38745
  process.exit(0);
38632
38746
  }
38633
38747
  if (!(options.force || options.preview)) {
38634
- const confirmed = await clack52.confirm({
38635
- message: pc55.red(
38748
+ const confirmed = await clack53.confirm({
38749
+ message: pc56.red(
38636
38750
  "Are you sure you want to destroy all SMS infrastructure?"
38637
38751
  ),
38638
38752
  initialValue: false
38639
38753
  });
38640
- if (clack52.isCancel(confirmed) || !confirmed) {
38641
- clack52.cancel("Destruction cancelled.");
38754
+ if (clack53.isCancel(confirmed) || !confirmed) {
38755
+ clack53.cancel("Destruction cancelled.");
38642
38756
  process.exit(0);
38643
38757
  }
38644
38758
  }
@@ -38670,8 +38784,8 @@ async function smsDestroy(options) {
38670
38784
  costEstimate: "Monthly cost after destruction: $0.00",
38671
38785
  commandName: "wraps sms destroy"
38672
38786
  });
38673
- clack52.outro(
38674
- pc55.green("Preview complete. Run without --preview to destroy.")
38787
+ clack53.outro(
38788
+ pc56.green("Preview complete. Run without --preview to destroy.")
38675
38789
  );
38676
38790
  trackServiceRemoved("sms", {
38677
38791
  preview: true,
@@ -38682,7 +38796,7 @@ async function smsDestroy(options) {
38682
38796
  progress.stop();
38683
38797
  const errorMessage = error instanceof Error ? error.message : String(error);
38684
38798
  if (errorMessage.includes("No SMS infrastructure found")) {
38685
- clack52.log.warn("No SMS infrastructure found to preview");
38799
+ clack53.log.warn("No SMS infrastructure found to preview");
38686
38800
  process.exit(0);
38687
38801
  }
38688
38802
  trackError("PREVIEW_FAILED", "sms destroy", { step: "preview" });
@@ -38731,7 +38845,7 @@ async function smsDestroy(options) {
38731
38845
  progress.stop();
38732
38846
  const errorMessage = error instanceof Error ? error.message : String(error);
38733
38847
  if (errorMessage.includes("No SMS infrastructure found")) {
38734
- clack52.log.warn("No SMS infrastructure found");
38848
+ clack53.log.warn("No SMS infrastructure found");
38735
38849
  if (metadata) {
38736
38850
  removeServiceFromConnection(metadata, "sms");
38737
38851
  await saveConnectionMetadata(metadata);
@@ -38744,7 +38858,7 @@ async function smsDestroy(options) {
38744
38858
  }
38745
38859
  trackError("DESTROY_FAILED", "sms destroy", { step: "destroy" });
38746
38860
  destroyFailed = true;
38747
- clack52.log.warn(
38861
+ clack53.log.warn(
38748
38862
  "Some resources may not have been fully removed. You can re-run this command or clean up manually in the AWS console."
38749
38863
  );
38750
38864
  }
@@ -38767,21 +38881,21 @@ async function smsDestroy(options) {
38767
38881
  return;
38768
38882
  }
38769
38883
  if (destroyFailed) {
38770
- clack52.outro(
38771
- pc55.yellow("SMS infrastructure partially removed. Metadata cleaned up.")
38884
+ clack53.outro(
38885
+ pc56.yellow("SMS infrastructure partially removed. Metadata cleaned up.")
38772
38886
  );
38773
38887
  } else {
38774
- clack52.outro(pc55.green("SMS infrastructure has been removed"));
38888
+ clack53.outro(pc56.green("SMS infrastructure has been removed"));
38775
38889
  console.log(`
38776
- ${pc55.bold("Cleaned up:")}`);
38777
- console.log(` ${pc55.green("\u2713")} Phone number released`);
38778
- console.log(` ${pc55.green("\u2713")} Configuration set deleted`);
38779
- console.log(` ${pc55.green("\u2713")} Event processing infrastructure removed`);
38780
- console.log(` ${pc55.green("\u2713")} IAM role deleted`);
38890
+ ${pc56.bold("Cleaned up:")}`);
38891
+ console.log(` ${pc56.green("\u2713")} Phone number released`);
38892
+ console.log(` ${pc56.green("\u2713")} Configuration set deleted`);
38893
+ console.log(` ${pc56.green("\u2713")} Event processing infrastructure removed`);
38894
+ console.log(` ${pc56.green("\u2713")} IAM role deleted`);
38781
38895
  }
38782
38896
  console.log(
38783
38897
  `
38784
- Run ${pc55.cyan("wraps sms init")} to deploy infrastructure again.
38898
+ Run ${pc56.cyan("wraps sms init")} to deploy infrastructure again.
38785
38899
  `
38786
38900
  );
38787
38901
  trackServiceRemoved("sms", {
@@ -38793,9 +38907,9 @@ Run ${pc55.cyan("wraps sms init")} to deploy infrastructure again.
38793
38907
 
38794
38908
  // src/commands/sms/init.ts
38795
38909
  init_esm_shims();
38796
- import * as clack53 from "@clack/prompts";
38910
+ import * as clack54 from "@clack/prompts";
38797
38911
  import * as pulumi32 from "@pulumi/pulumi";
38798
- import pc56 from "picocolors";
38912
+ import pc57 from "picocolors";
38799
38913
  init_events();
38800
38914
  init_aws();
38801
38915
  init_fs();
@@ -39214,7 +39328,7 @@ function validateSMSConfig(config2) {
39214
39328
 
39215
39329
  // src/commands/sms/init.ts
39216
39330
  async function promptPhoneNumberType() {
39217
- const result = await clack53.select({
39331
+ const result = await clack54.select({
39218
39332
  message: "Select phone number type:",
39219
39333
  options: [
39220
39334
  {
@@ -39234,14 +39348,14 @@ async function promptPhoneNumberType() {
39234
39348
  }
39235
39349
  ]
39236
39350
  });
39237
- if (clack53.isCancel(result)) {
39238
- clack53.cancel("Operation cancelled.");
39351
+ if (clack54.isCancel(result)) {
39352
+ clack54.cancel("Operation cancelled.");
39239
39353
  process.exit(0);
39240
39354
  }
39241
39355
  return result;
39242
39356
  }
39243
39357
  async function promptSMSPreset() {
39244
- const result = await clack53.select({
39358
+ const result = await clack54.select({
39245
39359
  message: "Choose configuration preset:",
39246
39360
  options: [
39247
39361
  {
@@ -39266,8 +39380,8 @@ async function promptSMSPreset() {
39266
39380
  }
39267
39381
  ]
39268
39382
  });
39269
- if (clack53.isCancel(result)) {
39270
- clack53.cancel("Operation cancelled.");
39383
+ if (clack54.isCancel(result)) {
39384
+ clack54.cancel("Operation cancelled.");
39271
39385
  process.exit(0);
39272
39386
  }
39273
39387
  return result;
@@ -39287,7 +39401,7 @@ var COMMON_COUNTRIES = [
39287
39401
  { code: "IN", name: "India" }
39288
39402
  ];
39289
39403
  async function promptAllowedCountries() {
39290
- const result = await clack53.multiselect({
39404
+ const result = await clack54.multiselect({
39291
39405
  message: "Select countries to allow SMS delivery (blocks all others):",
39292
39406
  options: COMMON_COUNTRIES.map((c) => ({
39293
39407
  value: c.code,
@@ -39296,14 +39410,14 @@ async function promptAllowedCountries() {
39296
39410
  initialValues: ["US"],
39297
39411
  required: true
39298
39412
  });
39299
- if (clack53.isCancel(result)) {
39300
- clack53.cancel("Operation cancelled.");
39413
+ if (clack54.isCancel(result)) {
39414
+ clack54.cancel("Operation cancelled.");
39301
39415
  process.exit(0);
39302
39416
  }
39303
39417
  return result;
39304
39418
  }
39305
39419
  async function promptEstimatedSMSVolume() {
39306
- const result = await clack53.select({
39420
+ const result = await clack54.select({
39307
39421
  message: "Estimated messages per month:",
39308
39422
  options: [
39309
39423
  { value: 100, label: "< 100 (Testing)" },
@@ -39313,8 +39427,8 @@ async function promptEstimatedSMSVolume() {
39313
39427
  { value: 1e5, label: "50,000+" }
39314
39428
  ]
39315
39429
  });
39316
- if (clack53.isCancel(result)) {
39317
- clack53.cancel("Operation cancelled.");
39430
+ if (clack54.isCancel(result)) {
39431
+ clack54.cancel("Operation cancelled.");
39318
39432
  process.exit(0);
39319
39433
  }
39320
39434
  return result;
@@ -39322,7 +39436,7 @@ async function promptEstimatedSMSVolume() {
39322
39436
  async function init3(options) {
39323
39437
  const startTime = Date.now();
39324
39438
  if (!isJsonMode()) {
39325
- clack53.intro(pc56.bold("Wraps SMS Infrastructure Setup"));
39439
+ clack54.intro(pc57.bold("Wraps SMS Infrastructure Setup"));
39326
39440
  }
39327
39441
  const progress = new DeploymentProgress();
39328
39442
  const wasAutoInstalled = await progress.execute(
@@ -39336,7 +39450,7 @@ async function init3(options) {
39336
39450
  "Validating AWS credentials",
39337
39451
  async () => validateAWSCredentials()
39338
39452
  );
39339
- progress.info(`Connected to AWS account: ${pc56.cyan(identity.accountId)}`);
39453
+ progress.info(`Connected to AWS account: ${pc57.cyan(identity.accountId)}`);
39340
39454
  const provider = options.provider || await promptProvider();
39341
39455
  const region = options.region || await promptRegion(await getAWSRegion());
39342
39456
  let vercelConfig;
@@ -39348,10 +39462,10 @@ async function init3(options) {
39348
39462
  region
39349
39463
  );
39350
39464
  if (existingConnection?.services?.sms) {
39351
- clack53.log.warn(
39352
- `SMS already configured for account ${pc56.cyan(identity.accountId)} in region ${pc56.cyan(region)}`
39465
+ clack54.log.warn(
39466
+ `SMS already configured for account ${pc57.cyan(identity.accountId)} in region ${pc57.cyan(region)}`
39353
39467
  );
39354
- clack53.log.info(`Use ${pc56.cyan("wraps sms status")} to view current setup`);
39468
+ clack54.log.info(`Use ${pc57.cyan("wraps sms status")} to view current setup`);
39355
39469
  process.exit(0);
39356
39470
  }
39357
39471
  let preset = options.preset;
@@ -39368,12 +39482,12 @@ async function init3(options) {
39368
39482
  optOutManagement: true,
39369
39483
  sendingEnabled: true
39370
39484
  };
39371
- const enableEventTracking = await clack53.confirm({
39485
+ const enableEventTracking = await clack54.confirm({
39372
39486
  message: "Enable event tracking (EventBridge + DynamoDB)?",
39373
39487
  initialValue: false
39374
39488
  });
39375
- if (clack53.isCancel(enableEventTracking)) {
39376
- clack53.cancel("Operation cancelled.");
39489
+ if (clack54.isCancel(enableEventTracking)) {
39490
+ clack54.cancel("Operation cancelled.");
39377
39491
  process.exit(0);
39378
39492
  }
39379
39493
  if (enableEventTracking) {
@@ -39393,17 +39507,17 @@ async function init3(options) {
39393
39507
  }
39394
39508
  progress.info(
39395
39509
  `
39396
- ${pc56.bold("Fraud Protection")} - Block SMS to countries where you don't do business`
39510
+ ${pc57.bold("Fraud Protection")} - Block SMS to countries where you don't do business`
39397
39511
  );
39398
39512
  const allowedCountries = await promptAllowedCountries();
39399
39513
  let aitFiltering = false;
39400
39514
  if (smsConfig.phoneNumberType !== "simulator") {
39401
- const enableAIT = await clack53.confirm({
39515
+ const enableAIT = await clack54.confirm({
39402
39516
  message: "Enable AIT (Artificially Inflated Traffic) filtering? (adds per-message cost)",
39403
39517
  initialValue: false
39404
39518
  });
39405
- if (clack53.isCancel(enableAIT)) {
39406
- clack53.cancel("Operation cancelled.");
39519
+ if (clack54.isCancel(enableAIT)) {
39520
+ clack54.cancel("Operation cancelled.");
39407
39521
  process.exit(0);
39408
39522
  }
39409
39523
  aitFiltering = enableAIT;
@@ -39415,21 +39529,21 @@ ${pc56.bold("Fraud Protection")} - Block SMS to countries where you don't do bus
39415
39529
  };
39416
39530
  const estimatedVolume = await promptEstimatedSMSVolume();
39417
39531
  progress.info(`
39418
- ${pc56.bold("Cost Estimate:")}`);
39532
+ ${pc57.bold("Cost Estimate:")}`);
39419
39533
  const costSummary = getSMSCostSummary(smsConfig, estimatedVolume);
39420
- clack53.log.info(costSummary);
39534
+ clack54.log.info(costSummary);
39421
39535
  const warnings = validateSMSConfig(smsConfig);
39422
39536
  if (warnings.length > 0) {
39423
39537
  progress.info(`
39424
- ${pc56.yellow(pc56.bold("Important Notes:"))}`);
39538
+ ${pc57.yellow(pc57.bold("Important Notes:"))}`);
39425
39539
  for (const warning of warnings) {
39426
- clack53.log.warn(warning);
39540
+ clack54.log.warn(warning);
39427
39541
  }
39428
39542
  }
39429
39543
  if (!(options.yes || options.preview)) {
39430
39544
  const confirmed = await confirmDeploy();
39431
39545
  if (!confirmed) {
39432
- clack53.cancel("Deployment cancelled.");
39546
+ clack54.cancel("Deployment cancelled.");
39433
39547
  process.exit(0);
39434
39548
  }
39435
39549
  }
@@ -39489,8 +39603,8 @@ ${pc56.yellow(pc56.bold("Important Notes:"))}`);
39489
39603
  costEstimate: getSMSCostSummary(smsConfig, 0),
39490
39604
  commandName: "wraps sms init"
39491
39605
  });
39492
- clack53.outro(
39493
- pc56.green("Preview complete. Run without --preview to deploy.")
39606
+ clack54.outro(
39607
+ pc57.green("Preview complete. Run without --preview to deploy.")
39494
39608
  );
39495
39609
  trackServiceInit("sms", true, {
39496
39610
  provider,
@@ -39539,9 +39653,9 @@ ${pc56.yellow(pc56.bold("Important Notes:"))}`);
39539
39653
  } catch (sdkError) {
39540
39654
  sdkResourceWarning = true;
39541
39655
  const msg = sdkError instanceof Error ? sdkError.message : String(sdkError);
39542
- clack53.log.warn(`Phone pool creation failed: ${msg}`);
39543
- clack53.log.info(
39544
- `Run ${pc56.cyan("wraps sms sync")} to retry SDK resource creation.`
39656
+ clack54.log.warn(`Phone pool creation failed: ${msg}`);
39657
+ clack54.log.info(
39658
+ `Run ${pc57.cyan("wraps sms sync")} to retry SDK resource creation.`
39545
39659
  );
39546
39660
  }
39547
39661
  }
@@ -39557,9 +39671,9 @@ ${pc56.yellow(pc56.bold("Important Notes:"))}`);
39557
39671
  } catch (sdkError) {
39558
39672
  sdkResourceWarning = true;
39559
39673
  const msg = sdkError instanceof Error ? sdkError.message : String(sdkError);
39560
- clack53.log.warn(`Event destination creation failed: ${msg}`);
39561
- clack53.log.info(
39562
- `Run ${pc56.cyan("wraps sms sync")} to retry SDK resource creation.`
39674
+ clack54.log.warn(`Event destination creation failed: ${msg}`);
39675
+ clack54.log.info(
39676
+ `Run ${pc57.cyan("wraps sms sync")} to retry SDK resource creation.`
39563
39677
  );
39564
39678
  }
39565
39679
  }
@@ -39578,14 +39692,14 @@ ${pc56.yellow(pc56.bold("Important Notes:"))}`);
39578
39692
  } catch (sdkError) {
39579
39693
  sdkResourceWarning = true;
39580
39694
  const msg = sdkError instanceof Error ? sdkError.message : String(sdkError);
39581
- clack53.log.warn(`Protect configuration creation failed: ${msg}`);
39582
- clack53.log.info(
39583
- `Run ${pc56.cyan("wraps sms sync")} to retry SDK resource creation.`
39695
+ clack54.log.warn(`Protect configuration creation failed: ${msg}`);
39696
+ clack54.log.info(
39697
+ `Run ${pc57.cyan("wraps sms sync")} to retry SDK resource creation.`
39584
39698
  );
39585
39699
  }
39586
39700
  }
39587
39701
  if (sdkResourceWarning) {
39588
- clack53.log.warn(
39702
+ clack54.log.warn(
39589
39703
  "Some SDK resources failed to create. Core infrastructure is deployed."
39590
39704
  );
39591
39705
  }
@@ -39630,47 +39744,47 @@ ${pc56.yellow(pc56.bold("Important Notes:"))}`);
39630
39744
  return;
39631
39745
  }
39632
39746
  console.log("\n");
39633
- clack53.log.success(pc56.green(pc56.bold("SMS infrastructure deployed!")));
39747
+ clack54.log.success(pc57.green(pc57.bold("SMS infrastructure deployed!")));
39634
39748
  console.log("\n");
39635
- clack53.note(
39749
+ clack54.note(
39636
39750
  [
39637
- `${pc56.bold("Phone Number:")} ${pc56.cyan(outputs.phoneNumber || "Provisioning...")}`,
39638
- `${pc56.bold("Phone Type:")} ${pc56.cyan(smsConfig.phoneNumberType || "simulator")}`,
39639
- `${pc56.bold("Config Set:")} ${pc56.cyan(outputs.configSetName || "wraps-sms-config")}`,
39640
- `${pc56.bold("Region:")} ${pc56.cyan(outputs.region)}`,
39641
- outputs.tableName ? `${pc56.bold("History Table:")} ${pc56.cyan(outputs.tableName)}` : "",
39751
+ `${pc57.bold("Phone Number:")} ${pc57.cyan(outputs.phoneNumber || "Provisioning...")}`,
39752
+ `${pc57.bold("Phone Type:")} ${pc57.cyan(smsConfig.phoneNumberType || "simulator")}`,
39753
+ `${pc57.bold("Config Set:")} ${pc57.cyan(outputs.configSetName || "wraps-sms-config")}`,
39754
+ `${pc57.bold("Region:")} ${pc57.cyan(outputs.region)}`,
39755
+ outputs.tableName ? `${pc57.bold("History Table:")} ${pc57.cyan(outputs.tableName)}` : "",
39642
39756
  "",
39643
- pc56.dim("IAM Role:"),
39644
- pc56.dim(` ${outputs.roleArn}`)
39757
+ pc57.dim("IAM Role:"),
39758
+ pc57.dim(` ${outputs.roleArn}`)
39645
39759
  ].filter(Boolean).join("\n"),
39646
39760
  "SMS Infrastructure"
39647
39761
  );
39648
39762
  const nextSteps = [];
39649
39763
  if (smsConfig.phoneNumberType === "toll-free") {
39650
39764
  nextSteps.push(
39651
- `${pc56.cyan("wraps sms register")} - Submit toll-free registration (required before sending)`
39765
+ `${pc57.cyan("wraps sms register")} - Submit toll-free registration (required before sending)`
39652
39766
  );
39653
39767
  }
39654
39768
  nextSteps.push(
39655
- `${pc56.cyan("wraps sms test --to +1234567890")} - Send a test message`
39769
+ `${pc57.cyan("wraps sms test --to +1234567890")} - Send a test message`
39656
39770
  );
39657
- nextSteps.push(`${pc56.cyan("wraps sms status")} - View SMS configuration`);
39771
+ nextSteps.push(`${pc57.cyan("wraps sms status")} - View SMS configuration`);
39658
39772
  console.log("\n");
39659
- clack53.log.info(pc56.bold("Next steps:"));
39773
+ clack54.log.info(pc57.bold("Next steps:"));
39660
39774
  for (const step of nextSteps) {
39661
39775
  console.log(` ${step}`);
39662
39776
  }
39663
39777
  console.log("\n");
39664
- clack53.log.info(pc56.bold("SDK Usage:"));
39665
- console.log(pc56.dim(" npm install @wraps.dev/sms"));
39778
+ clack54.log.info(pc57.bold("SDK Usage:"));
39779
+ console.log(pc57.dim(" npm install @wraps.dev/sms"));
39666
39780
  console.log("");
39667
- console.log(pc56.dim(" import { Wraps } from '@wraps.dev/sms';"));
39668
- console.log(pc56.dim(" const wraps = new Wraps();"));
39669
- console.log(pc56.dim(" await wraps.sms.send({"));
39670
- console.log(pc56.dim(" to: '+14155551234',"));
39671
- console.log(pc56.dim(" message: 'Your code is 123456',"));
39672
- console.log(pc56.dim(" });"));
39673
- clack53.outro(pc56.green("Setup complete!"));
39781
+ console.log(pc57.dim(" import { Wraps } from '@wraps.dev/sms';"));
39782
+ console.log(pc57.dim(" const wraps = new Wraps();"));
39783
+ console.log(pc57.dim(" await wraps.sms.send({"));
39784
+ console.log(pc57.dim(" to: '+14155551234',"));
39785
+ console.log(pc57.dim(" message: 'Your code is 123456',"));
39786
+ console.log(pc57.dim(" });"));
39787
+ clack54.outro(pc57.green("Setup complete!"));
39674
39788
  const duration = Date.now() - startTime;
39675
39789
  const enabledFeatures = [];
39676
39790
  if (smsConfig.tracking?.enabled) {
@@ -39706,8 +39820,8 @@ init_aws();
39706
39820
  init_json_output();
39707
39821
  init_metadata();
39708
39822
  init_output();
39709
- import * as clack54 from "@clack/prompts";
39710
- import pc57 from "picocolors";
39823
+ import * as clack55 from "@clack/prompts";
39824
+ import pc58 from "picocolors";
39711
39825
  async function getPhoneNumberDetails(region) {
39712
39826
  const { PinpointSMSVoiceV2Client: PinpointSMSVoiceV2Client5, DescribePhoneNumbersCommand: DescribePhoneNumbersCommand2 } = await import("@aws-sdk/client-pinpoint-sms-voice-v2");
39713
39827
  const client = new PinpointSMSVoiceV2Client5({ region });
@@ -39727,7 +39841,7 @@ async function getPhoneNumberDetails(region) {
39727
39841
  return null;
39728
39842
  } catch (error) {
39729
39843
  const errorMessage = error instanceof Error ? error.message : String(error);
39730
- clack54.log.error(`Error fetching phone number: ${errorMessage}`);
39844
+ clack55.log.error(`Error fetching phone number: ${errorMessage}`);
39731
39845
  return null;
39732
39846
  }
39733
39847
  }
@@ -39748,7 +39862,7 @@ async function getRegistrationStatus(region, registrationId) {
39748
39862
  async function smsRegister(options) {
39749
39863
  const startTime = Date.now();
39750
39864
  if (!isJsonMode()) {
39751
- clack54.intro(pc57.bold("Wraps SMS - Toll-Free Registration"));
39865
+ clack55.intro(pc58.bold("Wraps SMS - Toll-Free Registration"));
39752
39866
  }
39753
39867
  const progress = new DeploymentProgress();
39754
39868
  const identity = await progress.execute(
@@ -39761,8 +39875,8 @@ async function smsRegister(options) {
39761
39875
  }
39762
39876
  const metadata = await loadConnectionMetadata(identity.accountId, region);
39763
39877
  if (!metadata?.services?.sms) {
39764
- clack54.log.error("No SMS infrastructure found.");
39765
- clack54.log.info(`Run ${pc57.cyan("wraps sms init")} first.`);
39878
+ clack55.log.error("No SMS infrastructure found.");
39879
+ clack55.log.info(`Run ${pc58.cyan("wraps sms init")} first.`);
39766
39880
  process.exit(1);
39767
39881
  }
39768
39882
  const phoneDetails = await progress.execute(
@@ -39770,7 +39884,7 @@ async function smsRegister(options) {
39770
39884
  async () => getPhoneNumberDetails(region)
39771
39885
  );
39772
39886
  if (!phoneDetails) {
39773
- clack54.log.error("No phone number found.");
39887
+ clack55.log.error("No phone number found.");
39774
39888
  process.exit(1);
39775
39889
  }
39776
39890
  let registrationStatus = null;
@@ -39796,53 +39910,53 @@ async function smsRegister(options) {
39796
39910
  }
39797
39911
  console.log("");
39798
39912
  console.log(
39799
- `${pc57.bold("Phone Number:")} ${pc57.cyan(phoneDetails.phoneNumber)}`
39913
+ `${pc58.bold("Phone Number:")} ${pc58.cyan(phoneDetails.phoneNumber)}`
39800
39914
  );
39801
- console.log(`${pc57.bold("Type:")} ${pc57.cyan(phoneDetails.type)}`);
39915
+ console.log(`${pc58.bold("Type:")} ${pc58.cyan(phoneDetails.type)}`);
39802
39916
  console.log(
39803
- `${pc57.bold("Status:")} ${phoneDetails.status === "ACTIVE" ? pc57.green(phoneDetails.status) : pc57.yellow(phoneDetails.status)}`
39917
+ `${pc58.bold("Status:")} ${phoneDetails.status === "ACTIVE" ? pc58.green(phoneDetails.status) : pc58.yellow(phoneDetails.status)}`
39804
39918
  );
39805
39919
  if (registrationStatus) {
39806
- console.log(`${pc57.bold("Registration:")} ${pc57.cyan(registrationStatus)}`);
39920
+ console.log(`${pc58.bold("Registration:")} ${pc58.cyan(registrationStatus)}`);
39807
39921
  }
39808
39922
  console.log("");
39809
39923
  if (phoneDetails.status === "ACTIVE") {
39810
- clack54.log.success("Your phone number is already ACTIVE and ready to use!");
39924
+ clack55.log.success("Your phone number is already ACTIVE and ready to use!");
39811
39925
  const { PinpointSMSVoiceV2Client: PinpointSMSVoiceV2Client5, DescribePoolsCommand } = await import("@aws-sdk/client-pinpoint-sms-voice-v2");
39812
39926
  const client = new PinpointSMSVoiceV2Client5({ region });
39813
39927
  const pools = await client.send(new DescribePoolsCommand({}));
39814
39928
  if (!pools.Pools?.length) {
39815
- clack54.log.info("Run `wraps sms sync` to create the phone pool.");
39929
+ clack55.log.info("Run `wraps sms sync` to create the phone pool.");
39816
39930
  }
39817
39931
  process.exit(0);
39818
39932
  }
39819
39933
  if (phoneDetails.type !== "TOLL_FREE") {
39820
- clack54.log.info("Only toll-free numbers require registration.");
39821
- clack54.log.info(`Your ${phoneDetails.type} number should be ready to use.`);
39934
+ clack55.log.info("Only toll-free numbers require registration.");
39935
+ clack55.log.info(`Your ${phoneDetails.type} number should be ready to use.`);
39822
39936
  process.exit(0);
39823
39937
  }
39824
- console.log(pc57.bold("Toll-Free Registration Required"));
39938
+ console.log(pc58.bold("Toll-Free Registration Required"));
39825
39939
  console.log("");
39826
39940
  console.log(
39827
- pc57.dim("To send SMS at scale, you must register your toll-free number.")
39941
+ pc58.dim("To send SMS at scale, you must register your toll-free number.")
39828
39942
  );
39829
- console.log(pc57.dim("This process typically takes 1-15 business days."));
39943
+ console.log(pc58.dim("This process typically takes 1-15 business days."));
39830
39944
  console.log("");
39831
- console.log(pc57.bold("You'll need to provide:"));
39832
- console.log(` ${pc57.dim("\u2022")} Business name and address`);
39945
+ console.log(pc58.bold("You'll need to provide:"));
39946
+ console.log(` ${pc58.dim("\u2022")} Business name and address`);
39833
39947
  console.log(
39834
- ` ${pc57.dim("\u2022")} Use case description (what messages you're sending)`
39948
+ ` ${pc58.dim("\u2022")} Use case description (what messages you're sending)`
39835
39949
  );
39836
- console.log(` ${pc57.dim("\u2022")} Sample messages (2-3 examples)`);
39837
- console.log(` ${pc57.dim("\u2022")} How users opt-in to receive messages`);
39838
- console.log(` ${pc57.dim("\u2022")} Expected monthly message volume`);
39950
+ console.log(` ${pc58.dim("\u2022")} Sample messages (2-3 examples)`);
39951
+ console.log(` ${pc58.dim("\u2022")} How users opt-in to receive messages`);
39952
+ console.log(` ${pc58.dim("\u2022")} Expected monthly message volume`);
39839
39953
  console.log("");
39840
- const openConsole = await clack54.confirm({
39954
+ const openConsole = await clack55.confirm({
39841
39955
  message: "Open AWS Console to start registration?",
39842
39956
  initialValue: true
39843
39957
  });
39844
- if (clack54.isCancel(openConsole)) {
39845
- clack54.cancel("Registration cancelled.");
39958
+ if (clack55.isCancel(openConsole)) {
39959
+ clack55.cancel("Registration cancelled.");
39846
39960
  process.exit(0);
39847
39961
  }
39848
39962
  if (openConsole) {
@@ -39852,41 +39966,41 @@ async function smsRegister(options) {
39852
39966
  const execAsync2 = promisify2(exec2);
39853
39967
  try {
39854
39968
  await execAsync2(`open "${consoleUrl}"`);
39855
- clack54.log.success("Opened AWS Console in your browser.");
39969
+ clack55.log.success("Opened AWS Console in your browser.");
39856
39970
  } catch {
39857
39971
  try {
39858
39972
  await execAsync2(`xdg-open "${consoleUrl}"`);
39859
- clack54.log.success("Opened AWS Console in your browser.");
39973
+ clack55.log.success("Opened AWS Console in your browser.");
39860
39974
  } catch {
39861
- clack54.log.info("Open this URL in your browser:");
39975
+ clack55.log.info("Open this URL in your browser:");
39862
39976
  console.log(`
39863
- ${pc57.cyan(consoleUrl)}
39977
+ ${pc58.cyan(consoleUrl)}
39864
39978
  `);
39865
39979
  }
39866
39980
  }
39867
39981
  console.log("");
39868
- console.log(pc57.bold("Next Steps:"));
39982
+ console.log(pc58.bold("Next Steps:"));
39869
39983
  console.log(
39870
- ` 1. Click ${pc57.cyan("Create registration")} in the AWS Console`
39984
+ ` 1. Click ${pc58.cyan("Create registration")} in the AWS Console`
39871
39985
  );
39872
- console.log(` 2. Select ${pc57.cyan("Toll-free number registration")}`);
39986
+ console.log(` 2. Select ${pc58.cyan("Toll-free number registration")}`);
39873
39987
  console.log(" 3. Fill out the business information form");
39874
39988
  console.log(" 4. Submit and wait for approval (1-15 business days)");
39875
39989
  console.log("");
39876
39990
  console.log(
39877
- pc57.dim("Once approved, run `wraps sms sync` to complete setup.")
39991
+ pc58.dim("Once approved, run `wraps sms sync` to complete setup.")
39878
39992
  );
39879
39993
  } else {
39880
39994
  const consoleUrl = `https://${region}.console.aws.amazon.com/sms-voice/home?region=${region}#/registrations`;
39881
39995
  console.log("");
39882
39996
  console.log("When you're ready, go to:");
39883
- console.log(` ${pc57.cyan(consoleUrl)}`);
39997
+ console.log(` ${pc58.cyan(consoleUrl)}`);
39884
39998
  }
39885
39999
  trackCommand("sms:register", {
39886
40000
  success: true,
39887
40001
  duration_ms: Date.now() - startTime
39888
40002
  });
39889
- clack54.outro(pc57.dim("Good luck with your registration!"));
40003
+ clack55.outro(pc58.dim("Good luck with your registration!"));
39890
40004
  }
39891
40005
 
39892
40006
  // src/commands/sms/status.ts
@@ -39899,54 +40013,54 @@ init_metadata();
39899
40013
  init_output();
39900
40014
  init_pulumi();
39901
40015
  init_region_resolver();
39902
- import * as clack55 from "@clack/prompts";
40016
+ import * as clack56 from "@clack/prompts";
39903
40017
  import * as pulumi33 from "@pulumi/pulumi";
39904
- import pc58 from "picocolors";
40018
+ import pc59 from "picocolors";
39905
40019
  function displaySMSStatus(options) {
39906
40020
  const lines = [];
39907
- lines.push(pc58.bold(pc58.green("SMS Infrastructure Active")));
40021
+ lines.push(pc59.bold(pc59.green("SMS Infrastructure Active")));
39908
40022
  lines.push("");
39909
- lines.push(pc58.bold("Phone Number"));
40023
+ lines.push(pc59.bold("Phone Number"));
39910
40024
  if (options.phoneNumber) {
39911
- lines.push(` Number: ${pc58.cyan(options.phoneNumber)}`);
40025
+ lines.push(` Number: ${pc59.cyan(options.phoneNumber)}`);
39912
40026
  } else {
39913
- lines.push(` Number: ${pc58.yellow("Provisioning...")}`);
40027
+ lines.push(` Number: ${pc59.yellow("Provisioning...")}`);
39914
40028
  }
39915
- lines.push(` Type: ${pc58.cyan(options.phoneNumberType || "simulator")}`);
40029
+ lines.push(` Type: ${pc59.cyan(options.phoneNumberType || "simulator")}`);
39916
40030
  lines.push("");
39917
- lines.push(pc58.bold("Configuration"));
39918
- lines.push(` Region: ${pc58.cyan(options.region)}`);
40031
+ lines.push(pc59.bold("Configuration"));
40032
+ lines.push(` Region: ${pc59.cyan(options.region)}`);
39919
40033
  if (options.preset) {
39920
- lines.push(` Preset: ${pc58.cyan(options.preset)}`);
40034
+ lines.push(` Preset: ${pc59.cyan(options.preset)}`);
39921
40035
  }
39922
40036
  if (options.configSetName) {
39923
- lines.push(` Config Set: ${pc58.cyan(options.configSetName)}`);
40037
+ lines.push(` Config Set: ${pc59.cyan(options.configSetName)}`);
39924
40038
  }
39925
40039
  lines.push("");
39926
- lines.push(pc58.bold("Features"));
40040
+ lines.push(pc59.bold("Features"));
39927
40041
  lines.push(
39928
- ` Event Tracking: ${options.eventTracking ? pc58.green("Enabled") : pc58.dim("Disabled")}`
40042
+ ` Event Tracking: ${options.eventTracking ? pc59.green("Enabled") : pc59.dim("Disabled")}`
39929
40043
  );
39930
40044
  if (options.tableName) {
39931
- lines.push(` Message History: ${pc58.green("Enabled")}`);
39932
- lines.push(` Table: ${pc58.dim(options.tableName)}`);
40045
+ lines.push(` Message History: ${pc59.green("Enabled")}`);
40046
+ lines.push(` Table: ${pc59.dim(options.tableName)}`);
39933
40047
  }
39934
40048
  if (options.queueUrl) {
39935
- lines.push(` Event Queue: ${pc58.green("Enabled")}`);
40049
+ lines.push(` Event Queue: ${pc59.green("Enabled")}`);
39936
40050
  }
39937
40051
  lines.push("");
39938
40052
  if (options.roleArn) {
39939
- lines.push(pc58.bold("IAM Role"));
39940
- lines.push(` ${pc58.dim(options.roleArn)}`);
40053
+ lines.push(pc59.bold("IAM Role"));
40054
+ lines.push(` ${pc59.dim(options.roleArn)}`);
39941
40055
  }
39942
- clack55.note(lines.join("\n"), "SMS Status");
40056
+ clack56.note(lines.join("\n"), "SMS Status");
39943
40057
  }
39944
40058
  async function smsStatus(options) {
39945
40059
  await ensurePulumiInstalled();
39946
40060
  const startTime = Date.now();
39947
40061
  const progress = new DeploymentProgress();
39948
40062
  if (!isJsonMode()) {
39949
- clack55.intro(pc58.bold("Wraps SMS Status"));
40063
+ clack56.intro(pc59.bold("Wraps SMS Status"));
39950
40064
  }
39951
40065
  const identity = await progress.execute(
39952
40066
  "Loading SMS infrastructure status",
@@ -39961,10 +40075,10 @@ async function smsStatus(options) {
39961
40075
  const metadata = await loadConnectionMetadata(identity.accountId, region);
39962
40076
  if (!metadata?.services?.sms) {
39963
40077
  progress.stop();
39964
- clack55.log.error("No SMS infrastructure found");
40078
+ clack56.log.error("No SMS infrastructure found");
39965
40079
  console.log(
39966
40080
  `
39967
- Run ${pc58.cyan("wraps sms init")} to deploy SMS infrastructure.
40081
+ Run ${pc59.cyan("wraps sms init")} to deploy SMS infrastructure.
39968
40082
  `
39969
40083
  );
39970
40084
  process.exit(1);
@@ -40000,25 +40114,25 @@ Run ${pc58.cyan("wraps sms init")} to deploy SMS infrastructure.
40000
40114
  }
40001
40115
  displaySMSStatus(smsStatusData);
40002
40116
  console.log("");
40003
- clack55.log.info(pc58.bold("Commands:"));
40117
+ clack56.log.info(pc59.bold("Commands:"));
40004
40118
  console.log(
40005
- ` ${pc58.cyan("wraps sms test --to +1234567890")} - Send a test message`
40119
+ ` ${pc59.cyan("wraps sms test --to +1234567890")} - Send a test message`
40006
40120
  );
40007
- console.log(` ${pc58.cyan("wraps sms destroy")} - Remove SMS infrastructure`);
40121
+ console.log(` ${pc59.cyan("wraps sms destroy")} - Remove SMS infrastructure`);
40008
40122
  trackCommand("sms:status", {
40009
40123
  success: true,
40010
40124
  phone_type: smsConfig?.phoneNumberType,
40011
40125
  event_tracking: smsConfig?.eventTracking?.enabled,
40012
40126
  duration_ms: Date.now() - startTime
40013
40127
  });
40014
- clack55.outro(pc58.dim("SMS infrastructure is ready"));
40128
+ clack56.outro(pc59.dim("SMS infrastructure is ready"));
40015
40129
  }
40016
40130
 
40017
40131
  // src/commands/sms/sync.ts
40018
40132
  init_esm_shims();
40019
- import * as clack56 from "@clack/prompts";
40133
+ import * as clack57 from "@clack/prompts";
40020
40134
  import * as pulumi34 from "@pulumi/pulumi";
40021
- import pc59 from "picocolors";
40135
+ import pc60 from "picocolors";
40022
40136
  init_events();
40023
40137
  init_aws();
40024
40138
  init_errors();
@@ -40031,7 +40145,7 @@ async function smsSync(options) {
40031
40145
  await ensurePulumiInstalled();
40032
40146
  const startTime = Date.now();
40033
40147
  if (!isJsonMode()) {
40034
- clack56.intro(pc59.bold("Wraps SMS Infrastructure Sync"));
40148
+ clack57.intro(pc60.bold("Wraps SMS Infrastructure Sync"));
40035
40149
  }
40036
40150
  const progress = new DeploymentProgress();
40037
40151
  const identity = await progress.execute(
@@ -40043,10 +40157,10 @@ async function smsSync(options) {
40043
40157
  const smsService = metadata?.services?.sms;
40044
40158
  if (!smsService?.config) {
40045
40159
  progress.stop();
40046
- clack56.log.error("No SMS infrastructure found to sync");
40160
+ clack57.log.error("No SMS infrastructure found to sync");
40047
40161
  console.log(
40048
40162
  `
40049
- Run ${pc59.cyan("wraps sms init")} to deploy SMS infrastructure first.
40163
+ Run ${pc60.cyan("wraps sms init")} to deploy SMS infrastructure first.
40050
40164
  `
40051
40165
  );
40052
40166
  process.exit(1);
@@ -40055,18 +40169,18 @@ Run ${pc59.cyan("wraps sms init")} to deploy SMS infrastructure first.
40055
40169
  const storedStackName = smsService.pulumiStackName;
40056
40170
  progress.info("Found existing SMS configuration");
40057
40171
  progress.info(
40058
- `Phone type: ${pc59.cyan(smsConfig.phoneNumberType || "simulator")}`
40172
+ `Phone type: ${pc60.cyan(smsConfig.phoneNumberType || "simulator")}`
40059
40173
  );
40060
40174
  progress.info(
40061
- `Event tracking: ${pc59.cyan(smsConfig.eventTracking?.enabled ? "enabled" : "disabled")}`
40175
+ `Event tracking: ${pc60.cyan(smsConfig.eventTracking?.enabled ? "enabled" : "disabled")}`
40062
40176
  );
40063
40177
  if (!options.yes) {
40064
- const confirmed = await clack56.confirm({
40178
+ const confirmed = await clack57.confirm({
40065
40179
  message: "Sync SMS infrastructure? This will update Lambda code and recreate any missing resources.",
40066
40180
  initialValue: true
40067
40181
  });
40068
- if (clack56.isCancel(confirmed) || !confirmed) {
40069
- clack56.cancel("Sync cancelled.");
40182
+ if (clack57.isCancel(confirmed) || !confirmed) {
40183
+ clack57.cancel("Sync cancelled.");
40070
40184
  process.exit(0);
40071
40185
  }
40072
40186
  }
@@ -40171,7 +40285,7 @@ Run ${pc59.cyan("wraps sms init")} to deploy SMS infrastructure first.
40171
40285
  throw errors.stackLocked();
40172
40286
  }
40173
40287
  trackError("SYNC_FAILED", "sms:sync", { step: "sync" });
40174
- clack56.log.error(`SMS sync failed: ${errorMessage}`);
40288
+ clack57.log.error(`SMS sync failed: ${errorMessage}`);
40175
40289
  process.exit(1);
40176
40290
  }
40177
40291
  if (metadata && smsService) {
@@ -40191,7 +40305,7 @@ Run ${pc59.cyan("wraps sms init")} to deploy SMS infrastructure first.
40191
40305
  return;
40192
40306
  }
40193
40307
  console.log("\n");
40194
- clack56.log.success(pc59.green("SMS infrastructure synced successfully!"));
40308
+ clack57.log.success(pc60.green("SMS infrastructure synced successfully!"));
40195
40309
  const changes = [];
40196
40310
  if (outputs.lambdaFunctions?.length) {
40197
40311
  changes.push("Lambda functions updated");
@@ -40199,13 +40313,13 @@ Run ${pc59.cyan("wraps sms init")} to deploy SMS infrastructure first.
40199
40313
  changes.push("SDK resources verified");
40200
40314
  console.log("");
40201
40315
  for (const change of changes) {
40202
- console.log(` ${pc59.green("\u2713")} ${change}`);
40316
+ console.log(` ${pc60.green("\u2713")} ${change}`);
40203
40317
  }
40204
40318
  trackCommand("sms:sync", {
40205
40319
  success: true,
40206
40320
  duration_ms: Date.now() - startTime
40207
40321
  });
40208
- clack56.outro(pc59.green("Sync complete!"));
40322
+ clack57.outro(pc60.green("Sync complete!"));
40209
40323
  }
40210
40324
 
40211
40325
  // src/commands/sms/test.ts
@@ -40220,8 +40334,8 @@ import {
40220
40334
  PinpointSMSVoiceV2Client as PinpointSMSVoiceV2Client3,
40221
40335
  SendTextMessageCommand
40222
40336
  } from "@aws-sdk/client-pinpoint-sms-voice-v2";
40223
- import * as clack57 from "@clack/prompts";
40224
- import pc60 from "picocolors";
40337
+ import * as clack58 from "@clack/prompts";
40338
+ import pc61 from "picocolors";
40225
40339
 
40226
40340
  // src/utils/sms/validation.ts
40227
40341
  init_esm_shims();
@@ -40244,7 +40358,7 @@ async function smsTest(options) {
40244
40358
  const startTime = Date.now();
40245
40359
  const progress = new DeploymentProgress();
40246
40360
  if (!isJsonMode()) {
40247
- clack57.intro(pc60.bold("Wraps SMS Test"));
40361
+ clack58.intro(pc61.bold("Wraps SMS Test"));
40248
40362
  }
40249
40363
  const identity = await progress.execute(
40250
40364
  "Validating AWS credentials",
@@ -40254,10 +40368,10 @@ async function smsTest(options) {
40254
40368
  const metadata = await loadConnectionMetadata(identity.accountId, region);
40255
40369
  if (!metadata?.services?.sms) {
40256
40370
  progress.stop();
40257
- clack57.log.error("No SMS infrastructure found");
40371
+ clack58.log.error("No SMS infrastructure found");
40258
40372
  console.log(
40259
40373
  `
40260
- Run ${pc60.cyan("wraps sms init")} to deploy SMS infrastructure.
40374
+ Run ${pc61.cyan("wraps sms init")} to deploy SMS infrastructure.
40261
40375
  `
40262
40376
  );
40263
40377
  process.exit(1);
@@ -40271,7 +40385,7 @@ Run ${pc60.cyan("wraps sms init")} to deploy SMS infrastructure.
40271
40385
  );
40272
40386
  }
40273
40387
  if (!toNumber) {
40274
- const destinationType = await clack57.select({
40388
+ const destinationType = await clack58.select({
40275
40389
  message: "Choose destination number:",
40276
40390
  options: [
40277
40391
  {
@@ -40286,25 +40400,25 @@ Run ${pc60.cyan("wraps sms init")} to deploy SMS infrastructure.
40286
40400
  }
40287
40401
  ]
40288
40402
  });
40289
- if (clack57.isCancel(destinationType)) {
40290
- clack57.cancel("Operation cancelled.");
40403
+ if (clack58.isCancel(destinationType)) {
40404
+ clack58.cancel("Operation cancelled.");
40291
40405
  process.exit(0);
40292
40406
  }
40293
40407
  if (destinationType === "simulator") {
40294
- const simResult = await clack57.select({
40408
+ const simResult = await clack58.select({
40295
40409
  message: "Select simulator destination:",
40296
40410
  options: SIMULATOR_DESTINATIONS.map((sim) => ({
40297
40411
  value: sim.number,
40298
40412
  label: `${sim.number} | ${sim.country}`
40299
40413
  }))
40300
40414
  });
40301
- if (clack57.isCancel(simResult)) {
40302
- clack57.cancel("Operation cancelled.");
40415
+ if (clack58.isCancel(simResult)) {
40416
+ clack58.cancel("Operation cancelled.");
40303
40417
  process.exit(0);
40304
40418
  }
40305
40419
  toNumber = simResult;
40306
40420
  } else {
40307
- const result = await clack57.text({
40421
+ const result = await clack58.text({
40308
40422
  message: "Enter destination phone number (E.164 format):",
40309
40423
  placeholder: "+14155551234",
40310
40424
  validate: (value) => {
@@ -40317,22 +40431,22 @@ Run ${pc60.cyan("wraps sms init")} to deploy SMS infrastructure.
40317
40431
  return;
40318
40432
  }
40319
40433
  });
40320
- if (clack57.isCancel(result)) {
40321
- clack57.cancel("Operation cancelled.");
40434
+ if (clack58.isCancel(result)) {
40435
+ clack58.cancel("Operation cancelled.");
40322
40436
  process.exit(0);
40323
40437
  }
40324
40438
  toNumber = result;
40325
40439
  }
40326
40440
  } else if (!isValidPhoneNumber(toNumber)) {
40327
40441
  progress.stop();
40328
- clack57.log.error(
40442
+ clack58.log.error(
40329
40443
  `Invalid phone number format: ${toNumber}. Use E.164 format (e.g., +14155551234)`
40330
40444
  );
40331
40445
  process.exit(1);
40332
40446
  }
40333
40447
  let message = options.message;
40334
40448
  if (!message) {
40335
- const result = await clack57.text({
40449
+ const result = await clack58.text({
40336
40450
  message: "Enter test message:",
40337
40451
  placeholder: "Hello from Wraps SMS!",
40338
40452
  defaultValue: "Hello from Wraps SMS! This is a test message.",
@@ -40346,8 +40460,8 @@ Run ${pc60.cyan("wraps sms init")} to deploy SMS infrastructure.
40346
40460
  return;
40347
40461
  }
40348
40462
  });
40349
- if (clack57.isCancel(result)) {
40350
- clack57.cancel("Operation cancelled.");
40463
+ if (clack58.isCancel(result)) {
40464
+ clack58.cancel("Operation cancelled.");
40351
40465
  process.exit(0);
40352
40466
  }
40353
40467
  message = result;
@@ -40386,16 +40500,16 @@ Run ${pc60.cyan("wraps sms init")} to deploy SMS infrastructure.
40386
40500
  return;
40387
40501
  }
40388
40502
  console.log("\n");
40389
- clack57.log.success(pc60.green("Test SMS sent successfully!"));
40503
+ clack58.log.success(pc61.green("Test SMS sent successfully!"));
40390
40504
  console.log("");
40391
- clack57.note(
40505
+ clack58.note(
40392
40506
  [
40393
- `${pc60.bold("Message ID:")} ${pc60.cyan(messageId || "unknown")}`,
40394
- `${pc60.bold("To:")} ${pc60.cyan(toNumber)}`,
40395
- `${pc60.bold("Message:")} ${message}`,
40396
- `${pc60.bold("Type:")} ${pc60.cyan(smsConfig?.phoneNumberType || "simulator")}`,
40507
+ `${pc61.bold("Message ID:")} ${pc61.cyan(messageId || "unknown")}`,
40508
+ `${pc61.bold("To:")} ${pc61.cyan(toNumber)}`,
40509
+ `${pc61.bold("Message:")} ${message}`,
40510
+ `${pc61.bold("Type:")} ${pc61.cyan(smsConfig?.phoneNumberType || "simulator")}`,
40397
40511
  "",
40398
- pc60.dim(
40512
+ pc61.dim(
40399
40513
  smsConfig?.phoneNumberType === "simulator" ? "Note: Simulator messages are not actually delivered" : "Check your phone for the message!"
40400
40514
  )
40401
40515
  ].join("\n"),
@@ -40403,11 +40517,11 @@ Run ${pc60.cyan("wraps sms init")} to deploy SMS infrastructure.
40403
40517
  );
40404
40518
  if (smsConfig?.eventTracking?.enabled) {
40405
40519
  console.log("");
40406
- clack57.log.info(
40407
- pc60.dim("Event tracking is enabled. Check DynamoDB for delivery status.")
40520
+ clack58.log.info(
40521
+ pc61.dim("Event tracking is enabled. Check DynamoDB for delivery status.")
40408
40522
  );
40409
40523
  }
40410
- clack57.outro(pc60.green("Test complete!"));
40524
+ clack58.outro(pc61.green("Test complete!"));
40411
40525
  } catch (error) {
40412
40526
  progress.stop();
40413
40527
  const errorMessage = error instanceof Error ? error.message : String(error);
@@ -40419,33 +40533,33 @@ Run ${pc60.cyan("wraps sms init")} to deploy SMS infrastructure.
40419
40533
  });
40420
40534
  const errorName = error instanceof Error ? error.name : "";
40421
40535
  if (errorName === "ConflictException" || errorMessage.includes("opt-out")) {
40422
- clack57.log.error("Destination number has opted out of messages");
40536
+ clack58.log.error("Destination number has opted out of messages");
40423
40537
  console.log("\nThe recipient has opted out of receiving SMS messages.\n");
40424
40538
  } else if (errorName === "ThrottlingException" || errorMessage.includes("spending limit")) {
40425
- clack57.log.error("SMS rate or spending limit reached");
40539
+ clack58.log.error("SMS rate or spending limit reached");
40426
40540
  console.log(
40427
40541
  "\nCheck your AWS account SMS spending limits in the console.\n"
40428
40542
  );
40429
40543
  } else if (errorName === "ValidationException") {
40430
- clack57.log.error(`Invalid request: ${errorMessage}`);
40544
+ clack58.log.error(`Invalid request: ${errorMessage}`);
40431
40545
  } else if (errorMessage.includes("not verified") || errorMessage.includes("not registered")) {
40432
- clack57.log.error("Toll-free number registration is not complete");
40546
+ clack58.log.error("Toll-free number registration is not complete");
40433
40547
  console.log(
40434
40548
  `
40435
- Run ${pc60.cyan("wraps sms register")} to check registration status.
40549
+ Run ${pc61.cyan("wraps sms register")} to check registration status.
40436
40550
  `
40437
40551
  );
40438
40552
  } else if (errorName === "AccessDeniedException") {
40439
- clack57.log.error(
40553
+ clack58.log.error(
40440
40554
  "Permission denied \u2014 IAM role may be missing SMS send permissions"
40441
40555
  );
40442
40556
  console.log(
40443
40557
  `
40444
- Run ${pc60.cyan("wraps sms upgrade")} to update IAM policies.
40558
+ Run ${pc61.cyan("wraps sms upgrade")} to update IAM policies.
40445
40559
  `
40446
40560
  );
40447
40561
  } else {
40448
- clack57.log.error(`Failed to send SMS: ${errorMessage}`);
40562
+ clack58.log.error(`Failed to send SMS: ${errorMessage}`);
40449
40563
  }
40450
40564
  process.exit(1);
40451
40565
  }
@@ -40453,9 +40567,9 @@ Run ${pc60.cyan("wraps sms upgrade")} to update IAM policies.
40453
40567
 
40454
40568
  // src/commands/sms/upgrade.ts
40455
40569
  init_esm_shims();
40456
- import * as clack58 from "@clack/prompts";
40570
+ import * as clack59 from "@clack/prompts";
40457
40571
  import * as pulumi35 from "@pulumi/pulumi";
40458
- import pc61 from "picocolors";
40572
+ import pc62 from "picocolors";
40459
40573
  init_events();
40460
40574
  init_aws();
40461
40575
  init_errors();
@@ -40470,7 +40584,7 @@ async function smsUpgrade(options) {
40470
40584
  const startTime = Date.now();
40471
40585
  let upgradeAction = "";
40472
40586
  if (!isJsonMode()) {
40473
- clack58.intro(pc61.bold("Wraps SMS Upgrade - Enhance Your SMS Infrastructure"));
40587
+ clack59.intro(pc62.bold("Wraps SMS Upgrade - Enhance Your SMS Infrastructure"));
40474
40588
  }
40475
40589
  const progress = new DeploymentProgress();
40476
40590
  const wasAutoInstalled = await progress.execute(
@@ -40484,7 +40598,7 @@ async function smsUpgrade(options) {
40484
40598
  "Validating AWS credentials",
40485
40599
  async () => validateAWSCredentials()
40486
40600
  );
40487
- progress.info(`Connected to AWS account: ${pc61.cyan(identity.accountId)}`);
40601
+ progress.info(`Connected to AWS account: ${pc62.cyan(identity.accountId)}`);
40488
40602
  const region = await resolveRegionForCommand({
40489
40603
  accountId: identity.accountId,
40490
40604
  optionRegion: options.region,
@@ -40493,35 +40607,35 @@ async function smsUpgrade(options) {
40493
40607
  });
40494
40608
  const metadata = await loadConnectionMetadata(identity.accountId, region);
40495
40609
  if (!metadata) {
40496
- clack58.log.error(
40497
- `No Wraps connection found for account ${pc61.cyan(identity.accountId)} in region ${pc61.cyan(region)}`
40610
+ clack59.log.error(
40611
+ `No Wraps connection found for account ${pc62.cyan(identity.accountId)} in region ${pc62.cyan(region)}`
40498
40612
  );
40499
- clack58.log.info(
40500
- `Use ${pc61.cyan("wraps sms init")} to create new infrastructure.`
40613
+ clack59.log.info(
40614
+ `Use ${pc62.cyan("wraps sms init")} to create new infrastructure.`
40501
40615
  );
40502
40616
  process.exit(1);
40503
40617
  }
40504
40618
  if (!metadata.services.sms) {
40505
- clack58.log.error("No SMS infrastructure found");
40506
- clack58.log.info(
40507
- `Use ${pc61.cyan("wraps sms init")} to deploy SMS infrastructure.`
40619
+ clack59.log.error("No SMS infrastructure found");
40620
+ clack59.log.info(
40621
+ `Use ${pc62.cyan("wraps sms init")} to deploy SMS infrastructure.`
40508
40622
  );
40509
40623
  process.exit(1);
40510
40624
  }
40511
40625
  progress.info(`Found existing connection created: ${metadata.timestamp}`);
40512
40626
  console.log(`
40513
- ${pc61.bold("Current Configuration:")}
40627
+ ${pc62.bold("Current Configuration:")}
40514
40628
  `);
40515
40629
  if (metadata.services.sms.preset) {
40516
- console.log(` Preset: ${pc61.cyan(metadata.services.sms.preset)}`);
40630
+ console.log(` Preset: ${pc62.cyan(metadata.services.sms.preset)}`);
40517
40631
  } else {
40518
- console.log(` Preset: ${pc61.cyan("custom")}`);
40632
+ console.log(` Preset: ${pc62.cyan("custom")}`);
40519
40633
  }
40520
40634
  const config2 = metadata.services.sms.config;
40521
40635
  if (!config2) {
40522
- clack58.log.error("No SMS configuration found in metadata");
40523
- clack58.log.info(
40524
- `Use ${pc61.cyan("wraps sms init")} to create new infrastructure.`
40636
+ clack59.log.error("No SMS configuration found in metadata");
40637
+ clack59.log.info(
40638
+ `Use ${pc62.cyan("wraps sms init")} to create new infrastructure.`
40525
40639
  );
40526
40640
  process.exit(1);
40527
40641
  }
@@ -40533,45 +40647,45 @@ ${pc61.bold("Current Configuration:")}
40533
40647
  "short-code": "Short code ($995+/mo, 100+ MPS)"
40534
40648
  };
40535
40649
  console.log(
40536
- ` Phone Type: ${pc61.cyan(phoneTypeLabels2[config2.phoneNumberType] || config2.phoneNumberType)}`
40650
+ ` Phone Type: ${pc62.cyan(phoneTypeLabels2[config2.phoneNumberType] || config2.phoneNumberType)}`
40537
40651
  );
40538
40652
  }
40539
40653
  if (config2.tracking?.enabled) {
40540
- console.log(` ${pc61.green("\u2713")} Delivery Tracking`);
40654
+ console.log(` ${pc62.green("\u2713")} Delivery Tracking`);
40541
40655
  if (config2.tracking.linkTracking) {
40542
- console.log(` ${pc61.dim("\u2514\u2500")} Link click tracking enabled`);
40656
+ console.log(` ${pc62.dim("\u2514\u2500")} Link click tracking enabled`);
40543
40657
  }
40544
40658
  }
40545
40659
  if (config2.eventTracking?.enabled) {
40546
- console.log(` ${pc61.green("\u2713")} Event Tracking (SNS)`);
40660
+ console.log(` ${pc62.green("\u2713")} Event Tracking (SNS)`);
40547
40661
  if (config2.eventTracking.dynamoDBHistory) {
40548
40662
  console.log(
40549
- ` ${pc61.dim("\u2514\u2500")} Message History: ${pc61.cyan(config2.eventTracking.archiveRetention || "90days")}`
40663
+ ` ${pc62.dim("\u2514\u2500")} Message History: ${pc62.cyan(config2.eventTracking.archiveRetention || "90days")}`
40550
40664
  );
40551
40665
  }
40552
40666
  }
40553
40667
  if (config2.messageArchiving?.enabled) {
40554
40668
  console.log(
40555
- ` ${pc61.green("\u2713")} Message Archiving (${config2.messageArchiving.retention})`
40669
+ ` ${pc62.green("\u2713")} Message Archiving (${config2.messageArchiving.retention})`
40556
40670
  );
40557
40671
  }
40558
40672
  if (config2.optOutManagement) {
40559
- console.log(` ${pc61.green("\u2713")} Opt-out Management`);
40673
+ console.log(` ${pc62.green("\u2713")} Opt-out Management`);
40560
40674
  }
40561
40675
  if (config2.protectConfiguration?.enabled) {
40562
40676
  const countries = config2.protectConfiguration.allowedCountries?.join(", ") || "US";
40563
- console.log(` ${pc61.green("\u2713")} Fraud Protection`);
40564
- console.log(` ${pc61.dim("\u2514\u2500")} Allowed countries: ${pc61.cyan(countries)}`);
40677
+ console.log(` ${pc62.green("\u2713")} Fraud Protection`);
40678
+ console.log(` ${pc62.dim("\u2514\u2500")} Allowed countries: ${pc62.cyan(countries)}`);
40565
40679
  if (config2.protectConfiguration.aitFiltering) {
40566
- console.log(` ${pc61.dim("\u2514\u2500")} AIT filtering: ${pc61.cyan("enabled")}`);
40680
+ console.log(` ${pc62.dim("\u2514\u2500")} AIT filtering: ${pc62.cyan("enabled")}`);
40567
40681
  }
40568
40682
  } else {
40569
- console.log(` ${pc61.dim("\u25CB")} Fraud Protection (not configured)`);
40683
+ console.log(` ${pc62.dim("\u25CB")} Fraud Protection (not configured)`);
40570
40684
  }
40571
40685
  const currentCostData = calculateSMSCosts(config2, 1e4);
40572
40686
  console.log(
40573
40687
  `
40574
- Estimated Cost: ${pc61.cyan(`~${formatCost3(currentCostData.total.monthly)}/mo`)}`
40688
+ Estimated Cost: ${pc62.cyan(`~${formatCost3(currentCostData.total.monthly)}/mo`)}`
40575
40689
  );
40576
40690
  console.log("");
40577
40691
  const phoneTypeLabels = {
@@ -40580,7 +40694,7 @@ ${pc61.bold("Current Configuration:")}
40580
40694
  "10dlc": "10DLC",
40581
40695
  "short-code": "Short code"
40582
40696
  };
40583
- upgradeAction = await clack58.select({
40697
+ upgradeAction = await clack59.select({
40584
40698
  message: "What would you like to do?",
40585
40699
  options: [
40586
40700
  {
@@ -40620,8 +40734,8 @@ ${pc61.bold("Current Configuration:")}
40620
40734
  }
40621
40735
  ]
40622
40736
  });
40623
- if (clack58.isCancel(upgradeAction)) {
40624
- clack58.cancel("Upgrade cancelled.");
40737
+ if (clack59.isCancel(upgradeAction)) {
40738
+ clack59.cancel("Upgrade cancelled.");
40625
40739
  process.exit(0);
40626
40740
  }
40627
40741
  let updatedConfig = { ...config2 };
@@ -40662,65 +40776,65 @@ ${pc61.bold("Current Configuration:")}
40662
40776
  hint: p.hint
40663
40777
  }));
40664
40778
  if (availableTypes.length === 0) {
40665
- clack58.log.warn(
40779
+ clack59.log.warn(
40666
40780
  "Already on highest phone number tier. Contact AWS for dedicated short codes."
40667
40781
  );
40668
40782
  process.exit(0);
40669
40783
  }
40670
- const selectedType = await clack58.select({
40784
+ const selectedType = await clack59.select({
40671
40785
  message: "Select new phone number type:",
40672
40786
  options: availableTypes
40673
40787
  });
40674
- if (clack58.isCancel(selectedType)) {
40675
- clack58.cancel("Upgrade cancelled.");
40788
+ if (clack59.isCancel(selectedType)) {
40789
+ clack59.cancel("Upgrade cancelled.");
40676
40790
  process.exit(0);
40677
40791
  }
40678
40792
  if (selectedType === "toll-free") {
40679
40793
  console.log(
40680
40794
  `
40681
- ${pc61.yellow("\u26A0")} ${pc61.bold("Toll-free Registration Required")}
40795
+ ${pc62.yellow("\u26A0")} ${pc62.bold("Toll-free Registration Required")}
40682
40796
  `
40683
40797
  );
40684
40798
  console.log(
40685
- pc61.dim("Toll-free numbers require carrier registration before")
40799
+ pc62.dim("Toll-free numbers require carrier registration before")
40686
40800
  );
40687
40801
  console.log(
40688
- pc61.dim("they can send messages at scale. After deployment:\n")
40802
+ pc62.dim("they can send messages at scale. After deployment:\n")
40689
40803
  );
40690
40804
  console.log(
40691
- ` 1. Run ${pc61.cyan("wraps sms register")} to start registration`
40805
+ ` 1. Run ${pc62.cyan("wraps sms register")} to start registration`
40692
40806
  );
40693
40807
  console.log(" 2. Submit your business use case information");
40694
40808
  console.log(" 3. Wait for carrier verification (1-5 business days)");
40695
40809
  console.log(
40696
- pc61.dim("\nUntil verified, sending is limited to low volume.\n")
40810
+ pc62.dim("\nUntil verified, sending is limited to low volume.\n")
40697
40811
  );
40698
- const confirmTollFree = await clack58.confirm({
40812
+ const confirmTollFree = await clack59.confirm({
40699
40813
  message: "Continue with toll-free number request?",
40700
40814
  initialValue: true
40701
40815
  });
40702
- if (clack58.isCancel(confirmTollFree) || !confirmTollFree) {
40703
- clack58.cancel("Upgrade cancelled.");
40816
+ if (clack59.isCancel(confirmTollFree) || !confirmTollFree) {
40817
+ clack59.cancel("Upgrade cancelled.");
40704
40818
  process.exit(0);
40705
40819
  }
40706
40820
  }
40707
40821
  if (selectedType === "10dlc") {
40708
40822
  console.log(
40709
40823
  `
40710
- ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
40824
+ ${pc62.yellow("\u26A0")} ${pc62.bold("10DLC Campaign Registration Required")}
40711
40825
  `
40712
40826
  );
40713
- console.log(pc61.dim("10DLC requires brand and campaign registration:"));
40827
+ console.log(pc62.dim("10DLC requires brand and campaign registration:"));
40714
40828
  console.log(" \u2022 Brand registration: one-time $4 fee");
40715
40829
  console.log(" \u2022 Campaign registration: $15/mo per campaign");
40716
40830
  console.log(" \u2022 Verification takes 1-7 business days");
40717
40831
  console.log("");
40718
- const confirm10DLC = await clack58.confirm({
40832
+ const confirm10DLC = await clack59.confirm({
40719
40833
  message: "Continue with 10DLC number request?",
40720
40834
  initialValue: true
40721
40835
  });
40722
- if (clack58.isCancel(confirm10DLC) || !confirm10DLC) {
40723
- clack58.cancel("Upgrade cancelled.");
40836
+ if (clack59.isCancel(confirm10DLC) || !confirm10DLC) {
40837
+ clack59.cancel("Upgrade cancelled.");
40724
40838
  process.exit(0);
40725
40839
  }
40726
40840
  }
@@ -40745,15 +40859,15 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
40745
40859
  disabled: currentPresetIdx >= 0 && idx <= currentPresetIdx ? "Current or lower tier" : void 0
40746
40860
  })).filter((p) => !p.disabled && p.value !== "custom");
40747
40861
  if (availablePresets.length === 0) {
40748
- clack58.log.warn("Already on highest preset (Enterprise)");
40862
+ clack59.log.warn("Already on highest preset (Enterprise)");
40749
40863
  process.exit(0);
40750
40864
  }
40751
- const selectedPreset = await clack58.select({
40865
+ const selectedPreset = await clack59.select({
40752
40866
  message: "Select new preset:",
40753
40867
  options: availablePresets
40754
40868
  });
40755
- if (clack58.isCancel(selectedPreset)) {
40756
- clack58.cancel("Upgrade cancelled.");
40869
+ if (clack59.isCancel(selectedPreset)) {
40870
+ clack59.cancel("Upgrade cancelled.");
40757
40871
  process.exit(0);
40758
40872
  }
40759
40873
  const presetConfig = getSMSPreset(selectedPreset);
@@ -40769,7 +40883,7 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
40769
40883
  }
40770
40884
  case "event-tracking": {
40771
40885
  if (config2.eventTracking?.enabled) {
40772
- const eventAction = await clack58.select({
40886
+ const eventAction = await clack59.select({
40773
40887
  message: "What would you like to do with event tracking?",
40774
40888
  options: [
40775
40889
  {
@@ -40784,17 +40898,17 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
40784
40898
  }
40785
40899
  ]
40786
40900
  });
40787
- if (clack58.isCancel(eventAction)) {
40788
- clack58.cancel("Upgrade cancelled.");
40901
+ if (clack59.isCancel(eventAction)) {
40902
+ clack59.cancel("Upgrade cancelled.");
40789
40903
  process.exit(0);
40790
40904
  }
40791
40905
  if (eventAction === "disable") {
40792
- const confirmDisable = await clack58.confirm({
40906
+ const confirmDisable = await clack59.confirm({
40793
40907
  message: "Are you sure? Existing history will remain, but new events won't be tracked.",
40794
40908
  initialValue: false
40795
40909
  });
40796
- if (clack58.isCancel(confirmDisable) || !confirmDisable) {
40797
- clack58.cancel("Event tracking not disabled.");
40910
+ if (clack59.isCancel(confirmDisable) || !confirmDisable) {
40911
+ clack59.cancel("Event tracking not disabled.");
40798
40912
  process.exit(0);
40799
40913
  }
40800
40914
  updatedConfig = {
@@ -40804,7 +40918,7 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
40804
40918
  }
40805
40919
  };
40806
40920
  } else {
40807
- const retention = await clack58.select({
40921
+ const retention = await clack59.select({
40808
40922
  message: "Message history retention period:",
40809
40923
  options: [
40810
40924
  { value: "7days", label: "7 days", hint: "Minimal storage cost" },
@@ -40831,8 +40945,8 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
40831
40945
  ],
40832
40946
  initialValue: config2.eventTracking.archiveRetention || "90days"
40833
40947
  });
40834
- if (clack58.isCancel(retention)) {
40835
- clack58.cancel("Upgrade cancelled.");
40948
+ if (clack59.isCancel(retention)) {
40949
+ clack59.cancel("Upgrade cancelled.");
40836
40950
  process.exit(0);
40837
40951
  }
40838
40952
  updatedConfig = {
@@ -40844,19 +40958,19 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
40844
40958
  };
40845
40959
  }
40846
40960
  } else {
40847
- const enableTracking = await clack58.confirm({
40961
+ const enableTracking = await clack59.confirm({
40848
40962
  message: "Enable event tracking? (Track SMS events with history)",
40849
40963
  initialValue: true
40850
40964
  });
40851
- if (clack58.isCancel(enableTracking)) {
40852
- clack58.cancel("Upgrade cancelled.");
40965
+ if (clack59.isCancel(enableTracking)) {
40966
+ clack59.cancel("Upgrade cancelled.");
40853
40967
  process.exit(0);
40854
40968
  }
40855
40969
  if (!enableTracking) {
40856
- clack58.log.info("Event tracking not enabled.");
40970
+ clack59.log.info("Event tracking not enabled.");
40857
40971
  process.exit(0);
40858
40972
  }
40859
- const retention = await clack58.select({
40973
+ const retention = await clack59.select({
40860
40974
  message: "Message history retention period:",
40861
40975
  options: [
40862
40976
  { value: "7days", label: "7 days", hint: "Minimal storage cost" },
@@ -40879,8 +40993,8 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
40879
40993
  ],
40880
40994
  initialValue: "90days"
40881
40995
  });
40882
- if (clack58.isCancel(retention)) {
40883
- clack58.cancel("Upgrade cancelled.");
40996
+ if (clack59.isCancel(retention)) {
40997
+ clack59.cancel("Upgrade cancelled.");
40884
40998
  process.exit(0);
40885
40999
  }
40886
41000
  updatedConfig = {
@@ -40899,12 +41013,12 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
40899
41013
  }
40900
41014
  case "retention": {
40901
41015
  if (!config2.eventTracking?.enabled) {
40902
- clack58.log.error(
41016
+ clack59.log.error(
40903
41017
  "Event tracking is not enabled. Enable it first to change retention."
40904
41018
  );
40905
41019
  process.exit(1);
40906
41020
  }
40907
- const retention = await clack58.select({
41021
+ const retention = await clack59.select({
40908
41022
  message: "Message history retention period (event data in DynamoDB):",
40909
41023
  options: [
40910
41024
  { value: "7days", label: "7 days", hint: "Minimal storage cost" },
@@ -40923,8 +41037,8 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
40923
41037
  ],
40924
41038
  initialValue: config2.eventTracking.archiveRetention || "90days"
40925
41039
  });
40926
- if (clack58.isCancel(retention)) {
40927
- clack58.cancel("Upgrade cancelled.");
41040
+ if (clack59.isCancel(retention)) {
41041
+ clack59.cancel("Upgrade cancelled.");
40928
41042
  process.exit(0);
40929
41043
  }
40930
41044
  updatedConfig = {
@@ -40942,21 +41056,21 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
40942
41056
  case "link-tracking": {
40943
41057
  const enableLinkTracking = !config2.tracking?.linkTracking;
40944
41058
  if (enableLinkTracking) {
40945
- clack58.log.info(
40946
- pc61.dim(
41059
+ clack59.log.info(
41060
+ pc62.dim(
40947
41061
  "Link tracking will track clicks on URLs in your SMS messages."
40948
41062
  )
40949
41063
  );
40950
- clack58.log.info(
40951
- pc61.dim("URLs will be rewritten to go through a tracking endpoint.")
41064
+ clack59.log.info(
41065
+ pc62.dim("URLs will be rewritten to go through a tracking endpoint.")
40952
41066
  );
40953
41067
  }
40954
- const confirmed = await clack58.confirm({
41068
+ const confirmed = await clack59.confirm({
40955
41069
  message: enableLinkTracking ? "Enable link click tracking?" : "Disable link click tracking?",
40956
41070
  initialValue: enableLinkTracking
40957
41071
  });
40958
- if (clack58.isCancel(confirmed) || !confirmed) {
40959
- clack58.cancel("Upgrade cancelled.");
41072
+ if (clack59.isCancel(confirmed) || !confirmed) {
41073
+ clack59.cancel("Upgrade cancelled.");
40960
41074
  process.exit(0);
40961
41075
  }
40962
41076
  updatedConfig = {
@@ -40973,7 +41087,7 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
40973
41087
  }
40974
41088
  case "archiving": {
40975
41089
  if (config2.messageArchiving?.enabled) {
40976
- const archivingAction = await clack58.select({
41090
+ const archivingAction = await clack59.select({
40977
41091
  message: "What would you like to do with message archiving?",
40978
41092
  options: [
40979
41093
  {
@@ -40988,17 +41102,17 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
40988
41102
  }
40989
41103
  ]
40990
41104
  });
40991
- if (clack58.isCancel(archivingAction)) {
40992
- clack58.cancel("Upgrade cancelled.");
41105
+ if (clack59.isCancel(archivingAction)) {
41106
+ clack59.cancel("Upgrade cancelled.");
40993
41107
  process.exit(0);
40994
41108
  }
40995
41109
  if (archivingAction === "disable") {
40996
- const confirmDisable = await clack58.confirm({
41110
+ const confirmDisable = await clack59.confirm({
40997
41111
  message: "Are you sure? Existing archived messages will remain, but new messages won't be archived.",
40998
41112
  initialValue: false
40999
41113
  });
41000
- if (clack58.isCancel(confirmDisable) || !confirmDisable) {
41001
- clack58.cancel("Archiving not disabled.");
41114
+ if (clack59.isCancel(confirmDisable) || !confirmDisable) {
41115
+ clack59.cancel("Archiving not disabled.");
41002
41116
  process.exit(0);
41003
41117
  }
41004
41118
  updatedConfig = {
@@ -41009,7 +41123,7 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
41009
41123
  }
41010
41124
  };
41011
41125
  } else {
41012
- const retention = await clack58.select({
41126
+ const retention = await clack59.select({
41013
41127
  message: "Message archive retention period:",
41014
41128
  options: [
41015
41129
  {
@@ -41040,8 +41154,8 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
41040
41154
  ],
41041
41155
  initialValue: config2.messageArchiving.retention
41042
41156
  });
41043
- if (clack58.isCancel(retention)) {
41044
- clack58.cancel("Upgrade cancelled.");
41157
+ if (clack59.isCancel(retention)) {
41158
+ clack59.cancel("Upgrade cancelled.");
41045
41159
  process.exit(0);
41046
41160
  }
41047
41161
  updatedConfig = {
@@ -41053,19 +41167,19 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
41053
41167
  };
41054
41168
  }
41055
41169
  } else {
41056
- const enableArchiving = await clack58.confirm({
41170
+ const enableArchiving = await clack59.confirm({
41057
41171
  message: "Enable message archiving? (Store full message content for viewing)",
41058
41172
  initialValue: true
41059
41173
  });
41060
- if (clack58.isCancel(enableArchiving)) {
41061
- clack58.cancel("Upgrade cancelled.");
41174
+ if (clack59.isCancel(enableArchiving)) {
41175
+ clack59.cancel("Upgrade cancelled.");
41062
41176
  process.exit(0);
41063
41177
  }
41064
41178
  if (!enableArchiving) {
41065
- clack58.log.info("Message archiving not enabled.");
41179
+ clack59.log.info("Message archiving not enabled.");
41066
41180
  process.exit(0);
41067
41181
  }
41068
- const retention = await clack58.select({
41182
+ const retention = await clack59.select({
41069
41183
  message: "Message archive retention period:",
41070
41184
  options: [
41071
41185
  { value: "7days", label: "7 days", hint: "~$1-2/mo for 10k msgs" },
@@ -41092,8 +41206,8 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
41092
41206
  ],
41093
41207
  initialValue: "90days"
41094
41208
  });
41095
- if (clack58.isCancel(retention)) {
41096
- clack58.cancel("Upgrade cancelled.");
41209
+ if (clack59.isCancel(retention)) {
41210
+ clack59.cancel("Upgrade cancelled.");
41097
41211
  process.exit(0);
41098
41212
  }
41099
41213
  updatedConfig = {
@@ -41125,7 +41239,7 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
41125
41239
  const currentAllowed = config2.protectConfiguration?.allowedCountries || [
41126
41240
  "US"
41127
41241
  ];
41128
- const selectedCountries = await clack58.multiselect({
41242
+ const selectedCountries = await clack59.multiselect({
41129
41243
  message: "Select countries to allow SMS delivery (all others blocked):",
41130
41244
  options: commonCountries.map((c) => ({
41131
41245
  value: c.code,
@@ -41134,16 +41248,16 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
41134
41248
  initialValues: currentAllowed,
41135
41249
  required: true
41136
41250
  });
41137
- if (clack58.isCancel(selectedCountries)) {
41138
- clack58.cancel("Upgrade cancelled.");
41251
+ if (clack59.isCancel(selectedCountries)) {
41252
+ clack59.cancel("Upgrade cancelled.");
41139
41253
  process.exit(0);
41140
41254
  }
41141
- const enableAIT = await clack58.confirm({
41255
+ const enableAIT = await clack59.confirm({
41142
41256
  message: "Enable AIT (Artificially Inflated Traffic) filtering? (adds per-message cost)",
41143
41257
  initialValue: config2.protectConfiguration?.aitFiltering ?? false
41144
41258
  });
41145
- if (clack58.isCancel(enableAIT)) {
41146
- clack58.cancel("Upgrade cancelled.");
41259
+ if (clack59.isCancel(enableAIT)) {
41260
+ clack59.cancel("Upgrade cancelled.");
41147
41261
  process.exit(0);
41148
41262
  }
41149
41263
  updatedConfig = {
@@ -41161,28 +41275,28 @@ ${pc61.yellow("\u26A0")} ${pc61.bold("10DLC Campaign Registration Required")}
41161
41275
  const newCostData = calculateSMSCosts(updatedConfig, 1e4);
41162
41276
  const costDiff = newCostData.total.monthly - currentCostData.total.monthly;
41163
41277
  console.log(`
41164
- ${pc61.bold("Cost Impact:")}`);
41278
+ ${pc62.bold("Cost Impact:")}`);
41165
41279
  console.log(
41166
- ` Current: ${pc61.cyan(`${formatCost3(currentCostData.total.monthly)}/mo`)}`
41280
+ ` Current: ${pc62.cyan(`${formatCost3(currentCostData.total.monthly)}/mo`)}`
41167
41281
  );
41168
41282
  console.log(
41169
- ` New: ${pc61.cyan(`${formatCost3(newCostData.total.monthly)}/mo`)}`
41283
+ ` New: ${pc62.cyan(`${formatCost3(newCostData.total.monthly)}/mo`)}`
41170
41284
  );
41171
41285
  if (costDiff > 0) {
41172
- console.log(` Change: ${pc61.yellow(`+${formatCost3(costDiff)}/mo`)}`);
41286
+ console.log(` Change: ${pc62.yellow(`+${formatCost3(costDiff)}/mo`)}`);
41173
41287
  } else if (costDiff < 0) {
41174
41288
  console.log(
41175
- ` Change: ${pc61.green(`-${formatCost3(Math.abs(costDiff))}/mo`)}`
41289
+ ` Change: ${pc62.green(`-${formatCost3(Math.abs(costDiff))}/mo`)}`
41176
41290
  );
41177
41291
  }
41178
41292
  console.log("");
41179
41293
  if (!(options.yes || options.preview)) {
41180
- const confirmed = await clack58.confirm({
41294
+ const confirmed = await clack59.confirm({
41181
41295
  message: "Proceed with upgrade?",
41182
41296
  initialValue: true
41183
41297
  });
41184
- if (clack58.isCancel(confirmed) || !confirmed) {
41185
- clack58.cancel("Upgrade cancelled.");
41298
+ if (clack59.isCancel(confirmed) || !confirmed) {
41299
+ clack59.cancel("Upgrade cancelled.");
41186
41300
  process.exit(0);
41187
41301
  }
41188
41302
  }
@@ -41251,8 +41365,8 @@ ${pc61.bold("Cost Impact:")}`);
41251
41365
  resourceChanges: previewResult.resourceChanges,
41252
41366
  commandName: "wraps sms upgrade"
41253
41367
  });
41254
- clack58.outro(
41255
- pc61.green("Preview complete. Run without --preview to upgrade.")
41368
+ clack59.outro(
41369
+ pc62.green("Preview complete. Run without --preview to upgrade.")
41256
41370
  );
41257
41371
  trackServiceUpgrade("sms", {
41258
41372
  region,
@@ -41357,43 +41471,43 @@ ${pc61.bold("Cost Impact:")}`);
41357
41471
  }
41358
41472
  progress.info("Connection metadata updated");
41359
41473
  console.log("\n");
41360
- clack58.log.success(pc61.green(pc61.bold("SMS infrastructure upgraded!")));
41474
+ clack59.log.success(pc62.green(pc62.bold("SMS infrastructure upgraded!")));
41361
41475
  console.log("\n");
41362
- clack58.note(
41476
+ clack59.note(
41363
41477
  [
41364
- `${pc61.bold("Phone Number:")} ${pc61.cyan(outputs.phoneNumber || "Provisioning...")}`,
41365
- `${pc61.bold("Phone Type:")} ${pc61.cyan(updatedConfig.phoneNumberType || "simulator")}`,
41366
- `${pc61.bold("Config Set:")} ${pc61.cyan(outputs.configSetName || "wraps-sms-config")}`,
41367
- `${pc61.bold("Region:")} ${pc61.cyan(outputs.region)}`,
41368
- outputs.tableName ? `${pc61.bold("History Table:")} ${pc61.cyan(outputs.tableName)}` : "",
41478
+ `${pc62.bold("Phone Number:")} ${pc62.cyan(outputs.phoneNumber || "Provisioning...")}`,
41479
+ `${pc62.bold("Phone Type:")} ${pc62.cyan(updatedConfig.phoneNumberType || "simulator")}`,
41480
+ `${pc62.bold("Config Set:")} ${pc62.cyan(outputs.configSetName || "wraps-sms-config")}`,
41481
+ `${pc62.bold("Region:")} ${pc62.cyan(outputs.region)}`,
41482
+ outputs.tableName ? `${pc62.bold("History Table:")} ${pc62.cyan(outputs.tableName)}` : "",
41369
41483
  "",
41370
- pc61.dim("IAM Role:"),
41371
- pc61.dim(` ${outputs.roleArn}`)
41484
+ pc62.dim("IAM Role:"),
41485
+ pc62.dim(` ${outputs.roleArn}`)
41372
41486
  ].filter(Boolean).join("\n"),
41373
41487
  "SMS Infrastructure"
41374
41488
  );
41375
41489
  console.log(`
41376
- ${pc61.green("\u2713")} ${pc61.bold("Upgrade complete!")}
41490
+ ${pc62.green("\u2713")} ${pc62.bold("Upgrade complete!")}
41377
41491
  `);
41378
41492
  if (upgradeAction === "phone-number") {
41379
41493
  console.log(
41380
- `Upgraded to ${pc61.cyan(updatedConfig.phoneNumberType)} number (${pc61.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
41494
+ `Upgraded to ${pc62.cyan(updatedConfig.phoneNumberType)} number (${pc62.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
41381
41495
  `
41382
41496
  );
41383
41497
  if (updatedConfig.phoneNumberType === "toll-free") {
41384
- console.log(`${pc61.bold("Next Steps:")}`);
41498
+ console.log(`${pc62.bold("Next Steps:")}`);
41385
41499
  console.log(
41386
- ` 1. Run ${pc61.cyan("wraps sms register")} to start toll-free registration`
41500
+ ` 1. Run ${pc62.cyan("wraps sms register")} to start toll-free registration`
41387
41501
  );
41388
41502
  console.log(" 2. Submit your business information and use case");
41389
41503
  console.log(" 3. Wait for carrier verification (1-5 business days)");
41390
41504
  console.log("");
41391
41505
  console.log(
41392
- pc61.dim("Until verified, your number can only send limited messages.")
41506
+ pc62.dim("Until verified, your number can only send limited messages.")
41393
41507
  );
41394
41508
  console.log("");
41395
41509
  } else if (updatedConfig.phoneNumberType === "10dlc") {
41396
- console.log(`${pc61.bold("Next Steps:")}`);
41510
+ console.log(`${pc62.bold("Next Steps:")}`);
41397
41511
  console.log(" 1. Register your brand in the AWS Console");
41398
41512
  console.log(" 2. Create a 10DLC campaign for your use case");
41399
41513
  console.log(" 3. Wait for campaign approval (1-7 business days)");
@@ -41401,16 +41515,16 @@ ${pc61.green("\u2713")} ${pc61.bold("Upgrade complete!")}
41401
41515
  }
41402
41516
  } else if (upgradeAction === "preset" && newPreset) {
41403
41517
  console.log(
41404
- `Upgraded to ${pc61.cyan(newPreset)} preset (${pc61.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
41518
+ `Upgraded to ${pc62.cyan(newPreset)} preset (${pc62.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
41405
41519
  `
41406
41520
  );
41407
41521
  } else {
41408
41522
  console.log(
41409
- `Updated configuration (${pc61.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
41523
+ `Updated configuration (${pc62.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
41410
41524
  `
41411
41525
  );
41412
41526
  }
41413
- console.log(pc61.dim(getSMSCostSummary(updatedConfig, 1e4)));
41527
+ console.log(pc62.dim(getSMSCostSummary(updatedConfig, 1e4)));
41414
41528
  const enabledFeatures = [];
41415
41529
  if (updatedConfig.tracking?.enabled) {
41416
41530
  enabledFeatures.push("tracking");
@@ -41434,7 +41548,7 @@ ${pc61.green("\u2713")} ${pc61.bold("Upgrade complete!")}
41434
41548
  action: typeof upgradeAction === "string" ? upgradeAction : void 0,
41435
41549
  duration_ms: Date.now() - startTime
41436
41550
  });
41437
- clack58.outro(pc61.green("Upgrade complete!"));
41551
+ clack59.outro(pc62.green("Upgrade complete!"));
41438
41552
  }
41439
41553
 
41440
41554
  // src/commands/sms/verify-number.ts
@@ -41453,13 +41567,13 @@ import {
41453
41567
  SendDestinationNumberVerificationCodeCommand,
41454
41568
  VerifyDestinationNumberCommand
41455
41569
  } from "@aws-sdk/client-pinpoint-sms-voice-v2";
41456
- import * as clack59 from "@clack/prompts";
41457
- import pc62 from "picocolors";
41570
+ import * as clack60 from "@clack/prompts";
41571
+ import pc63 from "picocolors";
41458
41572
  async function smsVerifyNumber(options) {
41459
41573
  const startTime = Date.now();
41460
41574
  const progress = new DeploymentProgress();
41461
41575
  if (!isJsonMode()) {
41462
- clack59.intro(pc62.bold("Wraps SMS - Verify Destination Number"));
41576
+ clack60.intro(pc63.bold("Wraps SMS - Verify Destination Number"));
41463
41577
  }
41464
41578
  const identity = await progress.execute(
41465
41579
  "Validating AWS credentials",
@@ -41469,10 +41583,10 @@ async function smsVerifyNumber(options) {
41469
41583
  const metadata = await loadConnectionMetadata(identity.accountId, region);
41470
41584
  if (!metadata?.services?.sms) {
41471
41585
  progress.stop();
41472
- clack59.log.error("No SMS infrastructure found");
41586
+ clack60.log.error("No SMS infrastructure found");
41473
41587
  console.log(
41474
41588
  `
41475
- Run ${pc62.cyan("wraps sms init")} to deploy SMS infrastructure.
41589
+ Run ${pc63.cyan("wraps sms init")} to deploy SMS infrastructure.
41476
41590
  `
41477
41591
  );
41478
41592
  process.exit(1);
@@ -41486,19 +41600,19 @@ Run ${pc62.cyan("wraps sms init")} to deploy SMS infrastructure.
41486
41600
  );
41487
41601
  progress.stop();
41488
41602
  if (!response.VerifiedDestinationNumbers || response.VerifiedDestinationNumbers.length === 0) {
41489
- clack59.log.info("No verified destination numbers found");
41603
+ clack60.log.info("No verified destination numbers found");
41490
41604
  console.log(
41491
41605
  `
41492
- Run ${pc62.cyan("wraps sms verify-number")} to verify a number.
41606
+ Run ${pc63.cyan("wraps sms verify-number")} to verify a number.
41493
41607
  `
41494
41608
  );
41495
41609
  } else {
41496
41610
  console.log("\n");
41497
- clack59.log.info(pc62.bold("Verified Destination Numbers:"));
41611
+ clack60.log.info(pc63.bold("Verified Destination Numbers:"));
41498
41612
  console.log("");
41499
41613
  for (const num of response.VerifiedDestinationNumbers) {
41500
- const status2 = num.Status === "VERIFIED" ? pc62.green("\u2713 Verified") : pc62.yellow("\u29D6 Pending");
41501
- console.log(` ${pc62.cyan(num.DestinationPhoneNumber)} - ${status2}`);
41614
+ const status2 = num.Status === "VERIFIED" ? pc63.green("\u2713 Verified") : pc63.yellow("\u29D6 Pending");
41615
+ console.log(` ${pc63.cyan(num.DestinationPhoneNumber)} - ${status2}`);
41502
41616
  }
41503
41617
  console.log("");
41504
41618
  }
@@ -41516,7 +41630,7 @@ Run ${pc62.cyan("wraps sms verify-number")} to verify a number.
41516
41630
  });
41517
41631
  return;
41518
41632
  }
41519
- clack59.outro(pc62.green("Done!"));
41633
+ clack60.outro(pc63.green("Done!"));
41520
41634
  return;
41521
41635
  } catch (error) {
41522
41636
  progress.stop();
@@ -41524,7 +41638,7 @@ Run ${pc62.cyan("wraps sms verify-number")} to verify a number.
41524
41638
  trackError("SMS_LIST_VERIFIED_FAILED", "sms:verify-number:list", {
41525
41639
  error: errorMessage
41526
41640
  });
41527
- clack59.log.error(`Failed to list verified numbers: ${errorMessage}`);
41641
+ clack60.log.error(`Failed to list verified numbers: ${errorMessage}`);
41528
41642
  process.exit(1);
41529
41643
  }
41530
41644
  }
@@ -41532,10 +41646,10 @@ Run ${pc62.cyan("wraps sms verify-number")} to verify a number.
41532
41646
  const phoneNumber2 = options.phoneNumber;
41533
41647
  if (!phoneNumber2) {
41534
41648
  progress.stop();
41535
- clack59.log.error("Phone number is required for deletion");
41649
+ clack60.log.error("Phone number is required for deletion");
41536
41650
  console.log(
41537
41651
  `
41538
- Usage: ${pc62.cyan("wraps sms verify-number --delete --phone-number +14155551234")}
41652
+ Usage: ${pc63.cyan("wraps sms verify-number --delete --phone-number +14155551234")}
41539
41653
  `
41540
41654
  );
41541
41655
  process.exit(1);
@@ -41549,7 +41663,7 @@ Usage: ${pc62.cyan("wraps sms verify-number --delete --phone-number +14155551234
41549
41663
  const verifiedNumber = listResponse.VerifiedDestinationNumbers?.[0];
41550
41664
  if (!verifiedNumber?.VerifiedDestinationNumberId) {
41551
41665
  progress.stop();
41552
- clack59.log.error(`Number ${phoneNumber2} is not in verified list`);
41666
+ clack60.log.error(`Number ${phoneNumber2} is not in verified list`);
41553
41667
  process.exit(1);
41554
41668
  }
41555
41669
  await progress.execute(`Removing ${phoneNumber2}`, async () => {
@@ -41560,7 +41674,7 @@ Usage: ${pc62.cyan("wraps sms verify-number --delete --phone-number +14155551234
41560
41674
  );
41561
41675
  });
41562
41676
  progress.stop();
41563
- clack59.log.success(`Removed ${pc62.cyan(phoneNumber2)} from verified list`);
41677
+ clack60.log.success(`Removed ${pc63.cyan(phoneNumber2)} from verified list`);
41564
41678
  trackCommand("sms:verify-number:delete", {
41565
41679
  success: true,
41566
41680
  duration_ms: Date.now() - startTime
@@ -41572,7 +41686,7 @@ Usage: ${pc62.cyan("wraps sms verify-number --delete --phone-number +14155551234
41572
41686
  });
41573
41687
  return;
41574
41688
  }
41575
- clack59.outro(pc62.green("Done!"));
41689
+ clack60.outro(pc63.green("Done!"));
41576
41690
  return;
41577
41691
  } catch (error) {
41578
41692
  progress.stop();
@@ -41580,7 +41694,7 @@ Usage: ${pc62.cyan("wraps sms verify-number --delete --phone-number +14155551234
41580
41694
  trackError("SMS_DELETE_VERIFIED_FAILED", "sms:verify-number:delete", {
41581
41695
  error: errorMessage
41582
41696
  });
41583
- clack59.log.error(`Failed to delete verified number: ${errorMessage}`);
41697
+ clack60.log.error(`Failed to delete verified number: ${errorMessage}`);
41584
41698
  process.exit(1);
41585
41699
  }
41586
41700
  }
@@ -41593,7 +41707,7 @@ Usage: ${pc62.cyan("wraps sms verify-number --delete --phone-number +14155551234
41593
41707
  );
41594
41708
  }
41595
41709
  if (!phoneNumber) {
41596
- const result = await clack59.text({
41710
+ const result = await clack60.text({
41597
41711
  message: "Enter phone number to verify (E.164 format):",
41598
41712
  placeholder: "+14155551234",
41599
41713
  validate: (value) => {
@@ -41606,14 +41720,14 @@ Usage: ${pc62.cyan("wraps sms verify-number --delete --phone-number +14155551234
41606
41720
  return;
41607
41721
  }
41608
41722
  });
41609
- if (clack59.isCancel(result)) {
41610
- clack59.cancel("Operation cancelled.");
41723
+ if (clack60.isCancel(result)) {
41724
+ clack60.cancel("Operation cancelled.");
41611
41725
  process.exit(0);
41612
41726
  }
41613
41727
  phoneNumber = result;
41614
41728
  } else if (!isValidPhoneNumber(phoneNumber)) {
41615
41729
  progress.stop();
41616
- clack59.log.error(
41730
+ clack60.log.error(
41617
41731
  `Invalid phone number format: ${phoneNumber}. Use E.164 format (e.g., +14155551234)`
41618
41732
  );
41619
41733
  process.exit(1);
@@ -41628,7 +41742,7 @@ Usage: ${pc62.cyan("wraps sms verify-number --delete --phone-number +14155551234
41628
41742
  const verifiedNumber = listResponse.VerifiedDestinationNumbers?.[0];
41629
41743
  if (!verifiedNumber?.VerifiedDestinationNumberId) {
41630
41744
  progress.stop();
41631
- clack59.log.error(
41745
+ clack60.log.error(
41632
41746
  `Number ${phoneNumber} not found. Run without --code first.`
41633
41747
  );
41634
41748
  process.exit(1);
@@ -41643,12 +41757,12 @@ Usage: ${pc62.cyan("wraps sms verify-number --delete --phone-number +14155551234
41643
41757
  });
41644
41758
  progress.stop();
41645
41759
  console.log("\n");
41646
- clack59.log.success(
41647
- pc62.green(`Phone number ${pc62.cyan(phoneNumber)} verified!`)
41760
+ clack60.log.success(
41761
+ pc63.green(`Phone number ${pc63.cyan(phoneNumber)} verified!`)
41648
41762
  );
41649
41763
  console.log("");
41650
41764
  console.log(
41651
- `You can now send test messages to this number with ${pc62.cyan("wraps sms test")}`
41765
+ `You can now send test messages to this number with ${pc63.cyan("wraps sms test")}`
41652
41766
  );
41653
41767
  trackCommand("sms:verify-number:confirm", {
41654
41768
  success: true,
@@ -41661,23 +41775,23 @@ Usage: ${pc62.cyan("wraps sms verify-number --delete --phone-number +14155551234
41661
41775
  });
41662
41776
  return;
41663
41777
  }
41664
- clack59.outro(pc62.green("Verification complete!"));
41778
+ clack60.outro(pc63.green("Verification complete!"));
41665
41779
  return;
41666
41780
  } catch (error) {
41667
41781
  progress.stop();
41668
41782
  const errorMessage = error instanceof Error ? error.message : String(error);
41669
41783
  if (errorMessage.includes("Invalid verification code")) {
41670
- clack59.log.error("Invalid verification code. Please try again.");
41784
+ clack60.log.error("Invalid verification code. Please try again.");
41671
41785
  console.log(
41672
41786
  `
41673
- Run ${pc62.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`)} to get a new code.
41787
+ Run ${pc63.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`)} to get a new code.
41674
41788
  `
41675
41789
  );
41676
41790
  } else {
41677
41791
  trackError("SMS_VERIFY_CODE_FAILED", "sms:verify-number:confirm", {
41678
41792
  error: errorMessage
41679
41793
  });
41680
- clack59.log.error(`Verification failed: ${errorMessage}`);
41794
+ clack60.log.error(`Verification failed: ${errorMessage}`);
41681
41795
  }
41682
41796
  process.exit(1);
41683
41797
  }
@@ -41692,7 +41806,7 @@ Run ${pc62.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
41692
41806
  const verifiedNumber = listResponse.VerifiedDestinationNumbers?.[0];
41693
41807
  if (!verifiedNumber?.VerifiedDestinationNumberId) {
41694
41808
  progress.stop();
41695
- clack59.log.error(
41809
+ clack60.log.error(
41696
41810
  `Number ${phoneNumber} not found. Run without --resend first.`
41697
41811
  );
41698
41812
  process.exit(1);
@@ -41706,11 +41820,11 @@ Run ${pc62.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
41706
41820
  );
41707
41821
  });
41708
41822
  progress.stop();
41709
- clack59.log.success(`Verification code resent to ${pc62.cyan(phoneNumber)}`);
41823
+ clack60.log.success(`Verification code resent to ${pc63.cyan(phoneNumber)}`);
41710
41824
  console.log("");
41711
41825
  console.log(
41712
41826
  `Once you receive the code, run:
41713
- ${pc62.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`
41827
+ ${pc63.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`
41714
41828
  );
41715
41829
  trackCommand("sms:verify-number:resend", {
41716
41830
  success: true,
@@ -41723,7 +41837,7 @@ Run ${pc62.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
41723
41837
  });
41724
41838
  return;
41725
41839
  }
41726
- clack59.outro(pc62.green("Code sent!"));
41840
+ clack60.outro(pc63.green("Code sent!"));
41727
41841
  return;
41728
41842
  } catch (error) {
41729
41843
  progress.stop();
@@ -41731,7 +41845,7 @@ Run ${pc62.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
41731
41845
  trackError("SMS_RESEND_CODE_FAILED", "sms:verify-number:resend", {
41732
41846
  error: errorMessage
41733
41847
  });
41734
- clack59.log.error(`Failed to resend code: ${errorMessage}`);
41848
+ clack60.log.error(`Failed to resend code: ${errorMessage}`);
41735
41849
  process.exit(1);
41736
41850
  }
41737
41851
  }
@@ -41751,10 +41865,10 @@ Run ${pc62.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
41751
41865
  });
41752
41866
  return;
41753
41867
  }
41754
- clack59.log.info(
41755
- `Number ${pc62.cyan(phoneNumber)} is already verified and ready to use!`
41868
+ clack60.log.info(
41869
+ `Number ${pc63.cyan(phoneNumber)} is already verified and ready to use!`
41756
41870
  );
41757
- clack59.outro(pc62.green("Done!"));
41871
+ clack60.outro(pc63.green("Done!"));
41758
41872
  return;
41759
41873
  }
41760
41874
  if (existingNumber?.Status === "PENDING") {
@@ -41778,15 +41892,15 @@ Run ${pc62.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
41778
41892
  });
41779
41893
  return;
41780
41894
  }
41781
- clack59.log.info(
41782
- `Verification already in progress. New code sent to ${pc62.cyan(phoneNumber)}`
41895
+ clack60.log.info(
41896
+ `Verification already in progress. New code sent to ${pc63.cyan(phoneNumber)}`
41783
41897
  );
41784
41898
  console.log("");
41785
41899
  console.log(
41786
41900
  `Once you receive the code, run:
41787
- ${pc62.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`
41901
+ ${pc63.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`
41788
41902
  );
41789
- clack59.outro(pc62.green("Code sent!"));
41903
+ clack60.outro(pc63.green("Code sent!"));
41790
41904
  return;
41791
41905
  }
41792
41906
  const createResponse = await progress.execute(
@@ -41807,18 +41921,18 @@ Run ${pc62.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
41807
41921
  });
41808
41922
  progress.stop();
41809
41923
  console.log("\n");
41810
- clack59.log.success(
41811
- `Verification code sent to ${pc62.cyan(phoneNumber)} via SMS`
41924
+ clack60.log.success(
41925
+ `Verification code sent to ${pc63.cyan(phoneNumber)} via SMS`
41812
41926
  );
41813
41927
  console.log("");
41814
- clack59.note(
41928
+ clack60.note(
41815
41929
  [
41816
41930
  "1. Check your phone for the verification code",
41817
41931
  "",
41818
41932
  "2. Complete verification with:",
41819
- ` ${pc62.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`,
41933
+ ` ${pc63.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`,
41820
41934
  "",
41821
- pc62.dim("The code expires in 24 hours")
41935
+ pc63.dim("The code expires in 24 hours")
41822
41936
  ].join("\n"),
41823
41937
  "Next Steps"
41824
41938
  );
@@ -41834,22 +41948,22 @@ Run ${pc62.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
41834
41948
  });
41835
41949
  return;
41836
41950
  }
41837
- clack59.outro(pc62.green("Verification started!"));
41951
+ clack60.outro(pc63.green("Verification started!"));
41838
41952
  } catch (error) {
41839
41953
  progress.stop();
41840
41954
  const errorMessage = error instanceof Error ? error.message : String(error);
41841
41955
  if (errorMessage.includes("already exists")) {
41842
- clack59.log.error("This number is already being verified");
41956
+ clack60.log.error("This number is already being verified");
41843
41957
  console.log(
41844
41958
  `
41845
- Run ${pc62.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`)} to get a new code.
41959
+ Run ${pc63.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`)} to get a new code.
41846
41960
  `
41847
41961
  );
41848
41962
  } else {
41849
41963
  trackError("SMS_CREATE_VERIFIED_FAILED", "sms:verify-number:start", {
41850
41964
  error: errorMessage
41851
41965
  });
41852
- clack59.log.error(`Failed to start verification: ${errorMessage}`);
41966
+ clack60.log.error(`Failed to start verification: ${errorMessage}`);
41853
41967
  }
41854
41968
  process.exit(1);
41855
41969
  }
@@ -41858,88 +41972,88 @@ Run ${pc62.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
41858
41972
  // src/commands/support.ts
41859
41973
  init_esm_shims();
41860
41974
  init_events();
41861
- import * as clack60 from "@clack/prompts";
41862
- import pc63 from "picocolors";
41975
+ import * as clack61 from "@clack/prompts";
41976
+ import pc64 from "picocolors";
41863
41977
  async function support() {
41864
41978
  trackCommand("support", { success: true });
41865
- clack60.intro(pc63.bold("Get Help with Wraps"));
41979
+ clack61.intro(pc64.bold("Get Help with Wraps"));
41866
41980
  console.log();
41867
- console.log(` ${pc63.bold("Email:")} ${pc63.cyan("hey@wraps.sh")}`);
41981
+ console.log(` ${pc64.bold("Email:")} ${pc64.cyan("hey@wraps.sh")}`);
41868
41982
  console.log(
41869
- ` ${pc63.bold("GitHub:")} ${pc63.cyan("https://github.com/wraps-dev/wraps/issues")}`
41983
+ ` ${pc64.bold("GitHub:")} ${pc64.cyan("https://github.com/wraps-dev/wraps/issues")}`
41870
41984
  );
41871
- console.log(` ${pc63.bold("Docs:")} ${pc63.cyan("https://wraps.dev/docs")}`);
41985
+ console.log(` ${pc64.bold("Docs:")} ${pc64.cyan("https://wraps.dev/docs")}`);
41872
41986
  console.log();
41873
- console.log(pc63.dim(" Response time: Usually within 24 hours"));
41987
+ console.log(pc64.dim(" Response time: Usually within 24 hours"));
41874
41988
  console.log();
41875
41989
  }
41876
41990
 
41877
41991
  // src/commands/telemetry.ts
41878
41992
  init_esm_shims();
41879
41993
  init_client();
41880
- import * as clack61 from "@clack/prompts";
41881
- import pc64 from "picocolors";
41994
+ import * as clack62 from "@clack/prompts";
41995
+ import pc65 from "picocolors";
41882
41996
  async function telemetryEnable() {
41883
41997
  const client = getTelemetryClient();
41884
41998
  const override = client.enable();
41885
41999
  if (override) {
41886
- clack61.log.warn(
42000
+ clack62.log.warn(
41887
42001
  "Telemetry enabled in config, but overridden by environment"
41888
42002
  );
41889
- console.log(` Reason: ${pc64.yellow(override)}`);
41890
- console.log(` Config: ${pc64.dim(client.getConfigPath())}`);
42003
+ console.log(` Reason: ${pc65.yellow(override)}`);
42004
+ console.log(` Config: ${pc65.dim(client.getConfigPath())}`);
41891
42005
  console.log();
41892
42006
  } else {
41893
- clack61.log.success(pc64.green("Telemetry enabled"));
41894
- console.log(` Config: ${pc64.dim(client.getConfigPath())}`);
42007
+ clack62.log.success(pc65.green("Telemetry enabled"));
42008
+ console.log(` Config: ${pc65.dim(client.getConfigPath())}`);
41895
42009
  console.log(`
41896
- ${pc64.dim("Thank you for helping improve Wraps!")}
42010
+ ${pc65.dim("Thank you for helping improve Wraps!")}
41897
42011
  `);
41898
42012
  }
41899
42013
  }
41900
42014
  async function telemetryDisable() {
41901
42015
  const client = getTelemetryClient();
41902
42016
  client.disable();
41903
- clack61.log.success(pc64.green("Telemetry disabled"));
41904
- console.log(` Config: ${pc64.dim(client.getConfigPath())}`);
42017
+ clack62.log.success(pc65.green("Telemetry disabled"));
42018
+ console.log(` Config: ${pc65.dim(client.getConfigPath())}`);
41905
42019
  console.log(
41906
42020
  `
41907
- ${pc64.dim("You can re-enable with:")} wraps telemetry enable
42021
+ ${pc65.dim("You can re-enable with:")} wraps telemetry enable
41908
42022
  `
41909
42023
  );
41910
42024
  }
41911
42025
  async function telemetryStatus() {
41912
42026
  const client = getTelemetryClient();
41913
- clack61.intro(pc64.bold("Telemetry Status"));
42027
+ clack62.intro(pc65.bold("Telemetry Status"));
41914
42028
  const override = client.getEnvOverride();
41915
- const status2 = client.isEnabled() ? pc64.green("Enabled") : pc64.red("Disabled");
42029
+ const status2 = client.isEnabled() ? pc65.green("Enabled") : pc65.red("Disabled");
41916
42030
  console.log();
41917
- console.log(` ${pc64.bold("Status:")} ${status2}`);
42031
+ console.log(` ${pc65.bold("Status:")} ${status2}`);
41918
42032
  if (!client.isEnabled() && override) {
41919
- console.log(` ${pc64.bold("Reason:")} ${pc64.yellow(override)}`);
42033
+ console.log(` ${pc65.bold("Reason:")} ${pc65.yellow(override)}`);
41920
42034
  }
41921
- console.log(` ${pc64.bold("Config file:")} ${pc64.dim(client.getConfigPath())}`);
42035
+ console.log(` ${pc65.bold("Config file:")} ${pc65.dim(client.getConfigPath())}`);
41922
42036
  if (client.isEnabled()) {
41923
42037
  console.log();
41924
- console.log(pc64.bold(" How to opt-out:"));
41925
- console.log(` ${pc64.cyan("wraps telemetry disable")}`);
42038
+ console.log(pc65.bold(" How to opt-out:"));
42039
+ console.log(` ${pc65.cyan("wraps telemetry disable")}`);
41926
42040
  console.log(
41927
- ` ${pc64.dim("Or set:")} ${pc64.cyan("WRAPS_TELEMETRY_DISABLED=1")}`
42041
+ ` ${pc65.dim("Or set:")} ${pc65.cyan("WRAPS_TELEMETRY_DISABLED=1")}`
41928
42042
  );
41929
- console.log(` ${pc64.dim("Or set:")} ${pc64.cyan("DO_NOT_TRACK=1")}`);
42043
+ console.log(` ${pc65.dim("Or set:")} ${pc65.cyan("DO_NOT_TRACK=1")}`);
41930
42044
  } else {
41931
42045
  console.log();
41932
- console.log(pc64.bold(" How to opt-in:"));
41933
- console.log(` ${pc64.cyan("wraps telemetry enable")}`);
42046
+ console.log(pc65.bold(" How to opt-in:"));
42047
+ console.log(` ${pc65.cyan("wraps telemetry enable")}`);
41934
42048
  }
41935
42049
  console.log();
41936
- console.log(pc64.bold(" Debug mode:"));
42050
+ console.log(pc65.bold(" Debug mode:"));
41937
42051
  console.log(
41938
- ` ${pc64.dim("See what would be sent:")} ${pc64.cyan("WRAPS_TELEMETRY_DEBUG=1 wraps <command>")}`
42052
+ ` ${pc65.dim("See what would be sent:")} ${pc65.cyan("WRAPS_TELEMETRY_DEBUG=1 wraps <command>")}`
41939
42053
  );
41940
42054
  console.log();
41941
42055
  console.log(
41942
- ` ${pc64.dim("Learn more:")} ${pc64.cyan("https://wraps.dev/docs/telemetry")}`
42056
+ ` ${pc65.dim("Learn more:")} ${pc65.cyan("https://wraps.dev/docs/telemetry")}`
41943
42057
  );
41944
42058
  console.log();
41945
42059
  }
@@ -41948,8 +42062,8 @@ async function telemetryStatus() {
41948
42062
  init_esm_shims();
41949
42063
  import { existsSync as existsSync20, mkdirSync as mkdirSync2, writeFileSync } from "fs";
41950
42064
  import { join as join22 } from "path";
41951
- import * as clack62 from "@clack/prompts";
41952
- import pc65 from "picocolors";
42065
+ import * as clack63 from "@clack/prompts";
42066
+ import pc66 from "picocolors";
41953
42067
  var EXAMPLE_CASCADE_WORKFLOW = `import {
41954
42068
  defineWorkflow,
41955
42069
  sendEmail,
@@ -42044,30 +42158,30 @@ export default defineConfig({
42044
42158
  });
42045
42159
  `;
42046
42160
  async function workflowInit(options = {}) {
42047
- clack62.intro(pc65.bgCyan(pc65.black(" wraps workflow init ")));
42161
+ clack63.intro(pc66.bgCyan(pc66.black(" wraps workflow init ")));
42048
42162
  const wrapsDir = join22(process.cwd(), "wraps");
42049
42163
  const workflowsDir = join22(wrapsDir, "workflows");
42050
42164
  const configPath = join22(wrapsDir, "wraps.config.ts");
42051
42165
  if (existsSync20(workflowsDir)) {
42052
- clack62.log.info(
42053
- `Workflows directory already exists at ${pc65.cyan("wraps/workflows/")}`
42166
+ clack63.log.info(
42167
+ `Workflows directory already exists at ${pc66.cyan("wraps/workflows/")}`
42054
42168
  );
42055
42169
  const files = existsSync20(join22(workflowsDir, "cart-recovery.ts")) || existsSync20(join22(workflowsDir, "welcome-sequence.ts"));
42056
42170
  if (files && !options.yes) {
42057
- const shouldContinue = await clack62.confirm({
42171
+ const shouldContinue = await clack63.confirm({
42058
42172
  message: "Example files may already exist. Overwrite them?",
42059
42173
  initialValue: false
42060
42174
  });
42061
- if (clack62.isCancel(shouldContinue) || !shouldContinue) {
42062
- clack62.log.info("Skipping file creation.");
42175
+ if (clack63.isCancel(shouldContinue) || !shouldContinue) {
42176
+ clack63.log.info("Skipping file creation.");
42063
42177
  showNextSteps2();
42064
- clack62.outro("Done!");
42178
+ clack63.outro("Done!");
42065
42179
  return;
42066
42180
  }
42067
42181
  }
42068
42182
  }
42069
42183
  try {
42070
- const s = clack62.spinner();
42184
+ const s = clack63.spinner();
42071
42185
  s.start("Creating workflows directory...");
42072
42186
  mkdirSync2(workflowsDir, { recursive: true });
42073
42187
  s.stop("Created wraps/workflows/");
@@ -42085,34 +42199,34 @@ async function workflowInit(options = {}) {
42085
42199
  s.stop("Created 2 example workflows");
42086
42200
  if (!existsSync20(configPath)) {
42087
42201
  writeFileSync(configPath, EXAMPLE_CONFIG, "utf-8");
42088
- clack62.log.info(`Created ${pc65.cyan("wraps/wraps.config.ts")}`);
42202
+ clack63.log.info(`Created ${pc66.cyan("wraps/wraps.config.ts")}`);
42089
42203
  }
42090
- clack62.log.success(
42091
- `${pc65.bold("Workflows scaffolded!")} Created:
42092
- ${pc65.cyan("wraps/wraps.config.ts")} \u2014 Project config
42093
- ${pc65.cyan("wraps/workflows/cart-recovery.ts")} \u2014 Cross-channel cascade example
42094
- ${pc65.cyan("wraps/workflows/welcome-sequence.ts")} \u2014 Welcome series example`
42204
+ clack63.log.success(
42205
+ `${pc66.bold("Workflows scaffolded!")} Created:
42206
+ ${pc66.cyan("wraps/wraps.config.ts")} \u2014 Project config
42207
+ ${pc66.cyan("wraps/workflows/cart-recovery.ts")} \u2014 Cross-channel cascade example
42208
+ ${pc66.cyan("wraps/workflows/welcome-sequence.ts")} \u2014 Welcome series example`
42095
42209
  );
42096
42210
  showNextSteps2();
42097
- clack62.outro(pc65.green("Happy orchestrating!"));
42211
+ clack63.outro(pc66.green("Happy orchestrating!"));
42098
42212
  } catch (error) {
42099
- clack62.log.error(
42213
+ clack63.log.error(
42100
42214
  `Failed to scaffold workflows: ${error instanceof Error ? error.message : String(error)}`
42101
42215
  );
42102
- clack62.outro(pc65.red("Scaffolding failed."));
42216
+ clack63.outro(pc66.red("Scaffolding failed."));
42103
42217
  process.exitCode = 1;
42104
42218
  }
42105
42219
  }
42106
42220
  function showNextSteps2() {
42107
- clack62.log.info(
42108
- `${pc65.bold("Next steps:")}
42221
+ clack63.log.info(
42222
+ `${pc66.bold("Next steps:")}
42109
42223
 
42110
- 1. Edit ${pc65.cyan("wraps/wraps.config.ts")} with your org slug and domain
42111
- 2. Edit your workflows in ${pc65.cyan("wraps/workflows/")}
42112
- 3. Validate: ${pc65.cyan("wraps email workflows validate")}
42113
- 4. Push: ${pc65.cyan("wraps email workflows push")}
42224
+ 1. Edit ${pc66.cyan("wraps/wraps.config.ts")} with your org slug and domain
42225
+ 2. Edit your workflows in ${pc66.cyan("wraps/workflows/")}
42226
+ 3. Validate: ${pc66.cyan("wraps email workflows validate")}
42227
+ 4. Push: ${pc66.cyan("wraps email workflows push")}
42114
42228
 
42115
- ${pc65.dim("Docs:")} ${pc65.underline("https://wraps.dev/docs/guides/orchestration")}`
42229
+ ${pc66.dim("Docs:")} ${pc66.underline("https://wraps.dev/docs/guides/orchestration")}`
42116
42230
  );
42117
42231
  }
42118
42232
 
@@ -42310,214 +42424,217 @@ function showVersion() {
42310
42424
  process.exit(0);
42311
42425
  }
42312
42426
  function showHelp() {
42313
- clack63.intro(pc67.bold(`WRAPS CLI v${VERSION}`));
42427
+ clack64.intro(pc68.bold(`WRAPS CLI v${VERSION}`));
42314
42428
  console.log("Deploy AWS infrastructure to your account\n");
42315
42429
  console.log("Usage: wraps [service] <command> [options]\n");
42316
42430
  console.log("Services:");
42317
- console.log(` ${pc67.cyan("email")} Email infrastructure (AWS SES)`);
42431
+ console.log(` ${pc68.cyan("email")} Email infrastructure (AWS SES)`);
42318
42432
  console.log(
42319
- ` ${pc67.cyan("sms")} SMS infrastructure (AWS End User Messaging)`
42433
+ ` ${pc68.cyan("sms")} SMS infrastructure (AWS End User Messaging)`
42320
42434
  );
42321
42435
  console.log(
42322
- ` ${pc67.cyan("cdn")} CDN infrastructure (AWS S3 + CloudFront)`
42436
+ ` ${pc68.cyan("cdn")} CDN infrastructure (AWS S3 + CloudFront)`
42323
42437
  );
42324
42438
  console.log(
42325
- ` ${pc67.cyan("selfhost")} Self-hosted Wraps control plane (enterprise)`
42439
+ ` ${pc68.cyan("selfhost")} Self-hosted Wraps control plane (enterprise)`
42326
42440
  );
42327
42441
  console.log(
42328
- ` ${pc67.cyan("license")} License key management (Wraps team only)
42442
+ ` ${pc68.cyan("license")} License key management (Wraps team only)
42329
42443
  `
42330
42444
  );
42331
42445
  console.log("Email Commands:");
42332
42446
  console.log(
42333
- ` ${pc67.cyan("email init")} Deploy new email infrastructure`
42447
+ ` ${pc68.cyan("email init")} Deploy new email infrastructure`
42334
42448
  );
42335
42449
  console.log(
42336
- ` ${pc67.cyan("email check")} Check email deliverability for a domain`
42450
+ ` ${pc68.cyan("email check")} Check email deliverability for a domain`
42337
42451
  );
42338
42452
  console.log(
42339
- ` ${pc67.cyan("email connect")} Connect to existing AWS SES`
42453
+ ` ${pc68.cyan("email connect")} Connect to existing AWS SES`
42340
42454
  );
42341
42455
  console.log(
42342
- ` ${pc67.cyan("email status")} Show email infrastructure details`
42456
+ ` ${pc68.cyan("email status")} Show email infrastructure details`
42343
42457
  );
42344
- console.log(` ${pc67.cyan("email test")} Send a test email`);
42345
- console.log(` ${pc67.cyan("email verify")} Verify domain DNS records`);
42458
+ console.log(` ${pc68.cyan("email test")} Send a test email`);
42459
+ console.log(` ${pc68.cyan("email verify")} Verify domain DNS records`);
42346
42460
  console.log(
42347
- ` ${pc67.cyan("email sync")} Apply CLI updates to infrastructure`
42461
+ ` ${pc68.cyan("email sync")} Apply CLI updates to infrastructure`
42348
42462
  );
42349
- console.log(` ${pc67.cyan("email upgrade")} Add features`);
42463
+ console.log(` ${pc68.cyan("email upgrade")} Add features`);
42350
42464
  console.log(
42351
- ` ${pc67.cyan("email restore")} Restore original configuration`
42465
+ ` ${pc68.cyan("email restore")} Restore original configuration`
42352
42466
  );
42353
42467
  console.log(
42354
- ` ${pc67.cyan("email destroy")} Remove email infrastructure`
42468
+ ` ${pc68.cyan("email destroy")} Remove email infrastructure`
42355
42469
  );
42356
42470
  console.log(
42357
- ` ${pc67.cyan("email doctor")} Diagnose and clean up email infrastructure`
42471
+ ` ${pc68.cyan("email doctor")} Diagnose and clean up email infrastructure`
42358
42472
  );
42359
- console.log(` ${pc67.cyan("email domains add")} Add a domain to SES`);
42360
- console.log(` ${pc67.cyan("email domains list")} List all domains`);
42361
- console.log(` ${pc67.cyan("email domains remove")} Remove a domain`);
42473
+ console.log(` ${pc68.cyan("email domains add")} Add a domain to SES`);
42474
+ console.log(` ${pc68.cyan("email domains list")} List all domains`);
42475
+ console.log(` ${pc68.cyan("email domains remove")} Remove a domain`);
42362
42476
  console.log(
42363
- ` ${pc67.cyan("email inbound init")} Enable inbound email receiving`
42477
+ ` ${pc68.cyan("email inbound init")} Enable inbound email receiving`
42364
42478
  );
42365
- console.log(` ${pc67.cyan("email inbound status")} Show inbound email status`);
42479
+ console.log(` ${pc68.cyan("email inbound status")} Show inbound email status`);
42366
42480
  console.log(
42367
- ` ${pc67.cyan("email inbound verify")} Verify inbound DNS records`
42481
+ ` ${pc68.cyan("email inbound verify")} Verify inbound DNS records`
42368
42482
  );
42369
42483
  console.log(
42370
- ` ${pc67.cyan("email inbound test")} Send test email and verify receipt`
42484
+ ` ${pc68.cyan("email inbound test")} Send test email and verify receipt`
42371
42485
  );
42372
42486
  console.log(
42373
- ` ${pc67.cyan("email inbound destroy")} Remove inbound email infrastructure
42487
+ ` ${pc68.cyan("email inbound destroy")} Remove inbound email infrastructure
42374
42488
  `
42375
42489
  );
42376
42490
  console.log("Template Commands:");
42377
42491
  console.log(
42378
- ` ${pc67.cyan("email templates init")} Initialize templates-as-code`
42492
+ ` ${pc68.cyan("email templates init")} Initialize templates-as-code`
42379
42493
  );
42380
42494
  console.log(
42381
- ` ${pc67.cyan("email templates push")} Push templates to SES + dashboard`
42495
+ ` ${pc68.cyan("email templates push")} Push templates to SES + dashboard`
42382
42496
  );
42383
42497
  console.log(
42384
- ` ${pc67.cyan("email templates preview")} Preview templates in browser`
42498
+ ` ${pc68.cyan("email templates preview")} Preview templates in browser`
42385
42499
  );
42386
42500
  console.log(
42387
- ` ${pc67.cyan("push")} ${pc67.dim("(alias for email templates push)")}
42501
+ ` ${pc68.cyan("push")} ${pc68.dim("(alias for email templates push)")}
42388
42502
  `
42389
42503
  );
42390
42504
  console.log("Workflow Commands:");
42391
42505
  console.log(
42392
- ` ${pc67.cyan("email workflows init")} Initialize workflows-as-code`
42506
+ ` ${pc68.cyan("email workflows init")} Initialize workflows-as-code`
42393
42507
  );
42394
42508
  console.log(
42395
- ` ${pc67.cyan("email workflows validate")} Validate workflow files`
42509
+ ` ${pc68.cyan("email workflows validate")} Validate workflow files`
42396
42510
  );
42397
42511
  console.log(
42398
- ` ${pc67.cyan("email workflows push")} Push workflows to dashboard
42512
+ ` ${pc68.cyan("email workflows push")} Push workflows to dashboard
42399
42513
  `
42400
42514
  );
42401
42515
  console.log("SMS Commands:");
42402
- console.log(` ${pc67.cyan("sms init")} Deploy SMS infrastructure`);
42516
+ console.log(` ${pc68.cyan("sms init")} Deploy SMS infrastructure`);
42403
42517
  console.log(
42404
- ` ${pc67.cyan("sms status")} Show SMS infrastructure details`
42518
+ ` ${pc68.cyan("sms status")} Show SMS infrastructure details`
42405
42519
  );
42406
- console.log(` ${pc67.cyan("sms test")} Send a test SMS message`);
42520
+ console.log(` ${pc68.cyan("sms test")} Send a test SMS message`);
42407
42521
  console.log(
42408
- ` ${pc67.cyan("sms verify-number")} Verify a destination phone number`
42522
+ ` ${pc68.cyan("sms verify-number")} Verify a destination phone number`
42409
42523
  );
42410
42524
  console.log(
42411
- ` ${pc67.cyan("sms sync")} Sync infrastructure (update Lambda, etc.)`
42525
+ ` ${pc68.cyan("sms sync")} Sync infrastructure (update Lambda, etc.)`
42412
42526
  );
42413
- console.log(` ${pc67.cyan("sms upgrade")} Upgrade SMS features`);
42414
- console.log(` ${pc67.cyan("sms register")} Register toll-free number`);
42527
+ console.log(` ${pc68.cyan("sms upgrade")} Upgrade SMS features`);
42528
+ console.log(` ${pc68.cyan("sms register")} Register toll-free number`);
42415
42529
  console.log(
42416
- ` ${pc67.cyan("sms destroy")} Remove SMS infrastructure
42530
+ ` ${pc68.cyan("sms destroy")} Remove SMS infrastructure
42417
42531
  `
42418
42532
  );
42419
42533
  console.log("CDN Commands:");
42420
42534
  console.log(
42421
- ` ${pc67.cyan("cdn init")} Deploy CDN infrastructure (S3 + CloudFront)`
42535
+ ` ${pc68.cyan("cdn init")} Deploy CDN infrastructure (S3 + CloudFront)`
42422
42536
  );
42423
42537
  console.log(
42424
- ` ${pc67.cyan("cdn status")} Show CDN infrastructure details`
42538
+ ` ${pc68.cyan("cdn status")} Show CDN infrastructure details`
42425
42539
  );
42426
42540
  console.log(
42427
- ` ${pc67.cyan("cdn verify")} Check DNS and certificate status`
42541
+ ` ${pc68.cyan("cdn verify")} Check DNS and certificate status`
42428
42542
  );
42429
42543
  console.log(
42430
- ` ${pc67.cyan("cdn upgrade")} Add custom domain after cert validation`
42544
+ ` ${pc68.cyan("cdn upgrade")} Add custom domain after cert validation`
42431
42545
  );
42432
42546
  console.log(
42433
- ` ${pc67.cyan("cdn sync")} Sync infrastructure with current config`
42547
+ ` ${pc68.cyan("cdn sync")} Sync infrastructure with current config`
42434
42548
  );
42435
42549
  console.log(
42436
- ` ${pc67.cyan("cdn destroy")} Remove CDN infrastructure
42550
+ ` ${pc68.cyan("cdn destroy")} Remove CDN infrastructure
42437
42551
  `
42438
42552
  );
42439
42553
  console.log("Self-Hosted Commands:");
42440
42554
  console.log(
42441
- ` ${pc67.cyan("selfhost deploy")} Deploy Wraps API to your AWS account`
42555
+ ` ${pc68.cyan("selfhost deploy")} Deploy Wraps API to your AWS account`
42556
+ );
42557
+ console.log(
42558
+ ` ${pc68.cyan("selfhost login")} Sign in to your self-hosted Wraps instance`
42442
42559
  );
42443
42560
  console.log(
42444
- ` ${pc67.cyan("selfhost login")} Sign in to your self-hosted Wraps instance`
42561
+ ` ${pc68.cyan("selfhost logout")} Sign out of your self-hosted Wraps instance`
42445
42562
  );
42446
42563
  console.log(
42447
- ` ${pc67.cyan("selfhost upgrade")} Rebuild and redeploy the self-hosted API`
42564
+ ` ${pc68.cyan("selfhost upgrade")} Rebuild and redeploy the self-hosted API`
42448
42565
  );
42449
42566
  console.log(
42450
- ` ${pc67.cyan("selfhost status")} Show self-hosted deployment details`
42567
+ ` ${pc68.cyan("selfhost status")} Show self-hosted deployment details`
42451
42568
  );
42452
42569
  console.log(
42453
- ` ${pc67.cyan("selfhost connect")} Connect your AWS account to your self-hosted instance
42570
+ ` ${pc68.cyan("selfhost connect")} Connect your AWS account to your self-hosted instance
42454
42571
  `
42455
42572
  );
42456
42573
  console.log("Local Development:");
42457
42574
  console.log(
42458
- ` ${pc67.cyan("console")} Start local web console
42575
+ ` ${pc68.cyan("console")} Start local web console
42459
42576
  `
42460
42577
  );
42461
42578
  console.log("Platform:");
42462
42579
  console.log(
42463
- ` ${pc67.cyan("platform")} Show platform info and pricing`
42580
+ ` ${pc68.cyan("platform")} Show platform info and pricing`
42464
42581
  );
42465
42582
  console.log(
42466
- ` ${pc67.cyan("platform connect")} Connect to Wraps Platform (events + IAM)`
42583
+ ` ${pc68.cyan("platform connect")} Connect to Wraps Platform (events + IAM)`
42467
42584
  );
42468
42585
  console.log(
42469
- ` ${pc67.cyan("platform update-role")} Update platform IAM permissions
42586
+ ` ${pc68.cyan("platform update-role")} Update platform IAM permissions
42470
42587
  `
42471
42588
  );
42472
42589
  console.log("Auth:");
42473
42590
  console.log(
42474
- ` ${pc67.cyan("auth login")} Sign in to wraps.dev (device flow)`
42591
+ ` ${pc68.cyan("auth login")} Sign in to wraps.dev (device flow)`
42475
42592
  );
42476
- console.log(` ${pc67.cyan("auth status")} Show current auth state`);
42593
+ console.log(` ${pc68.cyan("auth status")} Show current auth state`);
42477
42594
  console.log(
42478
- ` ${pc67.cyan("auth logout")} Sign out and remove stored token
42595
+ ` ${pc68.cyan("auth logout")} Sign out and remove stored token
42479
42596
  `
42480
42597
  );
42481
42598
  console.log("AWS Setup:");
42482
42599
  console.log(
42483
- ` ${pc67.cyan("aws setup")} Interactive AWS setup wizard`
42600
+ ` ${pc68.cyan("aws setup")} Interactive AWS setup wizard`
42484
42601
  );
42485
42602
  console.log(
42486
- ` ${pc67.cyan("aws doctor")} Diagnose AWS configuration issues
42603
+ ` ${pc68.cyan("aws doctor")} Diagnose AWS configuration issues
42487
42604
  `
42488
42605
  );
42489
42606
  console.log("Global Commands:");
42490
- console.log(` ${pc67.cyan("status")} Show overview of all services`);
42491
- console.log(` ${pc67.cyan("destroy")} Remove deployed infrastructure`);
42492
- console.log(` ${pc67.cyan("permissions")} Show required AWS IAM permissions`);
42493
- console.log(` ${pc67.cyan("completion")} Generate shell completion script`);
42607
+ console.log(` ${pc68.cyan("status")} Show overview of all services`);
42608
+ console.log(` ${pc68.cyan("destroy")} Remove deployed infrastructure`);
42609
+ console.log(` ${pc68.cyan("permissions")} Show required AWS IAM permissions`);
42610
+ console.log(` ${pc68.cyan("completion")} Generate shell completion script`);
42494
42611
  console.log(
42495
- ` ${pc67.cyan("telemetry")} Manage anonymous telemetry settings`
42612
+ ` ${pc68.cyan("telemetry")} Manage anonymous telemetry settings`
42496
42613
  );
42497
- console.log(` ${pc67.cyan("update")} Update CLI to latest version`);
42498
- console.log(` ${pc67.cyan("news")} Show recent Wraps updates`);
42614
+ console.log(` ${pc68.cyan("update")} Update CLI to latest version`);
42615
+ console.log(` ${pc68.cyan("news")} Show recent Wraps updates`);
42499
42616
  console.log(
42500
- ` ${pc67.cyan("support")} Get help and support contact info
42617
+ ` ${pc68.cyan("support")} Get help and support contact info
42501
42618
  `
42502
42619
  );
42503
42620
  console.log("Options:");
42504
42621
  console.log(
42505
- ` ${pc67.dim("-p, --provider")} Hosting provider (vercel, aws, railway, other)`
42506
- );
42507
- console.log(` ${pc67.dim("-r, --region")} AWS region`);
42508
- console.log(` ${pc67.dim("-d, --domain")} Domain name`);
42509
- console.log(` ${pc67.dim("--account")} AWS account ID or alias`);
42510
- console.log(` ${pc67.dim("--preset")} Configuration preset`);
42511
- console.log(` ${pc67.dim("--token")} API key or token for auth`);
42512
- console.log(` ${pc67.dim("-y, --yes")} Skip confirmation prompts`);
42513
- console.log(` ${pc67.dim("-f, --force")} Force destructive operations`);
42622
+ ` ${pc68.dim("-p, --provider")} Hosting provider (vercel, aws, railway, other)`
42623
+ );
42624
+ console.log(` ${pc68.dim("-r, --region")} AWS region`);
42625
+ console.log(` ${pc68.dim("-d, --domain")} Domain name`);
42626
+ console.log(` ${pc68.dim("--account")} AWS account ID or alias`);
42627
+ console.log(` ${pc68.dim("--preset")} Configuration preset`);
42628
+ console.log(` ${pc68.dim("--token")} API key or token for auth`);
42629
+ console.log(` ${pc68.dim("-y, --yes")} Skip confirmation prompts`);
42630
+ console.log(` ${pc68.dim("-f, --force")} Force destructive operations`);
42514
42631
  console.log(
42515
- ` ${pc67.dim("--preview")} Preview changes without deploying`
42632
+ ` ${pc68.dim("--preview")} Preview changes without deploying`
42516
42633
  );
42517
- console.log(` ${pc67.dim("-v, --version")} Show version number
42634
+ console.log(` ${pc68.dim("-v, --version")} Show version number
42518
42635
  `);
42519
42636
  console.log(
42520
- `Run ${pc67.cyan("wraps <service> <command> --help")} for more information.
42637
+ `Run ${pc68.cyan("wraps <service> <command> --help")} for more information.
42521
42638
  `
42522
42639
  );
42523
42640
  }
@@ -42539,27 +42656,27 @@ if (!primaryCommand) {
42539
42656
  const telemetry = getTelemetryClient();
42540
42657
  if (telemetry.shouldShowNotification()) {
42541
42658
  console.log();
42542
- clack63.log.info(pc67.bold("Anonymous Telemetry"));
42659
+ clack64.log.info(pc68.bold("Anonymous Telemetry"));
42543
42660
  console.log(
42544
- ` Wraps collects ${pc67.cyan("anonymous usage data")} to improve the CLI.`
42661
+ ` Wraps collects ${pc68.cyan("anonymous usage data")} to improve the CLI.`
42545
42662
  );
42546
42663
  console.log(
42547
- ` We ${pc67.bold("never")} collect: domains, AWS credentials, email content, or PII.`
42664
+ ` We ${pc68.bold("never")} collect: domains, AWS credentials, email content, or PII.`
42548
42665
  );
42549
42666
  console.log(
42550
- ` We ${pc67.bold("only")} collect: command names, success/failure, CLI version, OS.`
42667
+ ` We ${pc68.bold("only")} collect: command names, success/failure, CLI version, OS.`
42551
42668
  );
42552
42669
  console.log();
42553
- console.log(` Opt-out anytime: ${pc67.cyan("wraps telemetry disable")}`);
42554
- console.log(` Or set: ${pc67.cyan("WRAPS_TELEMETRY_DISABLED=1")}`);
42555
- console.log(` Learn more: ${pc67.cyan("https://wraps.dev/docs")}`);
42670
+ console.log(` Opt-out anytime: ${pc68.cyan("wraps telemetry disable")}`);
42671
+ console.log(` Or set: ${pc68.cyan("WRAPS_TELEMETRY_DISABLED=1")}`);
42672
+ console.log(` Learn more: ${pc68.cyan("https://wraps.dev/docs")}`);
42556
42673
  console.log();
42557
42674
  telemetry.markNotificationShown();
42558
42675
  }
42559
42676
  trackCommand("interactive:menu", { success: true, duration_ms: 0 });
42560
- clack63.intro(pc67.bold(`WRAPS CLI v${VERSION}`));
42677
+ clack64.intro(pc68.bold(`WRAPS CLI v${VERSION}`));
42561
42678
  console.log(" Deploy AWS infrastructure to your account.\n");
42562
- const action = await clack63.select({
42679
+ const action = await clack64.select({
42563
42680
  message: "What would you like to do?",
42564
42681
  options: [
42565
42682
  {
@@ -42609,13 +42726,13 @@ if (!primaryCommand) {
42609
42726
  }
42610
42727
  ]
42611
42728
  });
42612
- if (clack63.isCancel(action)) {
42729
+ if (clack64.isCancel(action)) {
42613
42730
  trackCommand("interactive:cancel", {
42614
42731
  success: true,
42615
42732
  duration_ms: Date.now() - startTime
42616
42733
  });
42617
42734
  await telemetry.shutdown();
42618
- clack63.cancel("Operation cancelled.");
42735
+ clack64.cancel("Operation cancelled.");
42619
42736
  process.exit(0);
42620
42737
  }
42621
42738
  trackCommand(`interactive:${action}`, {
@@ -42695,20 +42812,20 @@ async function run() {
42695
42812
  const telemetry = getTelemetryClient();
42696
42813
  if (telemetry.shouldShowNotification()) {
42697
42814
  console.log();
42698
- clack63.log.info(pc67.bold("Anonymous Telemetry"));
42815
+ clack64.log.info(pc68.bold("Anonymous Telemetry"));
42699
42816
  console.log(
42700
- ` Wraps collects ${pc67.cyan("anonymous usage data")} to improve the CLI.`
42817
+ ` Wraps collects ${pc68.cyan("anonymous usage data")} to improve the CLI.`
42701
42818
  );
42702
42819
  console.log(
42703
- ` We ${pc67.bold("never")} collect: domains, AWS credentials, email content, or PII.`
42820
+ ` We ${pc68.bold("never")} collect: domains, AWS credentials, email content, or PII.`
42704
42821
  );
42705
42822
  console.log(
42706
- ` We ${pc67.bold("only")} collect: command names, success/failure, CLI version, OS.`
42823
+ ` We ${pc68.bold("only")} collect: command names, success/failure, CLI version, OS.`
42707
42824
  );
42708
42825
  console.log();
42709
- console.log(` Opt-out anytime: ${pc67.cyan("wraps telemetry disable")}`);
42710
- console.log(` Or set: ${pc67.cyan("WRAPS_TELEMETRY_DISABLED=1")}`);
42711
- console.log(` Learn more: ${pc67.cyan("https://wraps.dev/docs")}`);
42826
+ console.log(` Opt-out anytime: ${pc68.cyan("wraps telemetry disable")}`);
42827
+ console.log(` Or set: ${pc68.cyan("WRAPS_TELEMETRY_DISABLED=1")}`);
42828
+ console.log(` Learn more: ${pc68.cyan("https://wraps.dev/docs")}`);
42712
42829
  console.log();
42713
42830
  telemetry.markNotificationShown();
42714
42831
  }
@@ -42792,10 +42909,10 @@ async function run() {
42792
42909
  break;
42793
42910
  case "verify": {
42794
42911
  if (!flags.domain) {
42795
- clack63.log.error("--domain flag is required");
42912
+ clack64.log.error("--domain flag is required");
42796
42913
  console.log(
42797
42914
  `
42798
- Usage: ${pc67.cyan("wraps email verify --domain yourapp.com")}
42915
+ Usage: ${pc68.cyan("wraps email verify --domain yourapp.com")}
42799
42916
  `
42800
42917
  );
42801
42918
  throw new Error("Missing required flag: --domain");
@@ -42867,12 +42984,12 @@ Usage: ${pc67.cyan("wraps email verify --domain yourapp.com")}
42867
42984
  });
42868
42985
  break;
42869
42986
  default:
42870
- clack63.log.error(
42987
+ clack64.log.error(
42871
42988
  `Unknown inbound command: ${inboundSubCommand || "(none)"}`
42872
42989
  );
42873
42990
  console.log(
42874
42991
  `
42875
- Available commands: ${pc67.cyan("init")}, ${pc67.cyan("destroy")}, ${pc67.cyan("status")}, ${pc67.cyan("verify")}, ${pc67.cyan("test")}, ${pc67.cyan("add")}, ${pc67.cyan("remove")}
42992
+ Available commands: ${pc68.cyan("init")}, ${pc68.cyan("destroy")}, ${pc68.cyan("status")}, ${pc68.cyan("verify")}, ${pc68.cyan("test")}, ${pc68.cyan("add")}, ${pc68.cyan("remove")}
42876
42993
  `
42877
42994
  );
42878
42995
  throw new Error(
@@ -42924,12 +43041,12 @@ Available commands: ${pc67.cyan("init")}, ${pc67.cyan("destroy")}, ${pc67.cyan("
42924
43041
  break;
42925
43042
  }
42926
43043
  default:
42927
- clack63.log.error(
43044
+ clack64.log.error(
42928
43045
  `Unknown reply command: ${replySubCommand || "(none)"}`
42929
43046
  );
42930
43047
  console.log(
42931
43048
  `
42932
- Available commands: ${pc67.cyan("init")}, ${pc67.cyan("rotate")}, ${pc67.cyan("status")}, ${pc67.cyan("destroy")}, ${pc67.cyan("decode")}
43049
+ Available commands: ${pc68.cyan("init")}, ${pc68.cyan("rotate")}, ${pc68.cyan("status")}, ${pc68.cyan("destroy")}, ${pc68.cyan("decode")}
42933
43050
  `
42934
43051
  );
42935
43052
  throw new Error(
@@ -42954,10 +43071,10 @@ Available commands: ${pc67.cyan("init")}, ${pc67.cyan("rotate")}, ${pc67.cyan("s
42954
43071
  break;
42955
43072
  case "verify": {
42956
43073
  if (!flags.domain) {
42957
- clack63.log.error("--domain flag is required");
43074
+ clack64.log.error("--domain flag is required");
42958
43075
  console.log(
42959
43076
  `
42960
- Usage: ${pc67.cyan("wraps email domains verify --domain yourapp.com")}
43077
+ Usage: ${pc68.cyan("wraps email domains verify --domain yourapp.com")}
42961
43078
  `
42962
43079
  );
42963
43080
  throw new Error("Missing required flag: --domain");
@@ -42967,10 +43084,10 @@ Usage: ${pc67.cyan("wraps email domains verify --domain yourapp.com")}
42967
43084
  }
42968
43085
  case "get-dkim": {
42969
43086
  if (!flags.domain) {
42970
- clack63.log.error("--domain flag is required");
43087
+ clack64.log.error("--domain flag is required");
42971
43088
  console.log(
42972
43089
  `
42973
- Usage: ${pc67.cyan("wraps email domains get-dkim --domain yourapp.com")}
43090
+ Usage: ${pc68.cyan("wraps email domains get-dkim --domain yourapp.com")}
42974
43091
  `
42975
43092
  );
42976
43093
  throw new Error("Missing required flag: --domain");
@@ -42980,10 +43097,10 @@ Usage: ${pc67.cyan("wraps email domains get-dkim --domain yourapp.com")}
42980
43097
  }
42981
43098
  case "remove": {
42982
43099
  if (!flags.domain) {
42983
- clack63.log.error("--domain flag is required");
43100
+ clack64.log.error("--domain flag is required");
42984
43101
  console.log(
42985
43102
  `
42986
- Usage: ${pc67.cyan("wraps email domains remove --domain yourapp.com --force")}
43103
+ Usage: ${pc68.cyan("wraps email domains remove --domain yourapp.com --force")}
42987
43104
  `
42988
43105
  );
42989
43106
  throw new Error("Missing required flag: --domain");
@@ -43013,12 +43130,12 @@ Usage: ${pc67.cyan("wraps email domains remove --domain yourapp.com --force")}
43013
43130
  break;
43014
43131
  }
43015
43132
  default:
43016
- clack63.log.error(
43133
+ clack64.log.error(
43017
43134
  `Unknown domains command: ${domainsSubCommand || "(none)"}`
43018
43135
  );
43019
43136
  console.log(
43020
43137
  `
43021
- Available commands: ${pc67.cyan("add")}, ${pc67.cyan("list")}, ${pc67.cyan("verify")}, ${pc67.cyan("get-dkim")}, ${pc67.cyan("remove")}, ${pc67.cyan("config")}
43138
+ Available commands: ${pc68.cyan("add")}, ${pc68.cyan("list")}, ${pc68.cyan("verify")}, ${pc68.cyan("get-dkim")}, ${pc68.cyan("remove")}, ${pc68.cyan("config")}
43022
43139
  `
43023
43140
  );
43024
43141
  throw new Error(
@@ -43060,12 +43177,12 @@ Available commands: ${pc67.cyan("add")}, ${pc67.cyan("list")}, ${pc67.cyan("veri
43060
43177
  });
43061
43178
  break;
43062
43179
  default:
43063
- clack63.log.error(
43180
+ clack64.log.error(
43064
43181
  `Unknown templates command: ${templatesSubCommand || "(none)"}`
43065
43182
  );
43066
43183
  console.log(
43067
43184
  `
43068
- Available commands: ${pc67.cyan("init")}, ${pc67.cyan("push")}, ${pc67.cyan("preview")}
43185
+ Available commands: ${pc68.cyan("init")}, ${pc68.cyan("push")}, ${pc68.cyan("preview")}
43069
43186
  `
43070
43187
  );
43071
43188
  throw new Error(
@@ -43104,12 +43221,12 @@ Available commands: ${pc67.cyan("init")}, ${pc67.cyan("push")}, ${pc67.cyan("pre
43104
43221
  });
43105
43222
  break;
43106
43223
  default:
43107
- clack63.log.error(
43224
+ clack64.log.error(
43108
43225
  `Unknown workflows command: ${workflowsSubCommand || "(none)"}`
43109
43226
  );
43110
43227
  console.log(
43111
43228
  `
43112
- Available commands: ${pc67.cyan("init")}, ${pc67.cyan("validate")}, ${pc67.cyan("push")}
43229
+ Available commands: ${pc68.cyan("init")}, ${pc68.cyan("validate")}, ${pc68.cyan("push")}
43113
43230
  `
43114
43231
  );
43115
43232
  throw new Error(
@@ -43134,7 +43251,7 @@ Available commands: ${pc67.cyan("init")}, ${pc67.cyan("validate")}, ${pc67.cyan(
43134
43251
  case "get": {
43135
43252
  const messageId = sub[3];
43136
43253
  if (!messageId) {
43137
- clack63.log.error("Usage: wraps email logs get <message-id>");
43254
+ clack64.log.error("Usage: wraps email logs get <message-id>");
43138
43255
  throw new Error("Missing required argument: <message-id>");
43139
43256
  }
43140
43257
  await emailLogsGet({
@@ -43146,12 +43263,12 @@ Available commands: ${pc67.cyan("init")}, ${pc67.cyan("validate")}, ${pc67.cyan(
43146
43263
  break;
43147
43264
  }
43148
43265
  default:
43149
- clack63.log.error(
43266
+ clack64.log.error(
43150
43267
  `Unknown logs command: ${logsSubCommand || "(none)"}`
43151
43268
  );
43152
43269
  console.log(
43153
43270
  `
43154
- Available commands: ${pc67.cyan("list")}, ${pc67.cyan("get <message-id>")}
43271
+ Available commands: ${pc68.cyan("list")}, ${pc68.cyan("get <message-id>")}
43155
43272
  `
43156
43273
  );
43157
43274
  throw new Error(
@@ -43176,10 +43293,10 @@ Available commands: ${pc67.cyan("list")}, ${pc67.cyan("get <message-id>")}
43176
43293
  });
43177
43294
  break;
43178
43295
  default:
43179
- clack63.log.error(`Unknown email command: ${subCommand}`);
43296
+ clack64.log.error(`Unknown email command: ${subCommand}`);
43180
43297
  console.log(
43181
43298
  `
43182
- Run ${pc67.cyan("wraps --help")} for available commands.
43299
+ Run ${pc68.cyan("wraps --help")} for available commands.
43183
43300
  `
43184
43301
  );
43185
43302
  throw new Error(`Unknown email command: ${subCommand}`);
@@ -43204,10 +43321,10 @@ Run ${pc67.cyan("wraps --help")} for available commands.
43204
43321
  });
43205
43322
  break;
43206
43323
  default:
43207
- clack63.log.error(`Unknown license command: ${subCommand}`);
43324
+ clack64.log.error(`Unknown license command: ${subCommand}`);
43208
43325
  console.log(
43209
43326
  `
43210
- Run ${pc67.cyan("wraps --help")} for available commands.
43327
+ Run ${pc68.cyan("wraps --help")} for available commands.
43211
43328
  `
43212
43329
  );
43213
43330
  throw new Error(`Unknown license command: ${subCommand}`);
@@ -43260,6 +43377,12 @@ Run ${pc67.cyan("wraps --help")} for available commands.
43260
43377
  json: flags.json
43261
43378
  });
43262
43379
  break;
43380
+ case "logout":
43381
+ await selfhostLogout({
43382
+ region: flags.region,
43383
+ json: flags.json
43384
+ });
43385
+ break;
43263
43386
  case "connect":
43264
43387
  await connect3({
43265
43388
  region: flags.region,
@@ -43270,10 +43393,10 @@ Run ${pc67.cyan("wraps --help")} for available commands.
43270
43393
  });
43271
43394
  break;
43272
43395
  default:
43273
- clack63.log.error(`Unknown selfhost command: ${subCommand}`);
43396
+ clack64.log.error(`Unknown selfhost command: ${subCommand}`);
43274
43397
  console.log(
43275
43398
  `
43276
- Run ${pc67.cyan("wraps --help")} for available commands.
43399
+ Run ${pc68.cyan("wraps --help")} for available commands.
43277
43400
  `
43278
43401
  );
43279
43402
  throw new Error(`Unknown selfhost command: ${subCommand}`);
@@ -43353,10 +43476,10 @@ Run ${pc67.cyan("wraps --help")} for available commands.
43353
43476
  });
43354
43477
  break;
43355
43478
  default:
43356
- clack63.log.error(`Unknown sms command: ${subCommand}`);
43479
+ clack64.log.error(`Unknown sms command: ${subCommand}`);
43357
43480
  console.log(
43358
43481
  `
43359
- Run ${pc67.cyan("wraps --help")} for available commands.
43482
+ Run ${pc68.cyan("wraps --help")} for available commands.
43360
43483
  `
43361
43484
  );
43362
43485
  throw new Error(`Unknown sms command: ${subCommand}`);
@@ -43417,10 +43540,10 @@ Run ${pc67.cyan("wraps --help")} for available commands.
43417
43540
  });
43418
43541
  break;
43419
43542
  default:
43420
- clack63.log.error(`Unknown cdn command: ${subCommand}`);
43543
+ clack64.log.error(`Unknown cdn command: ${subCommand}`);
43421
43544
  console.log(
43422
43545
  `
43423
- Run ${pc67.cyan("wraps --help")} for available commands.
43546
+ Run ${pc68.cyan("wraps --help")} for available commands.
43424
43547
  `
43425
43548
  );
43426
43549
  throw new Error(`Unknown cdn command: ${subCommand}`);
@@ -43442,13 +43565,13 @@ Run ${pc67.cyan("wraps --help")} for available commands.
43442
43565
  });
43443
43566
  break;
43444
43567
  default:
43445
- clack63.log.error(
43568
+ clack64.log.error(
43446
43569
  `Unknown workflow command: ${subCommand || "(none)"}`
43447
43570
  );
43448
43571
  console.log(`
43449
- Available commands: ${pc67.cyan("init")}
43572
+ Available commands: ${pc68.cyan("init")}
43450
43573
  `);
43451
- console.log(`Run ${pc67.cyan("wraps --help")} for more information.
43574
+ console.log(`Run ${pc68.cyan("wraps --help")} for more information.
43452
43575
  `);
43453
43576
  throw new Error(
43454
43577
  `Unknown workflow command: ${subCommand || "(none)"}`
@@ -43490,14 +43613,14 @@ Available commands: ${pc67.cyan("init")}
43490
43613
  });
43491
43614
  break;
43492
43615
  default:
43493
- clack63.log.error(`Unknown platform command: ${subCommand}`);
43616
+ clack64.log.error(`Unknown platform command: ${subCommand}`);
43494
43617
  console.log(
43495
43618
  `
43496
- Available commands: ${pc67.cyan("connect")}, ${pc67.cyan("update-role")}
43619
+ Available commands: ${pc68.cyan("connect")}, ${pc68.cyan("update-role")}
43497
43620
  `
43498
43621
  );
43499
43622
  console.log(
43500
- `Run ${pc67.cyan("wraps platform")} for more information.
43623
+ `Run ${pc68.cyan("wraps platform")} for more information.
43501
43624
  `
43502
43625
  );
43503
43626
  throw new Error(`Unknown platform command: ${subCommand}`);
@@ -43522,10 +43645,10 @@ Available commands: ${pc67.cyan("connect")}, ${pc67.cyan("update-role")}
43522
43645
  await logout();
43523
43646
  break;
43524
43647
  default:
43525
- clack63.log.error(`Unknown auth command: ${subCommand || "(none)"}`);
43648
+ clack64.log.error(`Unknown auth command: ${subCommand || "(none)"}`);
43526
43649
  console.log(
43527
43650
  `
43528
- Available commands: ${pc67.cyan("login")}, ${pc67.cyan("status")}, ${pc67.cyan("logout")}
43651
+ Available commands: ${pc68.cyan("login")}, ${pc68.cyan("status")}, ${pc68.cyan("logout")}
43529
43652
  `
43530
43653
  );
43531
43654
  throw new Error(`Unknown auth command: ${subCommand || "(none)"}`);
@@ -43543,13 +43666,13 @@ Available commands: ${pc67.cyan("login")}, ${pc67.cyan("status")}, ${pc67.cyan("
43543
43666
  await doctor();
43544
43667
  break;
43545
43668
  default:
43546
- clack63.log.error(`Unknown aws command: ${subCommand}`);
43669
+ clack64.log.error(`Unknown aws command: ${subCommand}`);
43547
43670
  console.log(
43548
43671
  `
43549
- Available commands: ${pc67.cyan("setup")}, ${pc67.cyan("doctor")}
43672
+ Available commands: ${pc68.cyan("setup")}, ${pc68.cyan("doctor")}
43550
43673
  `
43551
43674
  );
43552
- console.log(`Run ${pc67.cyan("wraps --help")} for more information.
43675
+ console.log(`Run ${pc68.cyan("wraps --help")} for more information.
43553
43676
  `);
43554
43677
  throw new Error(`Unknown aws command: ${subCommand}`);
43555
43678
  }
@@ -43630,10 +43753,10 @@ Available commands: ${pc67.cyan("setup")}, ${pc67.cyan("doctor")}
43630
43753
  await telemetryStatus();
43631
43754
  break;
43632
43755
  default:
43633
- clack63.log.error(`Unknown telemetry command: ${subCommand}`);
43756
+ clack64.log.error(`Unknown telemetry command: ${subCommand}`);
43634
43757
  console.log(
43635
43758
  `
43636
- Available commands: ${pc67.cyan("enable")}, ${pc67.cyan("disable")}, ${pc67.cyan("status")}
43759
+ Available commands: ${pc68.cyan("enable")}, ${pc68.cyan("disable")}, ${pc68.cyan("status")}
43637
43760
  `
43638
43761
  );
43639
43762
  throw new Error(`Unknown telemetry command: ${subCommand}`);
@@ -43657,10 +43780,10 @@ Please specify a command for ${primaryCommand} service.
43657
43780
  showHelp();
43658
43781
  break;
43659
43782
  default:
43660
- clack63.log.error(`Unknown command: ${primaryCommand}`);
43783
+ clack64.log.error(`Unknown command: ${primaryCommand}`);
43661
43784
  console.log(
43662
43785
  `
43663
- Run ${pc67.cyan("wraps --help")} for available commands.
43786
+ Run ${pc68.cyan("wraps --help")} for available commands.
43664
43787
  `
43665
43788
  );
43666
43789
  throw new Error(`Unknown command: ${primaryCommand}`);