@wraps.dev/cli 2.22.2 → 2.22.4

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