@wraps.dev/cli 3.4.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1946,7 +1946,7 @@ async function needsMigration(localPulumiDir, accountId, region) {
1946
1946
  }
1947
1947
  }
1948
1948
  async function migrateLocalPulumiState(localPulumiDir, bucketName, accountId, region) {
1949
- const pulumi35 = await import("@pulumi/pulumi/automation/index.js");
1949
+ const pulumi36 = await import("@pulumi/pulumi/automation/index.js");
1950
1950
  const stacksDir = join2(localPulumiDir, ".pulumi", "stacks");
1951
1951
  const entries = await readdir(stacksDir);
1952
1952
  for (const entry of entries) {
@@ -1962,12 +1962,12 @@ async function migrateLocalPulumiState(localPulumiDir, bucketName, accountId, re
1962
1962
  for (const stackFile of stackFiles) {
1963
1963
  const stackName = stackFile.replace(".json", "");
1964
1964
  try {
1965
- const localStack = await pulumi35.LocalWorkspace.selectStack({
1965
+ const localStack = await pulumi36.LocalWorkspace.selectStack({
1966
1966
  stackName,
1967
1967
  workDir: localPulumiDir
1968
1968
  });
1969
1969
  const state2 = await localStack.exportStack();
1970
- const s3Stack = await pulumi35.LocalWorkspace.createOrSelectStack(
1970
+ const s3Stack = await pulumi36.LocalWorkspace.createOrSelectStack(
1971
1971
  {
1972
1972
  stackName,
1973
1973
  projectName,
@@ -28379,14 +28379,14 @@ async function withLockRetry(fn, options) {
28379
28379
  throw error;
28380
28380
  }
28381
28381
  const clack67 = await import("@clack/prompts");
28382
- const pc72 = (await import("picocolors")).default;
28382
+ const pc73 = (await import("picocolors")).default;
28383
28383
  if (options.autoConfirm) {
28384
28384
  clack67.log.warn(
28385
28385
  "Stack is locked from a previous interrupted run. Auto-clearing..."
28386
28386
  );
28387
28387
  } else {
28388
28388
  const shouldClear = await clack67.confirm({
28389
- message: `Stack is locked from a previous interrupted run. ${pc72.yellow("Clear the stale lock and retry?")}`,
28389
+ message: `Stack is locked from a previous interrupted run. ${pc73.yellow("Clear the stale lock and retry?")}`,
28390
28390
  initialValue: true
28391
28391
  });
28392
28392
  if (clack67.isCancel(shouldClear) || !shouldClear) {
@@ -28413,8 +28413,8 @@ var init_pulumi = __esm({
28413
28413
  // src/infrastructure/shared/resource-checks.ts
28414
28414
  async function roleExists(roleName) {
28415
28415
  try {
28416
- const { IAMClient: IAMClient6, GetRoleCommand: GetRoleCommand4 } = await import("@aws-sdk/client-iam");
28417
- const iam13 = new IAMClient6({ region: "us-east-1" });
28416
+ const { IAMClient: IAMClient7, GetRoleCommand: GetRoleCommand4 } = await import("@aws-sdk/client-iam");
28417
+ const iam13 = new IAMClient7({ region: "us-east-1" });
28418
28418
  await iam13.send(new GetRoleCommand4({ RoleName: roleName }));
28419
28419
  return true;
28420
28420
  } catch (error) {
@@ -30171,8 +30171,8 @@ __export(iam_agent_user_exports, {
30171
30171
  import * as aws22 from "@pulumi/aws";
30172
30172
  async function userExists2(userName) {
30173
30173
  try {
30174
- const { IAMClient: IAMClient6, GetUserCommand } = await import("@aws-sdk/client-iam");
30175
- const iam13 = new IAMClient6({
30174
+ const { IAMClient: IAMClient7, GetUserCommand } = await import("@aws-sdk/client-iam");
30175
+ const iam13 = new IAMClient7({
30176
30176
  region: getDefaultRegion()
30177
30177
  });
30178
30178
  await iam13.send(new GetUserCommand({ UserName: userName }));
@@ -31725,8 +31725,8 @@ import { homedir as homedir6, tmpdir as tmpdir2 } from "os";
31725
31725
  import { join as join24 } from "path";
31726
31726
  import { Readable as Readable5 } from "stream";
31727
31727
  import { pipeline } from "stream/promises";
31728
- import { cancel as cancel35, confirm as confirm29, intro as intro61, isCancel as isCancel40, log as log60 } from "@clack/prompts";
31729
- import pc70 from "picocolors";
31728
+ import { cancel as cancel35, confirm as confirm30, intro as intro62, isCancel as isCancel41, log as log61 } from "@clack/prompts";
31729
+ import pc71 from "picocolors";
31730
31730
  function isStandaloneInstall() {
31731
31731
  return process.execPath.includes(".wraps/runtime");
31732
31732
  }
@@ -31755,7 +31755,7 @@ function detectPlatformArch() {
31755
31755
  return { platform: platform3, arch };
31756
31756
  }
31757
31757
  async function update(currentVersion) {
31758
- intro61(pc70.bold("Wraps CLI Update"));
31758
+ intro62(pc71.bold("Wraps CLI Update"));
31759
31759
  const progress = new DeploymentProgress();
31760
31760
  const result = await progress.execute(
31761
31761
  "Checking for updates...",
@@ -31767,27 +31767,27 @@ async function update(currentVersion) {
31767
31767
  }
31768
31768
  const { version: latestVersion, release: release2 } = result;
31769
31769
  if (currentVersion === latestVersion) {
31770
- progress.succeed(`Already up to date ${pc70.dim(`(v${currentVersion})`)}`);
31770
+ progress.succeed(`Already up to date ${pc71.dim(`(v${currentVersion})`)}`);
31771
31771
  return;
31772
31772
  }
31773
31773
  console.log();
31774
- log60.info(
31775
- `Current version: ${pc70.dim(`v${currentVersion}`)}
31776
- Latest version: ${pc70.cyan(`v${latestVersion}`)}`
31774
+ log61.info(
31775
+ `Current version: ${pc71.dim(`v${currentVersion}`)}
31776
+ Latest version: ${pc71.cyan(`v${latestVersion}`)}`
31777
31777
  );
31778
31778
  console.log();
31779
31779
  if (!isStandaloneInstall()) {
31780
- log60.info(
31780
+ log61.info(
31781
31781
  `You installed Wraps via npm. Update with:
31782
31782
 
31783
- ${pc70.cyan("npm update -g @wraps.dev/cli")}`
31783
+ ${pc71.cyan("npm update -g @wraps.dev/cli")}`
31784
31784
  );
31785
31785
  return;
31786
31786
  }
31787
- const shouldUpdate = await confirm29({
31787
+ const shouldUpdate = await confirm30({
31788
31788
  message: `Update to v${latestVersion}?`
31789
31789
  });
31790
- if (isCancel40(shouldUpdate) || !shouldUpdate) {
31790
+ if (isCancel41(shouldUpdate) || !shouldUpdate) {
31791
31791
  cancel35("Update cancelled.");
31792
31792
  return;
31793
31793
  }
@@ -31855,7 +31855,7 @@ async function update(currentVersion) {
31855
31855
  });
31856
31856
  console.log();
31857
31857
  progress.succeed(
31858
- `Updated to ${pc70.cyan(`v${latestVersion}`)} successfully!`
31858
+ `Updated to ${pc71.cyan(`v${latestVersion}`)} successfully!`
31859
31859
  );
31860
31860
  } finally {
31861
31861
  rmSync(tmp, { recursive: true, force: true });
@@ -31879,7 +31879,7 @@ import { readFileSync as readFileSync4 } from "fs";
31879
31879
  import { dirname as dirname6, join as join25 } from "path";
31880
31880
  import { fileURLToPath as fileURLToPath6 } from "url";
31881
31881
  import * as clack66 from "@clack/prompts";
31882
- import pc71 from "picocolors";
31882
+ import pc72 from "picocolors";
31883
31883
 
31884
31884
  // src/commands/auth/login.ts
31885
31885
  init_esm_shims();
@@ -34242,8 +34242,8 @@ init_constants();
34242
34242
  import * as aws3 from "@pulumi/aws";
34243
34243
  async function getExistingOIDCProviderArn(url) {
34244
34244
  try {
34245
- const { IAMClient: IAMClient6, ListOpenIDConnectProvidersCommand } = await import("@aws-sdk/client-iam");
34246
- const iam13 = new IAMClient6({
34245
+ const { IAMClient: IAMClient7, ListOpenIDConnectProvidersCommand } = await import("@aws-sdk/client-iam");
34246
+ const iam13 = new IAMClient7({
34247
34247
  region: getDefaultRegion()
34248
34248
  });
34249
34249
  const response = await iam13.send(new ListOpenIDConnectProvidersCommand({}));
@@ -38332,8 +38332,8 @@ function convertToSMTPPassword2(secretAccessKey, region) {
38332
38332
  }
38333
38333
  async function userExists(userName) {
38334
38334
  try {
38335
- const { IAMClient: IAMClient6, GetUserCommand } = await import("@aws-sdk/client-iam");
38336
- const iam13 = new IAMClient6({
38335
+ const { IAMClient: IAMClient7, GetUserCommand } = await import("@aws-sdk/client-iam");
38336
+ const iam13 = new IAMClient7({
38337
38337
  region: getDefaultRegion()
38338
38338
  });
38339
38339
  await iam13.send(new GetUserCommand({ UserName: userName }));
@@ -47246,8 +47246,8 @@ function getRequiredActions(config2) {
47246
47246
  }
47247
47247
  async function checkIAMPermissions(userArn, actions, region) {
47248
47248
  try {
47249
- const { IAMClient: IAMClient6, SimulatePrincipalPolicyCommand } = await import("@aws-sdk/client-iam");
47250
- const client2 = new IAMClient6({ region });
47249
+ const { IAMClient: IAMClient7, SimulatePrincipalPolicyCommand } = await import("@aws-sdk/client-iam");
47250
+ const client2 = new IAMClient7({ region });
47251
47251
  const batchSize = 100;
47252
47252
  const batches = [];
47253
47253
  for (let i6 = 0; i6 < actions.length; i6 += batchSize) {
@@ -48100,12 +48100,12 @@ async function emailLogsList(options) {
48100
48100
  }
48101
48101
  const COL = { time: 8, status: 11, to: 28, subject: 40, msgId: 18 };
48102
48102
  const header = pc32.bold("Time".padEnd(COL.time)) + " " + pc32.bold("Status".padEnd(COL.status)) + " " + pc32.bold("To".padEnd(COL.to)) + " " + pc32.bold("Subject".padEnd(COL.subject)) + " " + pc32.bold("Message ID");
48103
- const rows = data.logs.map((log62) => {
48104
- const time2 = relativeTime(log62.createdAt).padEnd(COL.time);
48105
- const status2 = padVisible(colorStatus(log62.status), COL.status);
48106
- const to = padVisible(truncate(log62.recipient, COL.to), COL.to);
48107
- const subject = padVisible(truncate(log62.subject, COL.subject), COL.subject);
48108
- const msgId = truncate(log62.messageId, COL.msgId);
48103
+ const rows = data.logs.map((log63) => {
48104
+ const time2 = relativeTime(log63.createdAt).padEnd(COL.time);
48105
+ const status2 = padVisible(colorStatus(log63.status), COL.status);
48106
+ const to = padVisible(truncate(log63.recipient, COL.to), COL.to);
48107
+ const subject = padVisible(truncate(log63.subject, COL.subject), COL.subject);
48108
+ const msgId = truncate(log63.messageId, COL.msgId);
48109
48109
  return `${time2} ${status2} ${to} ${subject} ${msgId}`;
48110
48110
  });
48111
48111
  clack30.note(
@@ -48163,32 +48163,32 @@ async function emailLogsGet(options) {
48163
48163
  }
48164
48164
  return;
48165
48165
  }
48166
- const log62 = await resp.json();
48166
+ const log63 = await resp.json();
48167
48167
  if (isJsonMode()) {
48168
- jsonSuccess("email.logs.get", log62);
48168
+ jsonSuccess("email.logs.get", log63);
48169
48169
  return;
48170
48170
  }
48171
48171
  const kv = (label, value) => `${pc32.dim(label.padEnd(16))} ${value ?? pc32.dim("\u2014")}`;
48172
- const sentAt = log62.sentAt ? new Date(log62.sentAt).toLocaleString() : null;
48173
- const deliveredAt = log62.deliveredAt ? new Date(log62.deliveredAt).toLocaleString() : null;
48174
- const bouncedAt = log62.bouncedAt ? new Date(log62.bouncedAt).toLocaleString() : null;
48175
- const createdAt = new Date(log62.createdAt).toLocaleString();
48172
+ const sentAt = log63.sentAt ? new Date(log63.sentAt).toLocaleString() : null;
48173
+ const deliveredAt = log63.deliveredAt ? new Date(log63.deliveredAt).toLocaleString() : null;
48174
+ const bouncedAt = log63.bouncedAt ? new Date(log63.bouncedAt).toLocaleString() : null;
48175
+ const createdAt = new Date(log63.createdAt).toLocaleString();
48176
48176
  const lines = [
48177
- kv("Message ID:", log62.messageId),
48178
- kv("Status:", log62.status ? colorStatus(log62.status) : null),
48179
- kv("To:", log62.recipient),
48180
- kv("From:", log62.from),
48181
- kv("Subject:", log62.subject),
48182
- kv("Source:", log62.sourceType),
48177
+ kv("Message ID:", log63.messageId),
48178
+ kv("Status:", log63.status ? colorStatus(log63.status) : null),
48179
+ kv("To:", log63.recipient),
48180
+ kv("From:", log63.from),
48181
+ kv("Subject:", log63.subject),
48182
+ kv("Source:", log63.sourceType),
48183
48183
  kv("Sent:", sentAt),
48184
48184
  kv("Delivered:", deliveredAt),
48185
48185
  kv("Bounced:", bouncedAt),
48186
- ...log62.bouncedSubType ? [kv("Bounce type:", log62.bouncedSubType)] : [],
48186
+ ...log63.bouncedSubType ? [kv("Bounce type:", log63.bouncedSubType)] : [],
48187
48187
  kv("Created:", createdAt)
48188
48188
  ];
48189
48189
  clack30.note(
48190
48190
  lines.join("\n"),
48191
- `Log Detail \u2014 ${log62.messageId ?? "(no message id)"}`
48191
+ `Log Detail \u2014 ${log63.messageId ?? "(no message id)"}`
48192
48192
  );
48193
48193
  }
48194
48194
 
@@ -55719,7 +55719,7 @@ import pc44 from "picocolors";
55719
55719
  // src/utils/license.ts
55720
55720
  init_esm_shims();
55721
55721
  import { sign as sign2 } from "crypto";
55722
- var VALID_TIERS = ["starter", "growth", "scale"];
55722
+ var VALID_TIERS = ["pro", "business", "starter", "growth", "scale"];
55723
55723
  function generateLicenseKey(tier, expires) {
55724
55724
  if (!VALID_TIERS.includes(tier)) {
55725
55725
  throw new Error(
@@ -55743,7 +55743,7 @@ function generateLicenseKey(tier, expires) {
55743
55743
 
55744
55744
  // src/commands/license/generate.ts
55745
55745
  init_json_output();
55746
- var VALID_TIERS2 = ["starter", "growth", "scale"];
55746
+ var VALID_TIERS2 = ["pro", "business", "starter", "growth", "scale"];
55747
55747
  async function licenseGenerate(options) {
55748
55748
  if (!isJsonMode()) {
55749
55749
  clack43.intro(pc44.bold("Wraps License Key Generator"));
@@ -57305,54 +57305,285 @@ ${pc47.bold("Next Steps:")}`);
57305
57305
  }
57306
57306
  }
57307
57307
 
57308
+ // src/commands/platform/disconnect.ts
57309
+ init_esm_shims();
57310
+ init_dist();
57311
+ import {
57312
+ DeleteRoleCommand as DeleteRoleCommand2,
57313
+ DeleteRolePolicyCommand as DeleteRolePolicyCommand2,
57314
+ IAMClient as IAMClient4
57315
+ } from "@aws-sdk/client-iam";
57316
+ import { confirm as confirm22, intro as intro40, isCancel as isCancel30, log as log42, outro as outro27 } from "@clack/prompts";
57317
+ import * as pulumi27 from "@pulumi/pulumi";
57318
+ import pc48 from "picocolors";
57319
+ init_aws();
57320
+ init_errors();
57321
+ init_fs();
57322
+ init_json_output();
57323
+ init_metadata();
57324
+ init_output();
57325
+ init_prompts();
57326
+ init_pulumi();
57327
+ init_region_resolver();
57328
+ async function removeConsoleAccessRole(region) {
57329
+ const iam13 = new IAMClient4({ region });
57330
+ try {
57331
+ await iam13.send(
57332
+ new DeleteRolePolicyCommand2({
57333
+ RoleName: CONSOLE_ACCESS_ROLE_NAME,
57334
+ PolicyName: "wraps-console-access-policy"
57335
+ })
57336
+ );
57337
+ } catch (error) {
57338
+ if (!isAWSNotFoundError(error)) {
57339
+ throw error;
57340
+ }
57341
+ }
57342
+ try {
57343
+ await iam13.send(
57344
+ new DeleteRoleCommand2({ RoleName: CONSOLE_ACCESS_ROLE_NAME })
57345
+ );
57346
+ return true;
57347
+ } catch (error) {
57348
+ if (isAWSNotFoundError(error)) {
57349
+ return false;
57350
+ }
57351
+ throw error;
57352
+ }
57353
+ }
57354
+ async function disconnect(options) {
57355
+ const json = isJsonMode();
57356
+ if (!json) {
57357
+ intro40(pc48.bold("Disconnect from Wraps Platform"));
57358
+ }
57359
+ const progress = new DeploymentProgress();
57360
+ try {
57361
+ await progress.execute(
57362
+ "Checking Pulumi CLI installation",
57363
+ async () => await ensurePulumiInstalled()
57364
+ );
57365
+ const identity = await progress.execute(
57366
+ "Validating AWS credentials",
57367
+ async () => validateAWSCredentials()
57368
+ );
57369
+ const region = await resolveRegionForCommand({
57370
+ accountId: identity.accountId,
57371
+ optionRegion: options.region,
57372
+ label: "connection"
57373
+ });
57374
+ const metadata = await loadConnectionMetadata(identity.accountId, region);
57375
+ if (!metadata) {
57376
+ progress.stop();
57377
+ if (json) {
57378
+ jsonError("platform.disconnect", {
57379
+ code: "NO_DEPLOYMENT",
57380
+ message: `No Wraps deployment found for account ${identity.accountId} in ${region}.`,
57381
+ suggestion: "Run `wraps email init` to deploy infrastructure first."
57382
+ });
57383
+ return;
57384
+ }
57385
+ log42.error(
57386
+ `No Wraps deployment found for account ${pc48.cyan(identity.accountId)} in region ${pc48.cyan(region)}`
57387
+ );
57388
+ process.exit(1);
57389
+ }
57390
+ const emailService = metadata.services.email;
57391
+ if (!emailService?.config) {
57392
+ progress.stop();
57393
+ if (json) {
57394
+ jsonError("platform.disconnect", {
57395
+ code: "NO_EMAIL_SERVICE",
57396
+ message: "No email service deployed in this region.",
57397
+ suggestion: "Run `wraps email init` first."
57398
+ });
57399
+ return;
57400
+ }
57401
+ log42.error("No email service deployed in this region.");
57402
+ process.exit(1);
57403
+ }
57404
+ if (!emailService.webhookSecret) {
57405
+ progress.stop();
57406
+ if (json) {
57407
+ jsonSuccess("platform.disconnect", {
57408
+ accountId: identity.accountId,
57409
+ region,
57410
+ disconnected: false,
57411
+ reason: "not connected"
57412
+ });
57413
+ return;
57414
+ }
57415
+ log42.info("This account is not connected to the Wraps Platform.");
57416
+ outro27("Nothing to do");
57417
+ return;
57418
+ }
57419
+ const stillSelfhosted = !!emailService.selfhostWebhook;
57420
+ if (!(options.force || options.yes || json)) {
57421
+ progress.stop();
57422
+ log42.warn(
57423
+ `SES events from AWS account ${pc48.cyan(identity.accountId)} will stop reaching ${pc48.cyan("app.wraps.dev")}.`
57424
+ );
57425
+ log42.info(
57426
+ [
57427
+ "This does NOT affect sending \u2014 your mail flows through your own SES.",
57428
+ `Wraps' cross-account IAM role (${pc48.cyan(CONSOLE_ACCESS_ROLE_NAME)}) will be deleted, revoking dashboard access to this account.`,
57429
+ stillSelfhosted ? `Your self-hosted control plane (${pc48.cyan(emailService.selfhostWebhook?.url ?? "self-hosted")}) keeps receiving events.` : "Dashboard email logs and analytics will stop updating for this account."
57430
+ ].join("\n ")
57431
+ );
57432
+ const confirmed = await confirm22({
57433
+ message: "Disconnect from the Wraps Platform?",
57434
+ initialValue: false
57435
+ });
57436
+ if (isCancel30(confirmed) || !confirmed) {
57437
+ outro27("Disconnect cancelled");
57438
+ return;
57439
+ }
57440
+ }
57441
+ emailService.webhookSecret = void 0;
57442
+ emailService.webhookUrl = void 0;
57443
+ await saveConnectionMetadata(metadata);
57444
+ if (metadata.provider === "vercel" && !metadata.vercel) {
57445
+ progress.stop();
57446
+ metadata.vercel = await promptVercelConfig();
57447
+ }
57448
+ const stackConfig = buildEmailStackConfig(metadata, region, {
57449
+ webhook: void 0
57450
+ });
57451
+ await progress.execute("Removing platform event target", async () => {
57452
+ await ensurePulumiWorkDir({ accountId: identity.accountId, region });
57453
+ const stack = await pulumi27.automation.LocalWorkspace.createOrSelectStack(
57454
+ {
57455
+ stackName: emailService.pulumiStackName || `wraps-${identity.accountId}-${region}`,
57456
+ projectName: "wraps-email",
57457
+ program: async () => {
57458
+ const result = await deployEmailStack(stackConfig);
57459
+ return {
57460
+ roleArn: result.roleArn,
57461
+ configSetName: result.configSetName,
57462
+ tableName: result.tableName,
57463
+ region: result.region
57464
+ };
57465
+ }
57466
+ },
57467
+ {
57468
+ workDir: getPulumiWorkDir(),
57469
+ envVars: {
57470
+ PULUMI_CONFIG_PASSPHRASE: "",
57471
+ AWS_REGION: region
57472
+ },
57473
+ secretsProvider: "passphrase"
57474
+ }
57475
+ );
57476
+ await stack.setConfig("aws:region", { value: region });
57477
+ await stack.refresh({ onOutput: () => {
57478
+ } });
57479
+ const stackState = await stack.exportStack();
57480
+ const resourceCount = stackState.deployment?.resources?.length ?? 0;
57481
+ if (resourceCount > 1) {
57482
+ stackConfig.skipResourceImports = true;
57483
+ }
57484
+ await stack.up({ onOutput: () => {
57485
+ } });
57486
+ });
57487
+ progress.succeed("Platform event target removed");
57488
+ const roleRemoved = await progress.execute(
57489
+ "Revoking dashboard access",
57490
+ async () => removeConsoleAccessRole(region)
57491
+ );
57492
+ metadata.platform = void 0;
57493
+ await saveConnectionMetadata(metadata);
57494
+ if (json) {
57495
+ jsonSuccess("platform.disconnect", {
57496
+ accountId: identity.accountId,
57497
+ region,
57498
+ disconnected: true,
57499
+ selfhostWebhookRetained: stillSelfhosted,
57500
+ consoleAccessRoleRemoved: roleRemoved
57501
+ });
57502
+ return;
57503
+ }
57504
+ console.log();
57505
+ log42.success("Disconnected from the Wraps Platform.");
57506
+ console.log();
57507
+ console.log(
57508
+ ` SES events from ${pc48.cyan(identity.accountId)} no longer reach app.wraps.dev.`
57509
+ );
57510
+ console.log(
57511
+ roleRemoved ? ` Wraps' cross-account access role was deleted \u2014 the dashboard can no longer read this account.` : " No cross-account access role was present to remove."
57512
+ );
57513
+ if (stillSelfhosted) {
57514
+ console.log(
57515
+ ` Your self-hosted plane at ${pc48.cyan(emailService.selfhostWebhook?.url ?? "")} is unchanged.`
57516
+ );
57517
+ }
57518
+ console.log(
57519
+ pc48.dim(` Reconnect any time with ${pc48.cyan("wraps platform connect")}.`)
57520
+ );
57521
+ console.log();
57522
+ outro27("Done");
57523
+ } catch (error) {
57524
+ progress.stop();
57525
+ if (json) {
57526
+ jsonError("platform.disconnect", {
57527
+ code: "DISCONNECT_FAILED",
57528
+ message: error instanceof Error ? error.message : String(error)
57529
+ });
57530
+ return;
57531
+ }
57532
+ throw error;
57533
+ }
57534
+ }
57535
+
57308
57536
  // src/commands/platform/index.ts
57309
57537
  init_esm_shims();
57310
57538
  import * as clack46 from "@clack/prompts";
57311
- import pc48 from "picocolors";
57539
+ import pc49 from "picocolors";
57312
57540
  async function platform2() {
57313
- clack46.intro(pc48.bold("Wraps Platform"));
57541
+ clack46.intro(pc49.bold("Wraps Platform"));
57314
57542
  console.log();
57315
57543
  console.log(
57316
57544
  " The Wraps Platform extends the free CLI with hosted features:"
57317
57545
  );
57318
57546
  console.log();
57319
- console.log(` ${pc48.bold("Features:")}`);
57320
- console.log(` ${pc48.green("\u2713")} Visual email template editor`);
57321
- console.log(` ${pc48.green("\u2713")} Broadcast campaigns & scheduling`);
57322
- console.log(` ${pc48.green("\u2713")} Contact management & segments`);
57323
- console.log(` ${pc48.green("\u2713")} Workflow automations`);
57324
- console.log(` ${pc48.green("\u2713")} Analytics dashboard`);
57325
- console.log(` ${pc48.green("\u2713")} Team collaboration`);
57547
+ console.log(` ${pc49.bold("Features:")}`);
57548
+ console.log(` ${pc49.green("\u2713")} Visual email template editor`);
57549
+ console.log(` ${pc49.green("\u2713")} Broadcast campaigns & scheduling`);
57550
+ console.log(` ${pc49.green("\u2713")} Contact management & segments`);
57551
+ console.log(` ${pc49.green("\u2713")} Workflow automations`);
57552
+ console.log(` ${pc49.green("\u2713")} Analytics dashboard`);
57553
+ console.log(` ${pc49.green("\u2713")} Team collaboration`);
57326
57554
  console.log();
57327
- console.log(` ${pc48.bold("Pricing:")}`);
57328
- console.log(` ${pc48.cyan("Starter")} $10/mo 5,000 contacts`);
57329
- console.log(` ${pc48.cyan("Growth")} $25/mo 25,000 contacts`);
57330
- console.log(` ${pc48.cyan("Scale")} $50/mo 100,000 contacts`);
57331
- console.log(` ${pc48.cyan("Enterprise")} Custom Unlimited contacts`);
57555
+ console.log(` ${pc49.bold("Pricing:")}`);
57556
+ console.log(` ${pc49.cyan("Starter")} $10/mo 5,000 contacts`);
57557
+ console.log(` ${pc49.cyan("Growth")} $25/mo 25,000 contacts`);
57558
+ console.log(` ${pc49.cyan("Scale")} $50/mo 100,000 contacts`);
57559
+ console.log(` ${pc49.cyan("Enterprise")} Custom Unlimited contacts`);
57332
57560
  console.log();
57333
57561
  console.log(
57334
- pc48.dim(" + AWS costs at $0.10 per 1,000 emails (paid directly to AWS)")
57562
+ pc49.dim(" + AWS costs at $0.10 per 1,000 emails (paid directly to AWS)")
57335
57563
  );
57336
57564
  console.log();
57337
57565
  console.log(
57338
- ` ${pc48.bold("Learn more:")} ${pc48.cyan("https://wraps.dev/platform")}`
57566
+ ` ${pc49.bold("Learn more:")} ${pc49.cyan("https://wraps.dev/platform")}`
57339
57567
  );
57340
57568
  console.log();
57341
- console.log(pc48.dim("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
57569
+ console.log(pc49.dim("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
57342
57570
  console.log();
57343
- console.log(` ${pc48.bold("Platform Commands:")}`);
57571
+ console.log(` ${pc49.bold("Platform Commands:")}`);
57344
57572
  console.log();
57345
57573
  console.log(
57346
- ` ${pc48.cyan("wraps platform connect")} Connect infrastructure to Wraps Platform`
57574
+ ` ${pc49.cyan("wraps platform connect")} Connect infrastructure to Wraps Platform`
57347
57575
  );
57348
57576
  console.log(
57349
- ` ${pc48.cyan("wraps platform update-role")} Update IAM permissions for dashboard`
57577
+ ` ${pc49.cyan("wraps platform disconnect")} Stop streaming events to Wraps Platform`
57578
+ );
57579
+ console.log(
57580
+ ` ${pc49.cyan("wraps platform update-role")} Update IAM permissions for dashboard`
57350
57581
  );
57351
57582
  console.log();
57352
57583
  console.log(
57353
- pc48.dim(" The connect command sets up event streaming and IAM permissions")
57584
+ pc49.dim(" The connect command sets up event streaming and IAM permissions")
57354
57585
  );
57355
- console.log(pc48.dim(" in one step. Run it after deploying infrastructure."));
57586
+ console.log(pc49.dim(" in one step. Run it after deploying infrastructure."));
57356
57587
  console.log();
57357
57588
  }
57358
57589
 
@@ -57368,15 +57599,15 @@ init_region_resolver();
57368
57599
  import {
57369
57600
  CreateRoleCommand as CreateRoleCommand2,
57370
57601
  GetRoleCommand as GetRoleCommand2,
57371
- IAMClient as IAMClient4,
57602
+ IAMClient as IAMClient5,
57372
57603
  UpdateAssumeRolePolicyCommand as UpdateAssumeRolePolicyCommand2
57373
57604
  } from "@aws-sdk/client-iam";
57374
- import { confirm as confirm22, intro as intro41, isCancel as isCancel30, log as log42, outro as outro27 } from "@clack/prompts";
57375
- import pc49 from "picocolors";
57605
+ import { confirm as confirm23, intro as intro42, isCancel as isCancel31, log as log43, outro as outro28 } from "@clack/prompts";
57606
+ import pc50 from "picocolors";
57376
57607
  async function updateRole(options) {
57377
57608
  const startTime = Date.now();
57378
57609
  if (!isJsonMode()) {
57379
- intro41(pc49.bold("Update Platform Access Role"));
57610
+ intro42(pc50.bold("Update Platform Access Role"));
57380
57611
  }
57381
57612
  const progress = new DeploymentProgress();
57382
57613
  const identity = await progress.execute(
@@ -57391,19 +57622,19 @@ async function updateRole(options) {
57391
57622
  const metadata = await loadConnectionMetadata(identity.accountId, region);
57392
57623
  if (!metadata) {
57393
57624
  progress.stop();
57394
- log42.error(
57395
- `No Wraps deployment found for account ${pc49.cyan(identity.accountId)} in region ${pc49.cyan(region)}`
57625
+ log43.error(
57626
+ `No Wraps deployment found for account ${pc50.cyan(identity.accountId)} in region ${pc50.cyan(region)}`
57396
57627
  );
57397
57628
  console.log(
57398
57629
  `
57399
- Run ${pc49.cyan("wraps email init")} to deploy infrastructure first.
57630
+ Run ${pc50.cyan("wraps email init")} to deploy infrastructure first.
57400
57631
  `
57401
57632
  );
57402
57633
  process.exit(1);
57403
57634
  }
57404
57635
  const selfhosted = options.selfhosted === true;
57405
57636
  const roleName = selfhosted ? SELFHOST_CONSOLE_ACCESS_ROLE_NAME : CONSOLE_ACCESS_ROLE_NAME;
57406
- const iam13 = new IAMClient4({ region: "us-east-1" });
57637
+ const iam13 = new IAMClient5({ region: "us-east-1" });
57407
57638
  const WRAPS_PLATFORM_ACCOUNT_ID2 = "905130073023";
57408
57639
  const trustedAccountId = selfhosted ? metadata.accountId : WRAPS_PLATFORM_ACCOUNT_ID2;
57409
57640
  let roleExists2 = false;
@@ -57419,13 +57650,13 @@ Run ${pc49.cyan("wraps email init")} to deploy infrastructure first.
57419
57650
  const externalId = selfhosted ? metadata.selfhostPlatform?.externalId : metadata.platform?.externalId;
57420
57651
  if (!(roleExists2 || externalId)) {
57421
57652
  progress.stop();
57422
- log42.warn(`IAM role ${pc49.cyan(roleName)} does not exist`);
57653
+ log43.warn(`IAM role ${pc50.cyan(roleName)} does not exist`);
57423
57654
  if (selfhosted) {
57424
57655
  console.log(
57425
57656
  "\nThis role is created when your self-hosted control plane connects this AWS account."
57426
57657
  );
57427
57658
  console.log(
57428
- `Run ${pc49.cyan("wraps selfhost connect")} to create the role automatically.
57659
+ `Run ${pc50.cyan("wraps selfhost connect")} to create the role automatically.
57429
57660
  `
57430
57661
  );
57431
57662
  } else {
@@ -57433,28 +57664,28 @@ Run ${pc49.cyan("wraps email init")} to deploy infrastructure first.
57433
57664
  "\nThis role is created when you connect AWS accounts through the Wraps Platform."
57434
57665
  );
57435
57666
  console.log(
57436
- `Run ${pc49.cyan("wraps platform connect")} while logged in to create the role automatically.
57667
+ `Run ${pc50.cyan("wraps platform connect")} while logged in to create the role automatically.
57437
57668
  `
57438
57669
  );
57439
57670
  }
57440
57671
  process.exit(0);
57441
57672
  }
57442
57673
  if (roleExists2) {
57443
- progress.info(`Found IAM role: ${pc49.cyan(roleName)}`);
57674
+ progress.info(`Found IAM role: ${pc50.cyan(roleName)}`);
57444
57675
  } else {
57445
57676
  progress.info(
57446
- `IAM role ${pc49.cyan(roleName)} not found \u2014 will create it using stored externalId`
57677
+ `IAM role ${pc50.cyan(roleName)} not found \u2014 will create it using stored externalId`
57447
57678
  );
57448
57679
  }
57449
57680
  if (!options.force) {
57450
57681
  progress.stop();
57451
57682
  const actionLabel = roleExists2 ? "Update" : "Create";
57452
- const shouldContinue = await confirm22({
57453
- message: `${actionLabel} IAM role ${pc49.cyan(roleName)} with latest permissions?`,
57683
+ const shouldContinue = await confirm23({
57684
+ message: `${actionLabel} IAM role ${pc50.cyan(roleName)} with latest permissions?`,
57454
57685
  initialValue: true
57455
57686
  });
57456
- if (isCancel30(shouldContinue) || !shouldContinue) {
57457
- outro27(`${actionLabel} cancelled`);
57687
+ if (isCancel31(shouldContinue) || !shouldContinue) {
57688
+ outro28(`${actionLabel} cancelled`);
57458
57689
  process.exit(0);
57459
57690
  }
57460
57691
  }
@@ -57560,51 +57791,51 @@ Run ${pc49.cyan("wraps email init")} to deploy infrastructure first.
57560
57791
  });
57561
57792
  return;
57562
57793
  }
57563
- outro27(pc49.green(`\u2713 Platform access role ${actionVerb} successfully`));
57794
+ outro28(pc50.green(`\u2713 Platform access role ${actionVerb} successfully`));
57564
57795
  console.log(`
57565
- ${pc49.bold("Permissions:")}`);
57796
+ ${pc50.bold("Permissions:")}`);
57566
57797
  console.log(`
57567
- ${pc49.bold(pc49.cyan("Email:"))}`);
57798
+ ${pc50.bold(pc50.cyan("Email:"))}`);
57568
57799
  console.log(
57569
- ` ${pc49.green("\u2713")} SES metrics and identity verification (always enabled)`
57800
+ ` ${pc50.green("\u2713")} SES metrics and identity verification (always enabled)`
57570
57801
  );
57571
- console.log(` ${pc49.green("\u2713")} SES template management (always enabled)`);
57572
- console.log(` ${pc49.green("\u2713")} Inbound bucket detection (always enabled)`);
57802
+ console.log(` ${pc50.green("\u2713")} SES template management (always enabled)`);
57803
+ console.log(` ${pc50.green("\u2713")} Inbound bucket detection (always enabled)`);
57573
57804
  if (sendingEnabled) {
57574
- console.log(` ${pc49.green("\u2713")} Email sending via SES`);
57805
+ console.log(` ${pc50.green("\u2713")} Email sending via SES`);
57575
57806
  }
57576
57807
  console.log(
57577
- ` ${pc49.green("\u2713")} DynamoDB read access (including DescribeTable)`
57808
+ ` ${pc50.green("\u2713")} DynamoDB read access (including DescribeTable)`
57578
57809
  );
57579
57810
  if (eventTracking?.enabled) {
57580
- console.log(` ${pc49.green("\u2713")} EventBridge and SQS access`);
57811
+ console.log(` ${pc50.green("\u2713")} EventBridge and SQS access`);
57581
57812
  }
57582
57813
  if (emailArchiving?.enabled) {
57583
- console.log(` ${pc49.green("\u2713")} Mail Manager Archive access`);
57814
+ console.log(` ${pc50.green("\u2713")} Mail Manager Archive access`);
57584
57815
  }
57585
57816
  const inbound = emailConfig?.inbound;
57586
57817
  if (inbound?.enabled) {
57587
- console.log(` ${pc49.green("\u2713")} S3 access for inbound email`);
57818
+ console.log(` ${pc50.green("\u2713")} S3 access for inbound email`);
57588
57819
  }
57589
57820
  if (smsEnabled) {
57590
57821
  console.log(`
57591
- ${pc49.bold(pc49.cyan("SMS:"))}`);
57822
+ ${pc50.bold(pc50.cyan("SMS:"))}`);
57592
57823
  console.log(
57593
- ` ${pc49.green("\u2713")} SMS Voice V2 read access (phone numbers, config, registrations)`
57824
+ ` ${pc50.green("\u2713")} SMS Voice V2 read access (phone numbers, config, registrations)`
57594
57825
  );
57595
57826
  if (smsSendingEnabled) {
57596
- console.log(` ${pc49.green("\u2713")} SMS sending via SMS Voice V2`);
57827
+ console.log(` ${pc50.green("\u2713")} SMS sending via SMS Voice V2`);
57597
57828
  }
57598
57829
  if (smsEventTracking?.dynamoDBHistory) {
57599
- console.log(` ${pc49.green("\u2713")} DynamoDB read access for SMS history`);
57830
+ console.log(` ${pc50.green("\u2713")} DynamoDB read access for SMS history`);
57600
57831
  }
57601
57832
  if (smsEventTracking?.enabled) {
57602
- console.log(` ${pc49.green("\u2713")} SNS topic access for SMS events`);
57833
+ console.log(` ${pc50.green("\u2713")} SNS topic access for SMS events`);
57603
57834
  }
57604
57835
  }
57605
57836
  console.log(
57606
57837
  `
57607
- ${pc49.dim(`The Wraps Platform will now have ${actionVerb} permissions for feature detection.`)}
57838
+ ${pc50.dim(`The Wraps Platform will now have ${actionVerb} permissions for feature detection.`)}
57608
57839
  `
57609
57840
  );
57610
57841
  }
@@ -57802,12 +58033,12 @@ function buildConsolePolicyDocument2(emailConfig, smsConfig) {
57802
58033
  init_esm_shims();
57803
58034
  init_events();
57804
58035
  import * as clack47 from "@clack/prompts";
57805
- import pc50 from "picocolors";
58036
+ import pc51 from "picocolors";
57806
58037
 
57807
58038
  // src/utils/selfhost/email-stack.ts
57808
58039
  init_esm_shims();
57809
58040
  init_dist();
57810
- import { GetRoleCommand as GetRoleCommand3, IAMClient as IAMClient5 } from "@aws-sdk/client-iam";
58041
+ import { GetRoleCommand as GetRoleCommand3, IAMClient as IAMClient6 } from "@aws-sdk/client-iam";
57811
58042
  import {
57812
58043
  ListConfigurationSetsCommand as ListConfigurationSetsCommand2,
57813
58044
  ListEmailIdentitiesCommand,
@@ -57815,7 +58046,7 @@ import {
57815
58046
  } from "@aws-sdk/client-sesv2";
57816
58047
  async function detectEmailStack(region) {
57817
58048
  try {
57818
- const iam13 = new IAMClient5({ region });
58049
+ const iam13 = new IAMClient6({ region });
57819
58050
  const ses = new SESv2Client9({ region });
57820
58051
  const [roleResult, setsResult, identitiesResult] = await Promise.allSettled(
57821
58052
  [
@@ -57866,7 +58097,7 @@ init_region_resolver();
57866
58097
  async function selfhostEnv(options) {
57867
58098
  const startTime = Date.now();
57868
58099
  if (!isJsonMode()) {
57869
- clack47.intro(pc50.bold("Wraps Self-Hosted \u2014 Vercel Environment Variables"));
58100
+ clack47.intro(pc51.bold("Wraps Self-Hosted \u2014 Vercel Environment Variables"));
57870
58101
  }
57871
58102
  const identity = await validateAWSCredentials();
57872
58103
  const region = await resolveRegionForCommand({
@@ -57880,7 +58111,7 @@ async function selfhostEnv(options) {
57880
58111
  clack47.log.error("No self-hosted deployment found");
57881
58112
  console.log(
57882
58113
  `
57883
- Run ${pc50.cyan("pnpm selfhost:deploy")} from your fork to deploy the self-hosted control plane.
58114
+ Run ${pc51.cyan("pnpm selfhost:deploy")} from your fork to deploy the self-hosted control plane.
57884
58115
  `
57885
58116
  );
57886
58117
  process.exit(1);
@@ -57894,7 +58125,7 @@ Run ${pc50.cyan("pnpm selfhost:deploy")} from your fork to deploy the self-hoste
57894
58125
  );
57895
58126
  console.log(
57896
58127
  `
57897
- The deployment may have failed partway through. Run ${pc50.cyan("pnpm selfhost:upgrade")} from your fork to complete it.
58128
+ The deployment may have failed partway through. Run ${pc51.cyan("pnpm selfhost:upgrade")} from your fork to complete it.
57898
58129
  `
57899
58130
  );
57900
58131
  process.exit(1);
@@ -58000,7 +58231,7 @@ The deployment may have failed partway through. Run ${pc50.cyan("pnpm selfhost:u
58000
58231
  `# AWS_ROLE_ARN=arn:aws:iam::${identity.accountId}:role/<your-vercel-backend-role>`
58001
58232
  );
58002
58233
  clack47.outro(
58003
- pc50.dim(
58234
+ pc51.dim(
58004
58235
  "Paste into Vercel \u2192 Settings \u2192 Environment Variables \u2192 Add from .env"
58005
58236
  )
58006
58237
  );
@@ -58015,7 +58246,7 @@ init_esm_shims();
58015
58246
  init_events();
58016
58247
  import * as clack48 from "@clack/prompts";
58017
58248
  import open2 from "open";
58018
- import pc51 from "picocolors";
58249
+ import pc52 from "picocolors";
58019
58250
  init_aws();
58020
58251
  init_config();
58021
58252
  init_json_output();
@@ -58024,7 +58255,7 @@ init_region_resolver();
58024
58255
  async function selfhostLogin(options) {
58025
58256
  const startTime = Date.now();
58026
58257
  if (!isJsonMode()) {
58027
- clack48.intro(pc51.bold("Wraps Self-Hosted \u203A Sign In"));
58258
+ clack48.intro(pc52.bold("Wraps Self-Hosted \u203A Sign In"));
58028
58259
  }
58029
58260
  const identity = await validateAWSCredentials();
58030
58261
  const region = await resolveRegionForCommand({
@@ -58038,7 +58269,7 @@ async function selfhostLogin(options) {
58038
58269
  clack48.log.error("No self-hosted deployment found.");
58039
58270
  console.log(
58040
58271
  `
58041
- Run ${pc51.cyan("pnpm selfhost:deploy")} from your fork to deploy the self-hosted control plane first.
58272
+ Run ${pc52.cyan("pnpm selfhost:deploy")} from your fork to deploy the self-hosted control plane first.
58042
58273
  `
58043
58274
  );
58044
58275
  process.exit(1);
@@ -58046,7 +58277,7 @@ Run ${pc51.cyan("pnpm selfhost:deploy")} from your fork to deploy the self-hoste
58046
58277
  }
58047
58278
  const { appUrl: baseURL } = metadata.services.selfhost.config;
58048
58279
  const apiUrl = await reconcileSelfhostApiUrl(metadata, region);
58049
- clack48.log.info(`Connecting to: ${pc51.cyan(baseURL)}`);
58280
+ clack48.log.info(`Connecting to: ${pc52.cyan(baseURL)}`);
58050
58281
  const authClient = createCliAuthClient(baseURL);
58051
58282
  const spinner11 = clack48.spinner();
58052
58283
  const { data: codeData, error: codeError } = await authClient.device.code({
@@ -58062,14 +58293,14 @@ Run ${pc51.cyan("pnpm selfhost:deploy")} from your fork to deploy the self-hoste
58062
58293
  step: "request_code"
58063
58294
  });
58064
58295
  clack48.log.error(
58065
- `Failed to reach ${pc51.cyan(baseURL)}. Make sure the dashboard is deployed and reachable.`
58296
+ `Failed to reach ${pc52.cyan(baseURL)}. Make sure the dashboard is deployed and reachable.`
58066
58297
  );
58067
58298
  throw new Error("Failed to start device authorization.");
58068
58299
  }
58069
58300
  const { device_code, user_code, interval, expires_in } = codeData;
58070
58301
  const formatted = `${user_code.slice(0, 4)}-${user_code.slice(4)}`;
58071
- clack48.log.info(`Your code: ${pc51.bold(pc51.cyan(formatted))}`);
58072
- clack48.log.info(`Visit: ${pc51.underline(`${baseURL}/device`)}`);
58302
+ clack48.log.info(`Your code: ${pc52.bold(pc52.cyan(formatted))}`);
58303
+ clack48.log.info(`Visit: ${pc52.underline(`${baseURL}/device`)}`);
58073
58304
  try {
58074
58305
  await open2(`${baseURL}/device?user_code=${user_code}`);
58075
58306
  clack48.log.info("Opening browser...");
@@ -58106,18 +58337,18 @@ Run ${pc51.cyan("pnpm selfhost:deploy")} from your fork to deploy the self-hoste
58106
58337
  });
58107
58338
  clack48.log.success("Signed in to your self-hosted Wraps instance.");
58108
58339
  if (organizations.length === 1) {
58109
- clack48.log.info(`Organization: ${pc51.cyan(organizations[0].name)}`);
58340
+ clack48.log.info(`Organization: ${pc52.cyan(organizations[0].name)}`);
58110
58341
  } else if (organizations.length > 1) {
58111
58342
  clack48.log.info(`${organizations.length} organizations available`);
58112
58343
  } else {
58113
58344
  clack48.log.info(
58114
- `No organizations found. Create one at ${pc51.underline(`${baseURL}/onboarding`)} and run ${pc51.cyan("wraps selfhost login")} again.`
58345
+ `No organizations found. Create one at ${pc52.underline(`${baseURL}/onboarding`)} and run ${pc52.cyan("wraps selfhost login")} again.`
58115
58346
  );
58116
58347
  }
58117
58348
  if (isJsonMode()) {
58118
58349
  jsonSuccess("selfhost.login", { tokenType: "session", organizations });
58119
58350
  } else {
58120
- clack48.outro(pc51.green("Done!"));
58351
+ clack48.outro(pc52.green("Done!"));
58121
58352
  }
58122
58353
  return;
58123
58354
  }
@@ -58165,10 +58396,10 @@ init_json_output();
58165
58396
  init_metadata();
58166
58397
  init_region_resolver();
58167
58398
  import * as clack49 from "@clack/prompts";
58168
- import pc52 from "picocolors";
58399
+ import pc53 from "picocolors";
58169
58400
  async function selfhostLogout(options) {
58170
58401
  if (!isJsonMode()) {
58171
- clack49.intro(pc52.bold("Wraps Self-Hosted \u203A Sign Out"));
58402
+ clack49.intro(pc53.bold("Wraps Self-Hosted \u203A Sign Out"));
58172
58403
  }
58173
58404
  const identity = await validateAWSCredentials();
58174
58405
  const region = await resolveRegionForCommand({
@@ -58182,7 +58413,7 @@ async function selfhostLogout(options) {
58182
58413
  clack49.log.error("No self-hosted deployment found.");
58183
58414
  console.log(
58184
58415
  `
58185
- Run ${pc52.cyan("pnpm selfhost:deploy")} from your fork to deploy the self-hosted control plane first.
58416
+ Run ${pc53.cyan("pnpm selfhost:deploy")} from your fork to deploy the self-hosted control plane first.
58186
58417
  `
58187
58418
  );
58188
58419
  process.exit(1);
@@ -58201,7 +58432,7 @@ Run ${pc52.cyan("pnpm selfhost:deploy")} from your fork to deploy the self-hoste
58201
58432
  });
58202
58433
  return;
58203
58434
  }
58204
- clack49.log.info(`Not signed in to ${pc52.cyan(baseURL)}.`);
58435
+ clack49.log.info(`Not signed in to ${pc53.cyan(baseURL)}.`);
58205
58436
  return;
58206
58437
  }
58207
58438
  await clearSelfhostAuth(baseURL);
@@ -58210,13 +58441,13 @@ Run ${pc52.cyan("pnpm selfhost:deploy")} from your fork to deploy the self-hoste
58210
58441
  jsonSuccess("selfhost.logout", { loggedOut: true });
58211
58442
  return;
58212
58443
  }
58213
- clack49.log.success(`Signed out of ${pc52.cyan(baseURL)}.`);
58444
+ clack49.log.success(`Signed out of ${pc53.cyan(baseURL)}.`);
58214
58445
  }
58215
58446
 
58216
58447
  // src/commands/selfhost/logs.ts
58217
58448
  init_esm_shims();
58218
58449
  import * as clack50 from "@clack/prompts";
58219
- import pc53 from "picocolors";
58450
+ import pc54 from "picocolors";
58220
58451
 
58221
58452
  // src/utils/selfhost/logs.ts
58222
58453
  init_esm_shims();
@@ -58555,10 +58786,10 @@ var MAX_INTERVAL_SECONDS = 60;
58555
58786
  var FOLLOW_BACKFILL_MS = 5 * 60 * 1e3;
58556
58787
  var MAX_ENTRIES = 1e3;
58557
58788
  var SOURCE_COLORS = {
58558
- api: pc53.cyan,
58559
- web: pc53.magenta,
58560
- workers: pc53.blue,
58561
- other: pc53.gray
58789
+ api: pc54.cyan,
58790
+ web: pc54.magenta,
58791
+ workers: pc54.blue,
58792
+ other: pc54.gray
58562
58793
  };
58563
58794
  function formatTime(timestamp) {
58564
58795
  const date2 = new Date(timestamp);
@@ -58567,25 +58798,25 @@ function formatTime(timestamp) {
58567
58798
  }
58568
58799
  function colorLevel(level) {
58569
58800
  if (!level) {
58570
- return pc53.dim(" ");
58801
+ return pc54.dim(" ");
58571
58802
  }
58572
58803
  const padded = level.padEnd(5).slice(0, 5);
58573
58804
  if (level === "ERROR" || level === "FATAL" || level === "CRITICAL") {
58574
- return pc53.red(padded);
58805
+ return pc54.red(padded);
58575
58806
  }
58576
58807
  if (level === "WARN") {
58577
- return pc53.yellow(padded);
58808
+ return pc54.yellow(padded);
58578
58809
  }
58579
58810
  if (level === "INFO") {
58580
- return pc53.green(padded);
58811
+ return pc54.green(padded);
58581
58812
  }
58582
- return pc53.dim(padded);
58813
+ return pc54.dim(padded);
58583
58814
  }
58584
58815
  function renderEntry(entry, options) {
58585
58816
  const level = detectLevel(entry.message);
58586
58817
  const label = logSourceLabel(entry.source).padEnd(options.sourceWidth);
58587
58818
  const body = options.verbose ? entry.message : formatMessageBody(entry.message);
58588
- return `${pc53.dim(formatTime(entry.timestamp))} ${SOURCE_COLORS[entry.source](label)} ${colorLevel(level)} ${body}`;
58819
+ return `${pc54.dim(formatTime(entry.timestamp))} ${SOURCE_COLORS[entry.source](label)} ${colorLevel(level)} ${body}`;
58589
58820
  }
58590
58821
  function toJsonEntry(entry) {
58591
58822
  return {
@@ -58656,17 +58887,17 @@ function printGroupSummary(groups) {
58656
58887
  bySource.set(group4.source, existing);
58657
58888
  }
58658
58889
  const parts = [...bySource.entries()].map(
58659
- ([source, names]) => `${SOURCE_COLORS[source](logSourceLabel(source))} ${pc53.dim(`(${names.length})`)}`
58890
+ ([source, names]) => `${SOURCE_COLORS[source](logSourceLabel(source))} ${pc54.dim(`(${names.length})`)}`
58660
58891
  );
58661
58892
  console.log(
58662
- `${pc53.dim("Sources:")} ${parts.join(pc53.dim(" \xB7 "))} ${pc53.dim(`${groups.length} log group${groups.length === 1 ? "" : "s"}`)}`
58893
+ `${pc54.dim("Sources:")} ${parts.join(pc54.dim(" \xB7 "))} ${pc54.dim(`${groups.length} log group${groups.length === 1 ? "" : "s"}`)}`
58663
58894
  );
58664
58895
  }
58665
58896
  async function selfhostLogs(options) {
58666
58897
  const progress = new DeploymentProgress();
58667
58898
  const json = isJsonMode();
58668
58899
  if (!json) {
58669
- clack50.intro(pc53.bold("Wraps Self-Hosted Logs"));
58900
+ clack50.intro(pc54.bold("Wraps Self-Hosted Logs"));
58670
58901
  }
58671
58902
  const sinceMs = parseSince(options.since ?? DEFAULT_SINCE);
58672
58903
  const intervalSeconds = parseInterval(options.interval);
@@ -58768,18 +58999,18 @@ async function printWindow(context, window) {
58768
58999
  clack50.log.info(
58769
59000
  window.errorsOnly ? `No errors in the last ${window.sinceLabel}.` : `No log events in the last ${window.sinceLabel}.`
58770
59001
  );
58771
- clack50.outro(pc53.dim("Nothing to report"));
59002
+ clack50.outro(pc54.dim("Nothing to report"));
58772
59003
  return;
58773
59004
  }
58774
59005
  context.emit(entries);
58775
59006
  console.log("");
58776
59007
  if (entries.length >= MAX_ENTRIES) {
58777
59008
  clack50.log.warn(
58778
- `Showing the most recent ${MAX_ENTRIES} events \u2014 narrow the window with ${pc53.cyan("--since")} to see more.`
59009
+ `Showing the most recent ${MAX_ENTRIES} events \u2014 narrow the window with ${pc54.cyan("--since")} to see more.`
58779
59010
  );
58780
59011
  }
58781
59012
  clack50.outro(
58782
- pc53.dim(
59013
+ pc54.dim(
58783
59014
  `${entries.length} event${entries.length === 1 ? "" : "s"} from the last ${window.sinceLabel}`
58784
59015
  )
58785
59016
  );
@@ -58788,17 +59019,17 @@ function printFollowHeader(context) {
58788
59019
  printGroupSummary(context.groups);
58789
59020
  if (context.live) {
58790
59021
  console.log(
58791
- pc53.yellow(
59022
+ pc54.yellow(
58792
59023
  "\u26A0 CloudWatch Live Tail bills ~$0.01/min for as long as this session is open."
58793
59024
  )
58794
59025
  );
58795
59026
  console.log(
58796
- pc53.dim(`Live tailing \xB7 ${pc53.reset(pc53.bold("Ctrl+C"))} to stop`)
59027
+ pc54.dim(`Live tailing \xB7 ${pc54.reset(pc54.bold("Ctrl+C"))} to stop`)
58797
59028
  );
58798
59029
  } else {
58799
59030
  console.log(
58800
- pc53.dim(
58801
- `Polling every ${context.intervalSeconds}s \xB7 ${pc53.reset(pc53.bold("Ctrl+C"))} to stop`
59031
+ pc54.dim(
59032
+ `Polling every ${context.intervalSeconds}s \xB7 ${pc54.reset(pc54.bold("Ctrl+C"))} to stop`
58802
59033
  )
58803
59034
  );
58804
59035
  }
@@ -58848,13 +59079,13 @@ async function follow(context) {
58848
59079
  }
58849
59080
  if (!context.json) {
58850
59081
  console.log("");
58851
- clack50.outro(pc53.dim("Stopped"));
59082
+ clack50.outro(pc54.dim("Stopped"));
58852
59083
  }
58853
59084
  }
58854
59085
  async function runLiveTail(context, control) {
58855
59086
  if (context.groups.length > liveTailGroupLimit() && !context.json) {
58856
59087
  clack50.log.warn(
58857
- `Live Tail supports ${liveTailGroupLimit()} log groups per session \u2014 tailing the first ${liveTailGroupLimit()}. Use ${pc53.cyan("--source")} to choose which.`
59088
+ `Live Tail supports ${liveTailGroupLimit()} log groups per session \u2014 tailing the first ${liveTailGroupLimit()}. Use ${pc54.cyan("--source")} to choose which.`
58858
59089
  );
58859
59090
  }
58860
59091
  const session = startSelfhostLiveTail({
@@ -58875,7 +59106,7 @@ async function runLiveTail(context, control) {
58875
59106
  }
58876
59107
  if (!(control.isStopped() || context.json)) {
58877
59108
  clack50.log.warn(
58878
- `Live Tail session ended (AWS caps sessions at ~3 hours). Run ${pc53.cyan("wraps selfhost logs --follow --live")} again to resume.`
59109
+ `Live Tail session ended (AWS caps sessions at ~3 hours). Run ${pc54.cyan("wraps selfhost logs --follow --live")} again to resume.`
58879
59110
  );
58880
59111
  }
58881
59112
  }
@@ -58902,7 +59133,7 @@ function isAbortError(error) {
58902
59133
  init_esm_shims();
58903
59134
  init_events();
58904
59135
  import * as clack51 from "@clack/prompts";
58905
- import pc54 from "picocolors";
59136
+ import pc55 from "picocolors";
58906
59137
  init_aws();
58907
59138
  init_json_output();
58908
59139
  init_metadata();
@@ -58912,26 +59143,26 @@ function displaySelfhostStatus(options) {
58912
59143
  const lines = [];
58913
59144
  const incomplete = !(options.apiUrl && options.appUrl);
58914
59145
  lines.push(
58915
- incomplete ? pc54.bold(pc54.yellow("Self-Hosted Control Plane Incomplete")) : pc54.bold(pc54.green("Self-Hosted Control Plane Active"))
59146
+ incomplete ? pc55.bold(pc55.yellow("Self-Hosted Control Plane Incomplete")) : pc55.bold(pc55.green("Self-Hosted Control Plane Active"))
58916
59147
  );
58917
59148
  if (incomplete) {
58918
59149
  lines.push(
58919
- pc54.yellow(
58920
- `A previous deploy did not finish. Run ${pc54.cyan("pnpm selfhost:upgrade")} from your fork to complete it.`
59150
+ pc55.yellow(
59151
+ `A previous deploy did not finish. Run ${pc55.cyan("pnpm selfhost:upgrade")} from your fork to complete it.`
58921
59152
  )
58922
59153
  );
58923
59154
  }
58924
59155
  lines.push("");
58925
- lines.push(pc54.bold("API"));
58926
- lines.push(` URL: ${pc54.cyan(options.apiUrl || "(not deployed)")}`);
58927
- lines.push(` Region: ${pc54.cyan(options.region)}`);
58928
- lines.push(` Deployed: ${pc54.dim(options.deployedAt)}`);
59156
+ lines.push(pc55.bold("API"));
59157
+ lines.push(` URL: ${pc55.cyan(options.apiUrl || "(not deployed)")}`);
59158
+ lines.push(` Region: ${pc55.cyan(options.region)}`);
59159
+ lines.push(` Deployed: ${pc55.dim(options.deployedAt)}`);
58929
59160
  lines.push("");
58930
- lines.push(pc54.bold("Configuration"));
58931
- lines.push(` App URL: ${pc54.cyan(options.appUrl || "(not deployed)")}`);
58932
- lines.push(` License Key: ${pc54.dim(`${options.licenseKeyPrefix}...`)}`);
59161
+ lines.push(pc55.bold("Configuration"));
59162
+ lines.push(` App URL: ${pc55.cyan(options.appUrl || "(not deployed)")}`);
59163
+ lines.push(` License Key: ${pc55.dim(`${options.licenseKeyPrefix}...`)}`);
58933
59164
  if (options.neonProjectId) {
58934
- lines.push(` Neon Project: ${pc54.dim(options.neonProjectId)}`);
59165
+ lines.push(` Neon Project: ${pc55.dim(options.neonProjectId)}`);
58935
59166
  }
58936
59167
  clack51.note(lines.join("\n"), "Self-Hosted Status");
58937
59168
  }
@@ -58939,7 +59170,7 @@ async function selfhostStatus(options) {
58939
59170
  const startTime = Date.now();
58940
59171
  const progress = new DeploymentProgress();
58941
59172
  if (!isJsonMode()) {
58942
- clack51.intro(pc54.bold("Wraps Self-Hosted Status"));
59173
+ clack51.intro(pc55.bold("Wraps Self-Hosted Status"));
58943
59174
  }
58944
59175
  const identity = await progress.execute(
58945
59176
  "Loading self-hosted status",
@@ -58957,7 +59188,7 @@ async function selfhostStatus(options) {
58957
59188
  clack51.log.error("No self-hosted deployment found");
58958
59189
  console.log(
58959
59190
  `
58960
- Run ${pc54.cyan("pnpm selfhost:deploy")} from your fork to deploy the self-hosted platform.
59191
+ Run ${pc55.cyan("pnpm selfhost:deploy")} from your fork to deploy the self-hosted platform.
58961
59192
  `
58962
59193
  );
58963
59194
  process.exit(1);
@@ -58980,24 +59211,24 @@ Run ${pc54.cyan("pnpm selfhost:deploy")} from your fork to deploy the self-hoste
58980
59211
  }
58981
59212
  displaySelfhostStatus(statusData);
58982
59213
  console.log("");
58983
- clack51.log.info(pc54.bold("Commands:"));
59214
+ clack51.log.info(pc55.bold("Commands:"));
58984
59215
  console.log(
58985
- ` ${pc54.cyan("pnpm selfhost:upgrade")} (from your fork) - Redeploy the platform and run migrations`
59216
+ ` ${pc55.cyan("pnpm selfhost:upgrade")} (from your fork) - Redeploy the platform and run migrations`
58986
59217
  );
58987
59218
  trackCommand("selfhost:status", {
58988
59219
  success: true,
58989
59220
  duration_ms: Date.now() - startTime
58990
59221
  });
58991
- clack51.outro(pc54.dim("Self-hosted deployment is active"));
59222
+ clack51.outro(pc55.dim("Self-hosted deployment is active"));
58992
59223
  }
58993
59224
 
58994
59225
  // src/commands/shared/dashboard.ts
58995
59226
  init_esm_shims();
58996
59227
  import * as clack52 from "@clack/prompts";
58997
- import * as pulumi27 from "@pulumi/pulumi";
59228
+ import * as pulumi28 from "@pulumi/pulumi";
58998
59229
  import getPort from "get-port";
58999
59230
  import open3 from "open";
59000
- import pc55 from "picocolors";
59231
+ import pc56 from "picocolors";
59001
59232
 
59002
59233
  // src/console/server.ts
59003
59234
  init_esm_shims();
@@ -60197,13 +60428,13 @@ function createMetricsRouter(config2) {
60197
60428
  const router = createRouter5();
60198
60429
  router.get("/stream", async (req, res) => {
60199
60430
  const connectionId = randomUUID().slice(0, 8);
60200
- const log62 = (msg, data) => {
60431
+ const log63 = (msg, data) => {
60201
60432
  console.log(JSON.stringify({ connectionId, msg, ...data }));
60202
60433
  };
60203
60434
  res.setHeader("Content-Type", "text/event-stream");
60204
60435
  res.setHeader("Cache-Control", "no-cache");
60205
60436
  res.setHeader("Connection", "keep-alive");
60206
- log62("SSE connected");
60437
+ log63("SSE connected");
60207
60438
  res.write('data: {"type":"connected"}\n\n');
60208
60439
  const { startTime, endTime } = req.query;
60209
60440
  const getTimeRange = () => ({
@@ -60213,7 +60444,7 @@ function createMetricsRouter(config2) {
60213
60444
  const sendMetrics = async () => {
60214
60445
  try {
60215
60446
  const timeRange = getTimeRange();
60216
- log62("Fetching metrics", {
60447
+ log63("Fetching metrics", {
60217
60448
  start: timeRange.start.toISOString(),
60218
60449
  end: timeRange.end.toISOString()
60219
60450
  });
@@ -60226,7 +60457,7 @@ function createMetricsRouter(config2) {
60226
60457
  ),
60227
60458
  fetchSendQuota(config2.roleArn, config2.region)
60228
60459
  ]);
60229
- log62("Metrics fetched successfully");
60460
+ log63("Metrics fetched successfully");
60230
60461
  const data = {
60231
60462
  type: "metrics",
60232
60463
  timestamp: Date.now(),
@@ -60256,7 +60487,7 @@ function createMetricsRouter(config2) {
60256
60487
  const interval = setInterval(sendMetrics, 6e4);
60257
60488
  req.on("close", () => {
60258
60489
  clearInterval(interval);
60259
- log62("SSE disconnected");
60490
+ log63("SSE disconnected");
60260
60491
  });
60261
60492
  });
60262
60493
  router.get("/snapshot", async (_req, res) => {
@@ -61512,9 +61743,9 @@ function createUserRouter(config2) {
61512
61743
  if (config2.roleArn) {
61513
61744
  console.log("[User API] Attempting to fetch account alias via IAM");
61514
61745
  const { assumeRole: assumeRole2 } = await Promise.resolve().then(() => (init_assume_role(), assume_role_exports));
61515
- const { IAMClient: IAMClient6, ListAccountAliasesCommand } = await import("@aws-sdk/client-iam");
61746
+ const { IAMClient: IAMClient7, ListAccountAliasesCommand } = await import("@aws-sdk/client-iam");
61516
61747
  const credentials = await assumeRole2(config2.roleArn, region);
61517
- const iamClient = new IAMClient6({ region, credentials });
61748
+ const iamClient = new IAMClient7({ region, credentials });
61518
61749
  const response = await iamClient.send(
61519
61750
  new ListAccountAliasesCommand({})
61520
61751
  );
@@ -61651,7 +61882,7 @@ init_output();
61651
61882
  init_pulumi();
61652
61883
  async function dashboard(options) {
61653
61884
  await ensurePulumiInstalled();
61654
- clack52.intro(pc55.bold("Wraps Dashboard"));
61885
+ clack52.intro(pc56.bold("Wraps Dashboard"));
61655
61886
  const progress = new DeploymentProgress();
61656
61887
  const identity = await progress.execute(
61657
61888
  "Validating AWS credentials",
@@ -61664,7 +61895,7 @@ async function dashboard(options) {
61664
61895
  try {
61665
61896
  await ensurePulumiWorkDir({ accountId: identity.accountId, region });
61666
61897
  try {
61667
- const emailStack = await pulumi27.automation.LocalWorkspace.selectStack({
61898
+ const emailStack = await pulumi28.automation.LocalWorkspace.selectStack({
61668
61899
  stackName: `wraps-${identity.accountId}-${region}`,
61669
61900
  workDir: getPulumiWorkDir()
61670
61901
  });
@@ -61672,7 +61903,7 @@ async function dashboard(options) {
61672
61903
  } catch (_emailError) {
61673
61904
  }
61674
61905
  try {
61675
- const smsStack = await pulumi27.automation.LocalWorkspace.selectStack({
61906
+ const smsStack = await pulumi28.automation.LocalWorkspace.selectStack({
61676
61907
  stackName: `wraps-sms-${identity.accountId}-${region}`,
61677
61908
  workDir: getPulumiWorkDir()
61678
61909
  });
@@ -61680,7 +61911,7 @@ async function dashboard(options) {
61680
61911
  } catch (_smsError) {
61681
61912
  }
61682
61913
  try {
61683
- const cdnStack = await pulumi27.automation.LocalWorkspace.selectStack({
61914
+ const cdnStack = await pulumi28.automation.LocalWorkspace.selectStack({
61684
61915
  stackName: `wraps-cdn-${identity.accountId}-${region}`,
61685
61916
  workDir: getPulumiWorkDir()
61686
61917
  });
@@ -61694,7 +61925,7 @@ async function dashboard(options) {
61694
61925
  progress.stop();
61695
61926
  clack52.log.error("No Wraps infrastructure found");
61696
61927
  console.log(
61697
- `\\nRun ${pc55.cyan("wraps email init")}, ${pc55.cyan("wraps sms init")}, or ${pc55.cyan("wraps storage init")} to deploy infrastructure first.\\n`
61928
+ `\\nRun ${pc56.cyan("wraps email init")}, ${pc56.cyan("wraps sms init")}, or ${pc56.cyan("wraps storage init")} to deploy infrastructure first.\\n`
61698
61929
  );
61699
61930
  process.exit(1);
61700
61931
  }
@@ -61738,7 +61969,7 @@ async function dashboard(options) {
61738
61969
  progress.stop();
61739
61970
  clack52.log.success("Starting dashboard server...");
61740
61971
  console.log(
61741
- `${pc55.dim("Using current AWS credentials (no role assumption)")}\\n`
61972
+ `${pc56.dim("Using current AWS credentials (no role assumption)")}\\n`
61742
61973
  );
61743
61974
  const { url } = await startConsoleServer({
61744
61975
  port,
@@ -61771,8 +62002,8 @@ async function dashboard(options) {
61771
62002
  cdnCustomDomain,
61772
62003
  cdnCertificateArn
61773
62004
  });
61774
- console.log(`\\n${pc55.bold("Dashboard:")} ${pc55.cyan(url)}`);
61775
- console.log(`${pc55.dim("Press Ctrl+C to stop")}\\n`);
62005
+ console.log(`\\n${pc56.bold("Dashboard:")} ${pc56.cyan(url)}`);
62006
+ console.log(`${pc56.dim("Press Ctrl+C to stop")}\\n`);
61776
62007
  getTelemetryClient().showFooterOnce();
61777
62008
  if (!options.noOpen) {
61778
62009
  await open3(url);
@@ -61794,7 +62025,7 @@ init_errors();
61794
62025
  init_json_output();
61795
62026
  init_metadata();
61796
62027
  import * as clack53 from "@clack/prompts";
61797
- import pc56 from "picocolors";
62028
+ import pc57 from "picocolors";
61798
62029
  async function destroy(options) {
61799
62030
  trackCommand("destroy", { success: true });
61800
62031
  if (isJsonMode() && !options.force) {
@@ -61805,7 +62036,7 @@ async function destroy(options) {
61805
62036
  );
61806
62037
  }
61807
62038
  if (!isJsonMode()) {
61808
- clack53.intro(pc56.bold("Wraps Infrastructure Teardown"));
62039
+ clack53.intro(pc57.bold("Wraps Infrastructure Teardown"));
61809
62040
  }
61810
62041
  const spinner11 = clack53.spinner();
61811
62042
  spinner11.start("Validating AWS credentials");
@@ -61827,14 +62058,14 @@ async function destroy(options) {
61827
62058
  clack53.log.warn("No Wraps services found in this region");
61828
62059
  console.log(
61829
62060
  `
61830
- Run ${pc56.cyan("wraps email init")} to deploy infrastructure.
62061
+ Run ${pc57.cyan("wraps email init")} to deploy infrastructure.
61831
62062
  `
61832
62063
  );
61833
62064
  process.exit(0);
61834
62065
  }
61835
62066
  if (deployedServices.length === 1) {
61836
62067
  const service = deployedServices[0];
61837
- clack53.log.info(`Found ${pc56.cyan(service)} service deployed`);
62068
+ clack53.log.info(`Found ${pc57.cyan(service)} service deployed`);
61838
62069
  if (service === "email") {
61839
62070
  await emailDestroy(options);
61840
62071
  return;
@@ -61872,7 +62103,7 @@ Run ${pc56.cyan("wraps email init")} to deploy infrastructure.
61872
62103
  await emailDestroy(options);
61873
62104
  }
61874
62105
  if (serviceToDestroy === "all") {
61875
- clack53.outro(pc56.green("All Wraps infrastructure has been removed"));
62106
+ clack53.outro(pc57.green("All Wraps infrastructure has been removed"));
61876
62107
  }
61877
62108
  }
61878
62109
 
@@ -61880,8 +62111,8 @@ Run ${pc56.cyan("wraps email init")} to deploy infrastructure.
61880
62111
  init_esm_shims();
61881
62112
  init_events();
61882
62113
  import * as clack54 from "@clack/prompts";
61883
- import * as pulumi28 from "@pulumi/pulumi";
61884
- import pc57 from "picocolors";
62114
+ import * as pulumi29 from "@pulumi/pulumi";
62115
+ import pc58 from "picocolors";
61885
62116
  init_aws();
61886
62117
  init_fs();
61887
62118
  init_json_output();
@@ -61892,23 +62123,23 @@ async function status(options) {
61892
62123
  const startTime = Date.now();
61893
62124
  const progress = new DeploymentProgress();
61894
62125
  if (!isJsonMode()) {
61895
- clack54.intro(pc57.bold("Wraps Infrastructure Status"));
62126
+ clack54.intro(pc58.bold("Wraps Infrastructure Status"));
61896
62127
  }
61897
62128
  const identity = await progress.execute(
61898
62129
  "Loading infrastructure status",
61899
62130
  async () => validateAWSCredentials()
61900
62131
  );
61901
62132
  if (!isJsonMode()) {
61902
- progress.info(`AWS Account: ${pc57.cyan(identity.accountId)}`);
62133
+ progress.info(`AWS Account: ${pc58.cyan(identity.accountId)}`);
61903
62134
  }
61904
62135
  const region = options.region || await getAWSRegion();
61905
62136
  if (!isJsonMode()) {
61906
- progress.info(`Region: ${pc57.cyan(region)}`);
62137
+ progress.info(`Region: ${pc58.cyan(region)}`);
61907
62138
  }
61908
62139
  const services = [];
61909
62140
  try {
61910
62141
  await ensurePulumiWorkDir({ accountId: identity.accountId, region });
61911
- const emailStack = await pulumi28.automation.LocalWorkspace.selectStack({
62142
+ const emailStack = await pulumi29.automation.LocalWorkspace.selectStack({
61912
62143
  stackName: `wraps-${identity.accountId}-${region}`,
61913
62144
  workDir: getPulumiWorkDir()
61914
62145
  });
@@ -61927,7 +62158,7 @@ async function status(options) {
61927
62158
  services.push({ name: "Email", status: "not_deployed" });
61928
62159
  }
61929
62160
  try {
61930
- const smsStack = await pulumi28.automation.LocalWorkspace.selectStack({
62161
+ const smsStack = await pulumi29.automation.LocalWorkspace.selectStack({
61931
62162
  stackName: `wraps-sms-${identity.accountId}-${region}`,
61932
62163
  workDir: getPulumiWorkDir()
61933
62164
  });
@@ -61958,33 +62189,33 @@ async function status(options) {
61958
62189
  clack54.note(
61959
62190
  services.map((s2) => {
61960
62191
  if (s2.status === "deployed") {
61961
- const details = s2.details ? pc57.dim(` (${s2.details})`) : "";
61962
- return ` ${pc57.green("\u2713")} ${s2.name}${details}`;
62192
+ const details = s2.details ? pc58.dim(` (${s2.details})`) : "";
62193
+ return ` ${pc58.green("\u2713")} ${s2.name}${details}`;
61963
62194
  }
61964
- return ` ${pc57.dim("\u25CB")} ${s2.name} ${pc57.dim("(not deployed)")}`;
62195
+ return ` ${pc58.dim("\u25CB")} ${s2.name} ${pc58.dim("(not deployed)")}`;
61965
62196
  }).join("\n"),
61966
62197
  "Services"
61967
62198
  );
61968
62199
  const hasDeployedServices = services.some((s2) => s2.status === "deployed");
61969
62200
  if (hasDeployedServices) {
61970
62201
  console.log(`
61971
- ${pc57.bold("Details:")}`);
62202
+ ${pc58.bold("Details:")}`);
61972
62203
  if (services.find((s2) => s2.name === "Email")?.status === "deployed") {
61973
- console.log(` ${pc57.dim("Email:")} ${pc57.cyan("wraps email status")}`);
62204
+ console.log(` ${pc58.dim("Email:")} ${pc58.cyan("wraps email status")}`);
61974
62205
  }
61975
62206
  if (services.find((s2) => s2.name === "SMS")?.status === "deployed") {
61976
- console.log(` ${pc57.dim("SMS:")} ${pc57.cyan("wraps sms status")}`);
62207
+ console.log(` ${pc58.dim("SMS:")} ${pc58.cyan("wraps sms status")}`);
61977
62208
  }
61978
62209
  } else {
61979
62210
  console.log(`
61980
- ${pc57.bold("Get started:")}`);
61981
- console.log(` ${pc57.dim("Deploy email:")} ${pc57.cyan("wraps email init")}`);
61982
- console.log(` ${pc57.dim("Deploy SMS:")} ${pc57.cyan("wraps sms init")}`);
62211
+ ${pc58.bold("Get started:")}`);
62212
+ console.log(` ${pc58.dim("Deploy email:")} ${pc58.cyan("wraps email init")}`);
62213
+ console.log(` ${pc58.dim("Deploy SMS:")} ${pc58.cyan("wraps sms init")}`);
61983
62214
  }
61984
62215
  const dashboardUrl = await resolveDashboardUrl(identity.accountId, region);
61985
62216
  console.log(`
61986
- ${pc57.bold("Dashboard:")} ${pc57.blue(dashboardUrl)}`);
61987
- console.log(`${pc57.bold("Docs:")} ${pc57.blue("https://wraps.dev/docs")}
62217
+ ${pc58.bold("Dashboard:")} ${pc58.blue(dashboardUrl)}`);
62218
+ console.log(`${pc58.bold("Docs:")} ${pc58.blue("https://wraps.dev/docs")}
61988
62219
  `);
61989
62220
  trackCommand("status", {
61990
62221
  success: true,
@@ -61996,13 +62227,13 @@ ${pc57.bold("Dashboard:")} ${pc57.blue(dashboardUrl)}`);
61996
62227
  // src/commands/sms/destroy.ts
61997
62228
  init_esm_shims();
61998
62229
  import * as clack55 from "@clack/prompts";
61999
- import * as pulumi30 from "@pulumi/pulumi";
62000
- import pc58 from "picocolors";
62230
+ import * as pulumi31 from "@pulumi/pulumi";
62231
+ import pc59 from "picocolors";
62001
62232
 
62002
62233
  // src/infrastructure/sms-stack.ts
62003
62234
  init_esm_shims();
62004
62235
  import * as aws24 from "@pulumi/aws";
62005
- import * as pulumi29 from "@pulumi/pulumi";
62236
+ import * as pulumi30 from "@pulumi/pulumi";
62006
62237
  init_resource_checks();
62007
62238
  async function createSMSIAMRole(config2) {
62008
62239
  const statements = [];
@@ -62282,7 +62513,7 @@ async function createSMSSNSResources(config2) {
62282
62513
  });
62283
62514
  new aws24.sqs.QueuePolicy("wraps-sms-events-queue-policy", {
62284
62515
  queueUrl: config2.queueUrl,
62285
- policy: pulumi29.all([config2.queueArn, topic.arn]).apply(
62516
+ policy: pulumi30.all([config2.queueArn, topic.arn]).apply(
62286
62517
  ([queueArn, topicArn2]) => JSON.stringify({
62287
62518
  Version: "2012-10-17",
62288
62519
  Statement: [
@@ -62381,7 +62612,7 @@ async function deploySMSLambdaFunction(config2) {
62381
62612
  });
62382
62613
  new aws24.iam.RolePolicy("wraps-sms-lambda-policy", {
62383
62614
  role: lambdaRole.name,
62384
- policy: pulumi29.all([config2.tableName, config2.queueArn]).apply(
62615
+ policy: pulumi30.all([config2.tableName, config2.queueArn]).apply(
62385
62616
  ([tableName, queueArn]) => JSON.stringify({
62386
62617
  Version: "2012-10-17",
62387
62618
  Statement: [
@@ -62418,7 +62649,7 @@ async function deploySMSLambdaFunction(config2) {
62418
62649
  runtime: "nodejs24.x",
62419
62650
  handler: "index.handler",
62420
62651
  role: lambdaRole.arn,
62421
- code: new pulumi29.asset.FileArchive(codeDir),
62652
+ code: new pulumi30.asset.FileArchive(codeDir),
62422
62653
  timeout: 300,
62423
62654
  // 5 minutes
62424
62655
  memorySize: 512,
@@ -62688,18 +62919,18 @@ async function createSMSProtectConfigurationWithSDK(configurationSetName, region
62688
62919
  const existing = await client2.send(
62689
62920
  new DescribeProtectConfigurationsCommand({})
62690
62921
  );
62691
- for (const pc72 of existing.ProtectConfigurations || []) {
62692
- if (!(pc72.ProtectConfigurationArn && pc72.ProtectConfigurationId)) {
62922
+ for (const pc73 of existing.ProtectConfigurations || []) {
62923
+ if (!(pc73.ProtectConfigurationArn && pc73.ProtectConfigurationId)) {
62693
62924
  continue;
62694
62925
  }
62695
62926
  const tagsResponse = await client2.send(
62696
62927
  new ListTagsForResourceCommand({
62697
- ResourceArn: pc72.ProtectConfigurationArn
62928
+ ResourceArn: pc73.ProtectConfigurationArn
62698
62929
  })
62699
62930
  );
62700
62931
  const nameTag = tagsResponse.Tags?.find((t) => t.Key === "Name");
62701
62932
  if (nameTag?.Value === protectConfigName) {
62702
- existingProtectConfigId = pc72.ProtectConfigurationId;
62933
+ existingProtectConfigId = pc73.ProtectConfigurationId;
62703
62934
  break;
62704
62935
  }
62705
62936
  }
@@ -62795,13 +63026,13 @@ async function deleteSMSProtectConfigurationWithSDK(region) {
62795
63026
  new DescribeProtectConfigurationsCommand({})
62796
63027
  );
62797
63028
  if (existing.ProtectConfigurations) {
62798
- for (const pc72 of existing.ProtectConfigurations) {
62799
- if (!(pc72.ProtectConfigurationArn && pc72.ProtectConfigurationId)) {
63029
+ for (const pc73 of existing.ProtectConfigurations) {
63030
+ if (!(pc73.ProtectConfigurationArn && pc73.ProtectConfigurationId)) {
62800
63031
  continue;
62801
63032
  }
62802
63033
  const tagsResponse = await client2.send(
62803
63034
  new ListTagsForResourceCommand({
62804
- ResourceArn: pc72.ProtectConfigurationArn
63035
+ ResourceArn: pc73.ProtectConfigurationArn
62805
63036
  })
62806
63037
  );
62807
63038
  const isWrapsManaged = tagsResponse.Tags?.some(
@@ -62810,7 +63041,7 @@ async function deleteSMSProtectConfigurationWithSDK(region) {
62810
63041
  if (isWrapsManaged) {
62811
63042
  await client2.send(
62812
63043
  new DeleteProtectConfigurationCommand({
62813
- ProtectConfigurationId: pc72.ProtectConfigurationId
63044
+ ProtectConfigurationId: pc73.ProtectConfigurationId
62814
63045
  })
62815
63046
  );
62816
63047
  }
@@ -62846,7 +63077,7 @@ async function smsDestroy(options) {
62846
63077
  }
62847
63078
  if (!isJsonMode()) {
62848
63079
  clack55.intro(
62849
- pc58.bold(
63080
+ pc59.bold(
62850
63081
  options.preview ? "SMS Infrastructure Destruction Preview" : "SMS Infrastructure Teardown"
62851
63082
  )
62852
63083
  );
@@ -62896,7 +63127,7 @@ async function smsDestroy(options) {
62896
63127
  }
62897
63128
  if (!(options.force || options.preview)) {
62898
63129
  const confirmed = await clack55.confirm({
62899
- message: pc58.red(
63130
+ message: pc59.red(
62900
63131
  "Are you sure you want to destroy all SMS infrastructure?"
62901
63132
  ),
62902
63133
  initialValue: false
@@ -62915,7 +63146,7 @@ async function smsDestroy(options) {
62915
63146
  const stackName = storedStackName || `wraps-sms-${identity.accountId}-${region}`;
62916
63147
  let stack;
62917
63148
  try {
62918
- stack = await pulumi30.automation.LocalWorkspace.selectStack({
63149
+ stack = await pulumi31.automation.LocalWorkspace.selectStack({
62919
63150
  stackName,
62920
63151
  workDir: getPulumiWorkDir()
62921
63152
  });
@@ -62935,7 +63166,7 @@ async function smsDestroy(options) {
62935
63166
  commandName: "wraps sms destroy"
62936
63167
  });
62937
63168
  clack55.outro(
62938
- pc58.green("Preview complete. Run without --preview to destroy.")
63169
+ pc59.green("Preview complete. Run without --preview to destroy.")
62939
63170
  );
62940
63171
  trackServiceRemoved("sms", {
62941
63172
  preview: true,
@@ -62973,7 +63204,7 @@ async function smsDestroy(options) {
62973
63204
  const stackName = storedStackName || `wraps-sms-${identity.accountId}-${region}`;
62974
63205
  let stack;
62975
63206
  try {
62976
- stack = await pulumi30.automation.LocalWorkspace.selectStack({
63207
+ stack = await pulumi31.automation.LocalWorkspace.selectStack({
62977
63208
  stackName,
62978
63209
  workDir: getPulumiWorkDir()
62979
63210
  });
@@ -63032,20 +63263,20 @@ async function smsDestroy(options) {
63032
63263
  }
63033
63264
  if (destroyFailed) {
63034
63265
  clack55.outro(
63035
- pc58.yellow("SMS infrastructure partially removed. Metadata cleaned up.")
63266
+ pc59.yellow("SMS infrastructure partially removed. Metadata cleaned up.")
63036
63267
  );
63037
63268
  } else {
63038
- clack55.outro(pc58.green("SMS infrastructure has been removed"));
63269
+ clack55.outro(pc59.green("SMS infrastructure has been removed"));
63039
63270
  console.log(`
63040
- ${pc58.bold("Cleaned up:")}`);
63041
- console.log(` ${pc58.green("\u2713")} Phone number released`);
63042
- console.log(` ${pc58.green("\u2713")} Configuration set deleted`);
63043
- console.log(` ${pc58.green("\u2713")} Event processing infrastructure removed`);
63044
- console.log(` ${pc58.green("\u2713")} IAM role deleted`);
63271
+ ${pc59.bold("Cleaned up:")}`);
63272
+ console.log(` ${pc59.green("\u2713")} Phone number released`);
63273
+ console.log(` ${pc59.green("\u2713")} Configuration set deleted`);
63274
+ console.log(` ${pc59.green("\u2713")} Event processing infrastructure removed`);
63275
+ console.log(` ${pc59.green("\u2713")} IAM role deleted`);
63045
63276
  }
63046
63277
  console.log(
63047
63278
  `
63048
- Run ${pc58.cyan("wraps sms init")} to deploy infrastructure again.
63279
+ Run ${pc59.cyan("wraps sms init")} to deploy infrastructure again.
63049
63280
  `
63050
63281
  );
63051
63282
  trackServiceRemoved("sms", {
@@ -63058,8 +63289,8 @@ Run ${pc58.cyan("wraps sms init")} to deploy infrastructure again.
63058
63289
  // src/commands/sms/init.ts
63059
63290
  init_esm_shims();
63060
63291
  import * as clack56 from "@clack/prompts";
63061
- import * as pulumi31 from "@pulumi/pulumi";
63062
- import pc60 from "picocolors";
63292
+ import * as pulumi32 from "@pulumi/pulumi";
63293
+ import pc61 from "picocolors";
63063
63294
  init_events();
63064
63295
  init_aws();
63065
63296
  init_errors();
@@ -63297,16 +63528,16 @@ function getSMSCostSummary(config2, messagesPerMonth = 1e3) {
63297
63528
 
63298
63529
  // src/utils/sms/output.ts
63299
63530
  init_esm_shims();
63300
- import pc59 from "picocolors";
63531
+ import pc60 from "picocolors";
63301
63532
  function displaySMSSDKUsage(region) {
63302
- console.log(pc59.dim(" npm install @wraps.dev/sms"));
63533
+ console.log(pc60.dim(" npm install @wraps.dev/sms"));
63303
63534
  console.log("");
63304
- console.log(pc59.dim(" import { WrapsSMS } from '@wraps.dev/sms';"));
63305
- console.log(pc59.dim(` const sms = new WrapsSMS({ region: '${region}' });`));
63306
- console.log(pc59.dim(" await sms.send({"));
63307
- console.log(pc59.dim(" to: '+14155551234',"));
63308
- console.log(pc59.dim(" message: 'Your code is 123456',"));
63309
- console.log(pc59.dim(" });"));
63535
+ console.log(pc60.dim(" import { WrapsSMS } from '@wraps.dev/sms';"));
63536
+ console.log(pc60.dim(` const sms = new WrapsSMS({ region: '${region}' });`));
63537
+ console.log(pc60.dim(" await sms.send({"));
63538
+ console.log(pc60.dim(" to: '+14155551234',"));
63539
+ console.log(pc60.dim(" message: 'Your code is 123456',"));
63540
+ console.log(pc60.dim(" });"));
63310
63541
  }
63311
63542
 
63312
63543
  // src/utils/sms/presets.ts
@@ -63628,14 +63859,14 @@ function parseVolume(raw) {
63628
63859
  async function init3(options) {
63629
63860
  const startTime = Date.now();
63630
63861
  if (!isJsonMode()) {
63631
- clack56.intro(pc60.bold("Wraps SMS Infrastructure Setup"));
63862
+ clack56.intro(pc61.bold("Wraps SMS Infrastructure Setup"));
63632
63863
  }
63633
63864
  const progress = new DeploymentProgress();
63634
63865
  const identity = await progress.execute(
63635
63866
  "Validating AWS credentials",
63636
63867
  async () => validateAWSCredentials()
63637
63868
  );
63638
- progress.info(`Connected to AWS account: ${pc60.cyan(identity.accountId)}`);
63869
+ progress.info(`Connected to AWS account: ${pc61.cyan(identity.accountId)}`);
63639
63870
  const wasAutoInstalled = await progress.execute(
63640
63871
  "Checking Pulumi CLI installation",
63641
63872
  async () => await ensurePulumiInstalled()
@@ -63655,9 +63886,9 @@ async function init3(options) {
63655
63886
  );
63656
63887
  if (existingConnection?.services?.sms) {
63657
63888
  clack56.log.warn(
63658
- `SMS already configured for account ${pc60.cyan(identity.accountId)} in region ${pc60.cyan(region)}`
63889
+ `SMS already configured for account ${pc61.cyan(identity.accountId)} in region ${pc61.cyan(region)}`
63659
63890
  );
63660
- clack56.log.info(`Use ${pc60.cyan("wraps sms status")} to view current setup`);
63891
+ clack56.log.info(`Use ${pc61.cyan("wraps sms status")} to view current setup`);
63661
63892
  process.exit(0);
63662
63893
  }
63663
63894
  let preset = options.preset;
@@ -63703,7 +63934,7 @@ async function init3(options) {
63703
63934
  }
63704
63935
  progress.info(
63705
63936
  `
63706
- ${pc60.bold("Fraud Protection")} - Block SMS to countries where you don't do business`
63937
+ ${pc61.bold("Fraud Protection")} - Block SMS to countries where you don't do business`
63707
63938
  );
63708
63939
  let allowedCountries;
63709
63940
  if (options.countries) {
@@ -63741,13 +63972,13 @@ ${pc60.bold("Fraud Protection")} - Block SMS to countries where you don't do bus
63741
63972
  estimatedVolume = await promptEstimatedSMSVolume();
63742
63973
  }
63743
63974
  progress.info(`
63744
- ${pc60.bold("Cost Estimate:")}`);
63975
+ ${pc61.bold("Cost Estimate:")}`);
63745
63976
  const costSummary = getSMSCostSummary(smsConfig, estimatedVolume);
63746
63977
  clack56.log.info(costSummary);
63747
63978
  const warnings = validateSMSConfig(smsConfig);
63748
63979
  if (warnings.length > 0) {
63749
63980
  progress.info(`
63750
- ${pc60.yellow(pc60.bold("Important Notes:"))}`);
63981
+ ${pc61.yellow(pc61.bold("Important Notes:"))}`);
63751
63982
  for (const warning2 of warnings) {
63752
63983
  clack56.log.warn(warning2);
63753
63984
  }
@@ -63767,7 +63998,7 @@ ${pc60.yellow(pc60.bold("Important Notes:"))}`);
63767
63998
  };
63768
63999
  const createStack = async () => {
63769
64000
  await ensurePulumiWorkDir({ accountId: identity.accountId, region });
63770
- const stack = await pulumi31.automation.LocalWorkspace.createOrSelectStack(
64001
+ const stack = await pulumi32.automation.LocalWorkspace.createOrSelectStack(
63771
64002
  {
63772
64003
  stackName: `wraps-sms-${identity.accountId}-${region}`,
63773
64004
  projectName: "wraps-sms",
@@ -63816,7 +64047,7 @@ ${pc60.yellow(pc60.bold("Important Notes:"))}`);
63816
64047
  commandName: "wraps sms init"
63817
64048
  });
63818
64049
  clack56.outro(
63819
- pc60.green("Preview complete. Run without --preview to deploy.")
64050
+ pc61.green("Preview complete. Run without --preview to deploy.")
63820
64051
  );
63821
64052
  trackServiceInit("sms", true, {
63822
64053
  provider,
@@ -63867,7 +64098,7 @@ ${pc60.yellow(pc60.bold("Important Notes:"))}`);
63867
64098
  const msg = sdkError instanceof Error ? sdkError.message : String(sdkError);
63868
64099
  clack56.log.warn(`Phone pool creation failed: ${msg}`);
63869
64100
  clack56.log.info(
63870
- `Run ${pc60.cyan("wraps sms sync")} to retry SDK resource creation.`
64101
+ `Run ${pc61.cyan("wraps sms sync")} to retry SDK resource creation.`
63871
64102
  );
63872
64103
  }
63873
64104
  }
@@ -63885,7 +64116,7 @@ ${pc60.yellow(pc60.bold("Important Notes:"))}`);
63885
64116
  const msg = sdkError instanceof Error ? sdkError.message : String(sdkError);
63886
64117
  clack56.log.warn(`Event destination creation failed: ${msg}`);
63887
64118
  clack56.log.info(
63888
- `Run ${pc60.cyan("wraps sms sync")} to retry SDK resource creation.`
64119
+ `Run ${pc61.cyan("wraps sms sync")} to retry SDK resource creation.`
63889
64120
  );
63890
64121
  }
63891
64122
  }
@@ -63906,7 +64137,7 @@ ${pc60.yellow(pc60.bold("Important Notes:"))}`);
63906
64137
  const msg = sdkError instanceof Error ? sdkError.message : String(sdkError);
63907
64138
  clack56.log.warn(`Protect configuration creation failed: ${msg}`);
63908
64139
  clack56.log.info(
63909
- `Run ${pc60.cyan("wraps sms sync")} to retry SDK resource creation.`
64140
+ `Run ${pc61.cyan("wraps sms sync")} to retry SDK resource creation.`
63910
64141
  );
63911
64142
  }
63912
64143
  }
@@ -63956,40 +64187,40 @@ ${pc60.yellow(pc60.bold("Important Notes:"))}`);
63956
64187
  return;
63957
64188
  }
63958
64189
  console.log("\n");
63959
- clack56.log.success(pc60.green(pc60.bold("SMS infrastructure deployed!")));
64190
+ clack56.log.success(pc61.green(pc61.bold("SMS infrastructure deployed!")));
63960
64191
  console.log("\n");
63961
64192
  clack56.note(
63962
64193
  [
63963
- `${pc60.bold("Phone Number:")} ${pc60.cyan(outputs.phoneNumber || "Provisioning...")}`,
63964
- `${pc60.bold("Phone Type:")} ${pc60.cyan(smsConfig.phoneNumberType || "simulator")}`,
63965
- `${pc60.bold("Config Set:")} ${pc60.cyan(outputs.configSetName || "wraps-sms-config")}`,
63966
- `${pc60.bold("Region:")} ${pc60.cyan(outputs.region)}`,
63967
- outputs.tableName ? `${pc60.bold("History Table:")} ${pc60.cyan(outputs.tableName)}` : "",
64194
+ `${pc61.bold("Phone Number:")} ${pc61.cyan(outputs.phoneNumber || "Provisioning...")}`,
64195
+ `${pc61.bold("Phone Type:")} ${pc61.cyan(smsConfig.phoneNumberType || "simulator")}`,
64196
+ `${pc61.bold("Config Set:")} ${pc61.cyan(outputs.configSetName || "wraps-sms-config")}`,
64197
+ `${pc61.bold("Region:")} ${pc61.cyan(outputs.region)}`,
64198
+ outputs.tableName ? `${pc61.bold("History Table:")} ${pc61.cyan(outputs.tableName)}` : "",
63968
64199
  "",
63969
- pc60.dim("IAM Role:"),
63970
- pc60.dim(` ${outputs.roleArn}`)
64200
+ pc61.dim("IAM Role:"),
64201
+ pc61.dim(` ${outputs.roleArn}`)
63971
64202
  ].filter(Boolean).join("\n"),
63972
64203
  "SMS Infrastructure"
63973
64204
  );
63974
64205
  const nextSteps = [];
63975
64206
  if (smsConfig.phoneNumberType === "toll-free") {
63976
64207
  nextSteps.push(
63977
- `${pc60.cyan("wraps sms register")} - Submit toll-free registration (required before sending)`
64208
+ `${pc61.cyan("wraps sms register")} - Submit toll-free registration (required before sending)`
63978
64209
  );
63979
64210
  }
63980
64211
  nextSteps.push(
63981
- `${pc60.cyan("wraps sms test --to +1234567890")} - Send a test message`
64212
+ `${pc61.cyan("wraps sms test --to +1234567890")} - Send a test message`
63982
64213
  );
63983
- nextSteps.push(`${pc60.cyan("wraps sms status")} - View SMS configuration`);
64214
+ nextSteps.push(`${pc61.cyan("wraps sms status")} - View SMS configuration`);
63984
64215
  console.log("\n");
63985
- clack56.log.info(pc60.bold("Next steps:"));
64216
+ clack56.log.info(pc61.bold("Next steps:"));
63986
64217
  for (const step of nextSteps) {
63987
64218
  console.log(` ${step}`);
63988
64219
  }
63989
64220
  console.log("\n");
63990
- clack56.log.info(pc60.bold("SDK Usage:"));
64221
+ clack56.log.info(pc61.bold("SDK Usage:"));
63991
64222
  displaySMSSDKUsage(region);
63992
- clack56.outro(pc60.green("Setup complete!"));
64223
+ clack56.outro(pc61.green("Setup complete!"));
63993
64224
  const duration = Date.now() - startTime;
63994
64225
  const enabledFeatures = [];
63995
64226
  if (smsConfig.tracking?.enabled) {
@@ -64026,7 +64257,7 @@ init_json_output();
64026
64257
  init_metadata();
64027
64258
  init_output();
64028
64259
  import * as clack57 from "@clack/prompts";
64029
- import pc61 from "picocolors";
64260
+ import pc62 from "picocolors";
64030
64261
  async function getPhoneNumberDetails(region) {
64031
64262
  const { PinpointSMSVoiceV2Client: PinpointSMSVoiceV2Client5, DescribePhoneNumbersCommand: DescribePhoneNumbersCommand2 } = await import("@aws-sdk/client-pinpoint-sms-voice-v2");
64032
64263
  const client2 = new PinpointSMSVoiceV2Client5({ region });
@@ -64067,7 +64298,7 @@ async function getRegistrationStatus(region, registrationId) {
64067
64298
  async function smsRegister(options) {
64068
64299
  const startTime = Date.now();
64069
64300
  if (!isJsonMode()) {
64070
- clack57.intro(pc61.bold("Wraps SMS - Toll-Free Registration"));
64301
+ clack57.intro(pc62.bold("Wraps SMS - Toll-Free Registration"));
64071
64302
  }
64072
64303
  const progress = new DeploymentProgress();
64073
64304
  const identity = await progress.execute(
@@ -64081,7 +64312,7 @@ async function smsRegister(options) {
64081
64312
  const metadata = await loadConnectionMetadata(identity.accountId, region);
64082
64313
  if (!metadata?.services?.sms) {
64083
64314
  clack57.log.error("No SMS infrastructure found.");
64084
- clack57.log.info(`Run ${pc61.cyan("wraps sms init")} first.`);
64315
+ clack57.log.info(`Run ${pc62.cyan("wraps sms init")} first.`);
64085
64316
  process.exit(1);
64086
64317
  }
64087
64318
  const phoneDetails = await progress.execute(
@@ -64115,14 +64346,14 @@ async function smsRegister(options) {
64115
64346
  }
64116
64347
  console.log("");
64117
64348
  console.log(
64118
- `${pc61.bold("Phone Number:")} ${pc61.cyan(phoneDetails.phoneNumber)}`
64349
+ `${pc62.bold("Phone Number:")} ${pc62.cyan(phoneDetails.phoneNumber)}`
64119
64350
  );
64120
- console.log(`${pc61.bold("Type:")} ${pc61.cyan(phoneDetails.type)}`);
64351
+ console.log(`${pc62.bold("Type:")} ${pc62.cyan(phoneDetails.type)}`);
64121
64352
  console.log(
64122
- `${pc61.bold("Status:")} ${phoneDetails.status === "ACTIVE" ? pc61.green(phoneDetails.status) : pc61.yellow(phoneDetails.status)}`
64353
+ `${pc62.bold("Status:")} ${phoneDetails.status === "ACTIVE" ? pc62.green(phoneDetails.status) : pc62.yellow(phoneDetails.status)}`
64123
64354
  );
64124
64355
  if (registrationStatus) {
64125
- console.log(`${pc61.bold("Registration:")} ${pc61.cyan(registrationStatus)}`);
64356
+ console.log(`${pc62.bold("Registration:")} ${pc62.cyan(registrationStatus)}`);
64126
64357
  }
64127
64358
  console.log("");
64128
64359
  if (phoneDetails.status === "ACTIVE") {
@@ -64140,21 +64371,21 @@ async function smsRegister(options) {
64140
64371
  clack57.log.info(`Your ${phoneDetails.type} number should be ready to use.`);
64141
64372
  process.exit(0);
64142
64373
  }
64143
- console.log(pc61.bold("Toll-Free Registration Required"));
64374
+ console.log(pc62.bold("Toll-Free Registration Required"));
64144
64375
  console.log("");
64145
64376
  console.log(
64146
- pc61.dim("To send SMS at scale, you must register your toll-free number.")
64377
+ pc62.dim("To send SMS at scale, you must register your toll-free number.")
64147
64378
  );
64148
- console.log(pc61.dim("This process typically takes 1-15 business days."));
64379
+ console.log(pc62.dim("This process typically takes 1-15 business days."));
64149
64380
  console.log("");
64150
- console.log(pc61.bold("You'll need to provide:"));
64151
- console.log(` ${pc61.dim("\u2022")} Business name and address`);
64381
+ console.log(pc62.bold("You'll need to provide:"));
64382
+ console.log(` ${pc62.dim("\u2022")} Business name and address`);
64152
64383
  console.log(
64153
- ` ${pc61.dim("\u2022")} Use case description (what messages you're sending)`
64384
+ ` ${pc62.dim("\u2022")} Use case description (what messages you're sending)`
64154
64385
  );
64155
- console.log(` ${pc61.dim("\u2022")} Sample messages (2-3 examples)`);
64156
- console.log(` ${pc61.dim("\u2022")} How users opt-in to receive messages`);
64157
- console.log(` ${pc61.dim("\u2022")} Expected monthly message volume`);
64386
+ console.log(` ${pc62.dim("\u2022")} Sample messages (2-3 examples)`);
64387
+ console.log(` ${pc62.dim("\u2022")} How users opt-in to receive messages`);
64388
+ console.log(` ${pc62.dim("\u2022")} Expected monthly message volume`);
64158
64389
  console.log("");
64159
64390
  const openConsole = await clack57.confirm({
64160
64391
  message: "Open AWS Console to start registration?",
@@ -64179,33 +64410,33 @@ async function smsRegister(options) {
64179
64410
  } catch {
64180
64411
  clack57.log.info("Open this URL in your browser:");
64181
64412
  console.log(`
64182
- ${pc61.cyan(consoleUrl)}
64413
+ ${pc62.cyan(consoleUrl)}
64183
64414
  `);
64184
64415
  }
64185
64416
  }
64186
64417
  console.log("");
64187
- console.log(pc61.bold("Next Steps:"));
64418
+ console.log(pc62.bold("Next Steps:"));
64188
64419
  console.log(
64189
- ` 1. Click ${pc61.cyan("Create registration")} in the AWS Console`
64420
+ ` 1. Click ${pc62.cyan("Create registration")} in the AWS Console`
64190
64421
  );
64191
- console.log(` 2. Select ${pc61.cyan("Toll-free number registration")}`);
64422
+ console.log(` 2. Select ${pc62.cyan("Toll-free number registration")}`);
64192
64423
  console.log(" 3. Fill out the business information form");
64193
64424
  console.log(" 4. Submit and wait for approval (1-15 business days)");
64194
64425
  console.log("");
64195
64426
  console.log(
64196
- pc61.dim("Once approved, run `wraps sms sync` to complete setup.")
64427
+ pc62.dim("Once approved, run `wraps sms sync` to complete setup.")
64197
64428
  );
64198
64429
  } else {
64199
64430
  const consoleUrl = `https://${region}.console.aws.amazon.com/sms-voice/home?region=${region}#/registrations`;
64200
64431
  console.log("");
64201
64432
  console.log("When you're ready, go to:");
64202
- console.log(` ${pc61.cyan(consoleUrl)}`);
64433
+ console.log(` ${pc62.cyan(consoleUrl)}`);
64203
64434
  }
64204
64435
  trackCommand("sms:register", {
64205
64436
  success: true,
64206
64437
  duration_ms: Date.now() - startTime
64207
64438
  });
64208
- clack57.outro(pc61.dim("Good luck with your registration!"));
64439
+ clack57.outro(pc62.dim("Good luck with your registration!"));
64209
64440
  }
64210
64441
 
64211
64442
  // src/commands/sms/status.ts
@@ -64219,44 +64450,44 @@ init_output();
64219
64450
  init_pulumi();
64220
64451
  init_region_resolver();
64221
64452
  import * as clack58 from "@clack/prompts";
64222
- import * as pulumi32 from "@pulumi/pulumi";
64223
- import pc62 from "picocolors";
64453
+ import * as pulumi33 from "@pulumi/pulumi";
64454
+ import pc63 from "picocolors";
64224
64455
  function displaySMSStatus(options) {
64225
64456
  const lines = [];
64226
- lines.push(pc62.bold(pc62.green("SMS Infrastructure Active")));
64457
+ lines.push(pc63.bold(pc63.green("SMS Infrastructure Active")));
64227
64458
  lines.push("");
64228
- lines.push(pc62.bold("Phone Number"));
64459
+ lines.push(pc63.bold("Phone Number"));
64229
64460
  if (options.phoneNumber) {
64230
- lines.push(` Number: ${pc62.cyan(options.phoneNumber)}`);
64461
+ lines.push(` Number: ${pc63.cyan(options.phoneNumber)}`);
64231
64462
  } else {
64232
- lines.push(` Number: ${pc62.yellow("Provisioning...")}`);
64463
+ lines.push(` Number: ${pc63.yellow("Provisioning...")}`);
64233
64464
  }
64234
- lines.push(` Type: ${pc62.cyan(options.phoneNumberType || "simulator")}`);
64465
+ lines.push(` Type: ${pc63.cyan(options.phoneNumberType || "simulator")}`);
64235
64466
  lines.push("");
64236
- lines.push(pc62.bold("Configuration"));
64237
- lines.push(` Region: ${pc62.cyan(options.region)}`);
64467
+ lines.push(pc63.bold("Configuration"));
64468
+ lines.push(` Region: ${pc63.cyan(options.region)}`);
64238
64469
  if (options.preset) {
64239
- lines.push(` Preset: ${pc62.cyan(options.preset)}`);
64470
+ lines.push(` Preset: ${pc63.cyan(options.preset)}`);
64240
64471
  }
64241
64472
  if (options.configSetName) {
64242
- lines.push(` Config Set: ${pc62.cyan(options.configSetName)}`);
64473
+ lines.push(` Config Set: ${pc63.cyan(options.configSetName)}`);
64243
64474
  }
64244
64475
  lines.push("");
64245
- lines.push(pc62.bold("Features"));
64476
+ lines.push(pc63.bold("Features"));
64246
64477
  lines.push(
64247
- ` Event Tracking: ${options.eventTracking ? pc62.green("Enabled") : pc62.dim("Disabled")}`
64478
+ ` Event Tracking: ${options.eventTracking ? pc63.green("Enabled") : pc63.dim("Disabled")}`
64248
64479
  );
64249
64480
  if (options.tableName) {
64250
- lines.push(` Message History: ${pc62.green("Enabled")}`);
64251
- lines.push(` Table: ${pc62.dim(options.tableName)}`);
64481
+ lines.push(` Message History: ${pc63.green("Enabled")}`);
64482
+ lines.push(` Table: ${pc63.dim(options.tableName)}`);
64252
64483
  }
64253
64484
  if (options.queueUrl) {
64254
- lines.push(` Event Queue: ${pc62.green("Enabled")}`);
64485
+ lines.push(` Event Queue: ${pc63.green("Enabled")}`);
64255
64486
  }
64256
64487
  lines.push("");
64257
64488
  if (options.roleArn) {
64258
- lines.push(pc62.bold("IAM Role"));
64259
- lines.push(` ${pc62.dim(options.roleArn)}`);
64489
+ lines.push(pc63.bold("IAM Role"));
64490
+ lines.push(` ${pc63.dim(options.roleArn)}`);
64260
64491
  }
64261
64492
  clack58.note(lines.join("\n"), "SMS Status");
64262
64493
  }
@@ -64265,7 +64496,7 @@ async function smsStatus(options) {
64265
64496
  const startTime = Date.now();
64266
64497
  const progress = new DeploymentProgress();
64267
64498
  if (!isJsonMode()) {
64268
- clack58.intro(pc62.bold("Wraps SMS Status"));
64499
+ clack58.intro(pc63.bold("Wraps SMS Status"));
64269
64500
  }
64270
64501
  const identity = await progress.execute(
64271
64502
  "Loading SMS infrastructure status",
@@ -64283,7 +64514,7 @@ async function smsStatus(options) {
64283
64514
  clack58.log.error("No SMS infrastructure found");
64284
64515
  console.log(
64285
64516
  `
64286
- Run ${pc62.cyan("wraps sms init")} to deploy SMS infrastructure.
64517
+ Run ${pc63.cyan("wraps sms init")} to deploy SMS infrastructure.
64287
64518
  `
64288
64519
  );
64289
64520
  process.exit(1);
@@ -64292,7 +64523,7 @@ Run ${pc62.cyan("wraps sms init")} to deploy SMS infrastructure.
64292
64523
  try {
64293
64524
  await ensurePulumiWorkDir({ accountId: identity.accountId, region });
64294
64525
  const stackName = metadata.services.sms.pulumiStackName || `wraps-sms-${identity.accountId}-${region}`;
64295
- const stack = await pulumi32.automation.LocalWorkspace.selectStack({
64526
+ const stack = await pulumi33.automation.LocalWorkspace.selectStack({
64296
64527
  stackName,
64297
64528
  workDir: getPulumiWorkDir()
64298
64529
  });
@@ -64319,25 +64550,25 @@ Run ${pc62.cyan("wraps sms init")} to deploy SMS infrastructure.
64319
64550
  }
64320
64551
  displaySMSStatus(smsStatusData);
64321
64552
  console.log("");
64322
- clack58.log.info(pc62.bold("Commands:"));
64553
+ clack58.log.info(pc63.bold("Commands:"));
64323
64554
  console.log(
64324
- ` ${pc62.cyan("wraps sms test --to +1234567890")} - Send a test message`
64555
+ ` ${pc63.cyan("wraps sms test --to +1234567890")} - Send a test message`
64325
64556
  );
64326
- console.log(` ${pc62.cyan("wraps sms destroy")} - Remove SMS infrastructure`);
64557
+ console.log(` ${pc63.cyan("wraps sms destroy")} - Remove SMS infrastructure`);
64327
64558
  trackCommand("sms:status", {
64328
64559
  success: true,
64329
64560
  phone_type: smsConfig?.phoneNumberType,
64330
64561
  event_tracking: smsConfig?.eventTracking?.enabled,
64331
64562
  duration_ms: Date.now() - startTime
64332
64563
  });
64333
- clack58.outro(pc62.dim("SMS infrastructure is ready"));
64564
+ clack58.outro(pc63.dim("SMS infrastructure is ready"));
64334
64565
  }
64335
64566
 
64336
64567
  // src/commands/sms/sync.ts
64337
64568
  init_esm_shims();
64338
64569
  import * as clack59 from "@clack/prompts";
64339
- import * as pulumi33 from "@pulumi/pulumi";
64340
- import pc63 from "picocolors";
64570
+ import * as pulumi34 from "@pulumi/pulumi";
64571
+ import pc64 from "picocolors";
64341
64572
  init_events();
64342
64573
  init_aws();
64343
64574
  init_errors();
@@ -64350,7 +64581,7 @@ async function smsSync(options) {
64350
64581
  await ensurePulumiInstalled();
64351
64582
  const startTime = Date.now();
64352
64583
  if (!isJsonMode()) {
64353
- clack59.intro(pc63.bold("Wraps SMS Infrastructure Sync"));
64584
+ clack59.intro(pc64.bold("Wraps SMS Infrastructure Sync"));
64354
64585
  }
64355
64586
  const progress = new DeploymentProgress();
64356
64587
  const identity = await progress.execute(
@@ -64365,7 +64596,7 @@ async function smsSync(options) {
64365
64596
  clack59.log.error("No SMS infrastructure found to sync");
64366
64597
  console.log(
64367
64598
  `
64368
- Run ${pc63.cyan("wraps sms init")} to deploy SMS infrastructure first.
64599
+ Run ${pc64.cyan("wraps sms init")} to deploy SMS infrastructure first.
64369
64600
  `
64370
64601
  );
64371
64602
  process.exit(1);
@@ -64374,10 +64605,10 @@ Run ${pc63.cyan("wraps sms init")} to deploy SMS infrastructure first.
64374
64605
  const storedStackName = smsService.pulumiStackName;
64375
64606
  progress.info("Found existing SMS configuration");
64376
64607
  progress.info(
64377
- `Phone type: ${pc63.cyan(smsConfig.phoneNumberType || "simulator")}`
64608
+ `Phone type: ${pc64.cyan(smsConfig.phoneNumberType || "simulator")}`
64378
64609
  );
64379
64610
  progress.info(
64380
- `Event tracking: ${pc63.cyan(smsConfig.eventTracking?.enabled ? "enabled" : "disabled")}`
64611
+ `Event tracking: ${pc64.cyan(smsConfig.eventTracking?.enabled ? "enabled" : "disabled")}`
64381
64612
  );
64382
64613
  if (!options.yes) {
64383
64614
  const confirmed = await clack59.confirm({
@@ -64400,7 +64631,7 @@ Run ${pc63.cyan("wraps sms init")} to deploy SMS infrastructure first.
64400
64631
  outputs = await progress.execute("Syncing SMS infrastructure", async () => {
64401
64632
  await ensurePulumiWorkDir({ accountId: identity.accountId, region });
64402
64633
  const stackName = storedStackName || `wraps-sms-${identity.accountId}-${region}`;
64403
- const stack = await pulumi33.automation.LocalWorkspace.createOrSelectStack(
64634
+ const stack = await pulumi34.automation.LocalWorkspace.createOrSelectStack(
64404
64635
  {
64405
64636
  stackName,
64406
64637
  projectName: "wraps-sms",
@@ -64510,7 +64741,7 @@ Run ${pc63.cyan("wraps sms init")} to deploy SMS infrastructure first.
64510
64741
  return;
64511
64742
  }
64512
64743
  console.log("\n");
64513
- clack59.log.success(pc63.green("SMS infrastructure synced successfully!"));
64744
+ clack59.log.success(pc64.green("SMS infrastructure synced successfully!"));
64514
64745
  const changes = [];
64515
64746
  if (outputs.lambdaFunctions?.length) {
64516
64747
  changes.push("Lambda functions updated");
@@ -64518,13 +64749,13 @@ Run ${pc63.cyan("wraps sms init")} to deploy SMS infrastructure first.
64518
64749
  changes.push("SDK resources verified");
64519
64750
  console.log("");
64520
64751
  for (const change of changes) {
64521
- console.log(` ${pc63.green("\u2713")} ${change}`);
64752
+ console.log(` ${pc64.green("\u2713")} ${change}`);
64522
64753
  }
64523
64754
  trackCommand("sms:sync", {
64524
64755
  success: true,
64525
64756
  duration_ms: Date.now() - startTime
64526
64757
  });
64527
- clack59.outro(pc63.green("Sync complete!"));
64758
+ clack59.outro(pc64.green("Sync complete!"));
64528
64759
  }
64529
64760
 
64530
64761
  // src/commands/sms/test.ts
@@ -64540,7 +64771,7 @@ import {
64540
64771
  SendTextMessageCommand
64541
64772
  } from "@aws-sdk/client-pinpoint-sms-voice-v2";
64542
64773
  import * as clack60 from "@clack/prompts";
64543
- import pc64 from "picocolors";
64774
+ import pc65 from "picocolors";
64544
64775
 
64545
64776
  // src/utils/sms/validation.ts
64546
64777
  init_esm_shims();
@@ -64563,7 +64794,7 @@ async function smsTest(options) {
64563
64794
  const startTime = Date.now();
64564
64795
  const progress = new DeploymentProgress();
64565
64796
  if (!isJsonMode()) {
64566
- clack60.intro(pc64.bold("Wraps SMS Test"));
64797
+ clack60.intro(pc65.bold("Wraps SMS Test"));
64567
64798
  }
64568
64799
  const identity = await progress.execute(
64569
64800
  "Validating AWS credentials",
@@ -64576,7 +64807,7 @@ async function smsTest(options) {
64576
64807
  clack60.log.error("No SMS infrastructure found");
64577
64808
  console.log(
64578
64809
  `
64579
- Run ${pc64.cyan("wraps sms init")} to deploy SMS infrastructure.
64810
+ Run ${pc65.cyan("wraps sms init")} to deploy SMS infrastructure.
64580
64811
  `
64581
64812
  );
64582
64813
  process.exit(1);
@@ -64705,16 +64936,16 @@ Run ${pc64.cyan("wraps sms init")} to deploy SMS infrastructure.
64705
64936
  return;
64706
64937
  }
64707
64938
  console.log("\n");
64708
- clack60.log.success(pc64.green("Test SMS sent successfully!"));
64939
+ clack60.log.success(pc65.green("Test SMS sent successfully!"));
64709
64940
  console.log("");
64710
64941
  clack60.note(
64711
64942
  [
64712
- `${pc64.bold("Message ID:")} ${pc64.cyan(messageId || "unknown")}`,
64713
- `${pc64.bold("To:")} ${pc64.cyan(toNumber)}`,
64714
- `${pc64.bold("Message:")} ${message}`,
64715
- `${pc64.bold("Type:")} ${pc64.cyan(smsConfig?.phoneNumberType || "simulator")}`,
64943
+ `${pc65.bold("Message ID:")} ${pc65.cyan(messageId || "unknown")}`,
64944
+ `${pc65.bold("To:")} ${pc65.cyan(toNumber)}`,
64945
+ `${pc65.bold("Message:")} ${message}`,
64946
+ `${pc65.bold("Type:")} ${pc65.cyan(smsConfig?.phoneNumberType || "simulator")}`,
64716
64947
  "",
64717
- pc64.dim(
64948
+ pc65.dim(
64718
64949
  smsConfig?.phoneNumberType === "simulator" ? "Note: Simulator messages are not actually delivered" : "Check your phone for the message!"
64719
64950
  )
64720
64951
  ].join("\n"),
@@ -64723,10 +64954,10 @@ Run ${pc64.cyan("wraps sms init")} to deploy SMS infrastructure.
64723
64954
  if (smsConfig?.eventTracking?.enabled) {
64724
64955
  console.log("");
64725
64956
  clack60.log.info(
64726
- pc64.dim("Event tracking is enabled. Check DynamoDB for delivery status.")
64957
+ pc65.dim("Event tracking is enabled. Check DynamoDB for delivery status.")
64727
64958
  );
64728
64959
  }
64729
- clack60.outro(pc64.green("Test complete!"));
64960
+ clack60.outro(pc65.green("Test complete!"));
64730
64961
  } catch (error) {
64731
64962
  progress.stop();
64732
64963
  const errorMessage = error instanceof Error ? error.message : String(error);
@@ -64751,7 +64982,7 @@ Run ${pc64.cyan("wraps sms init")} to deploy SMS infrastructure.
64751
64982
  clack60.log.error("Toll-free number registration is not complete");
64752
64983
  console.log(
64753
64984
  `
64754
- Run ${pc64.cyan("wraps sms register")} to check registration status.
64985
+ Run ${pc65.cyan("wraps sms register")} to check registration status.
64755
64986
  `
64756
64987
  );
64757
64988
  } else if (errorName === "AccessDeniedException") {
@@ -64760,7 +64991,7 @@ Run ${pc64.cyan("wraps sms register")} to check registration status.
64760
64991
  );
64761
64992
  console.log(
64762
64993
  `
64763
- Run ${pc64.cyan("wraps sms upgrade")} to update IAM policies.
64994
+ Run ${pc65.cyan("wraps sms upgrade")} to update IAM policies.
64764
64995
  `
64765
64996
  );
64766
64997
  } else {
@@ -64773,8 +65004,8 @@ Run ${pc64.cyan("wraps sms upgrade")} to update IAM policies.
64773
65004
  // src/commands/sms/upgrade.ts
64774
65005
  init_esm_shims();
64775
65006
  import * as clack61 from "@clack/prompts";
64776
- import * as pulumi34 from "@pulumi/pulumi";
64777
- import pc65 from "picocolors";
65007
+ import * as pulumi35 from "@pulumi/pulumi";
65008
+ import pc66 from "picocolors";
64778
65009
  init_events();
64779
65010
  init_aws();
64780
65011
  init_errors();
@@ -64789,7 +65020,7 @@ async function smsUpgrade(options) {
64789
65020
  const startTime = Date.now();
64790
65021
  let upgradeAction = "";
64791
65022
  if (!isJsonMode()) {
64792
- clack61.intro(pc65.bold("Wraps SMS Upgrade - Enhance Your SMS Infrastructure"));
65023
+ clack61.intro(pc66.bold("Wraps SMS Upgrade - Enhance Your SMS Infrastructure"));
64793
65024
  }
64794
65025
  const progress = new DeploymentProgress();
64795
65026
  const wasAutoInstalled = await progress.execute(
@@ -64803,7 +65034,7 @@ async function smsUpgrade(options) {
64803
65034
  "Validating AWS credentials",
64804
65035
  async () => validateAWSCredentials()
64805
65036
  );
64806
- progress.info(`Connected to AWS account: ${pc65.cyan(identity.accountId)}`);
65037
+ progress.info(`Connected to AWS account: ${pc66.cyan(identity.accountId)}`);
64807
65038
  const region = await resolveRegionForCommand({
64808
65039
  accountId: identity.accountId,
64809
65040
  optionRegion: options.region,
@@ -64813,34 +65044,34 @@ async function smsUpgrade(options) {
64813
65044
  const metadata = await loadConnectionMetadata(identity.accountId, region);
64814
65045
  if (!metadata) {
64815
65046
  clack61.log.error(
64816
- `No Wraps connection found for account ${pc65.cyan(identity.accountId)} in region ${pc65.cyan(region)}`
65047
+ `No Wraps connection found for account ${pc66.cyan(identity.accountId)} in region ${pc66.cyan(region)}`
64817
65048
  );
64818
65049
  clack61.log.info(
64819
- `Use ${pc65.cyan("wraps sms init")} to create new infrastructure.`
65050
+ `Use ${pc66.cyan("wraps sms init")} to create new infrastructure.`
64820
65051
  );
64821
65052
  process.exit(1);
64822
65053
  }
64823
65054
  if (!metadata.services.sms) {
64824
65055
  clack61.log.error("No SMS infrastructure found");
64825
65056
  clack61.log.info(
64826
- `Use ${pc65.cyan("wraps sms init")} to deploy SMS infrastructure.`
65057
+ `Use ${pc66.cyan("wraps sms init")} to deploy SMS infrastructure.`
64827
65058
  );
64828
65059
  process.exit(1);
64829
65060
  }
64830
65061
  progress.info(`Found existing connection created: ${metadata.timestamp}`);
64831
65062
  console.log(`
64832
- ${pc65.bold("Current Configuration:")}
65063
+ ${pc66.bold("Current Configuration:")}
64833
65064
  `);
64834
65065
  if (metadata.services.sms.preset) {
64835
- console.log(` Preset: ${pc65.cyan(metadata.services.sms.preset)}`);
65066
+ console.log(` Preset: ${pc66.cyan(metadata.services.sms.preset)}`);
64836
65067
  } else {
64837
- console.log(` Preset: ${pc65.cyan("custom")}`);
65068
+ console.log(` Preset: ${pc66.cyan("custom")}`);
64838
65069
  }
64839
65070
  const config2 = metadata.services.sms.config;
64840
65071
  if (!config2) {
64841
65072
  clack61.log.error("No SMS configuration found in metadata");
64842
65073
  clack61.log.info(
64843
- `Use ${pc65.cyan("wraps sms init")} to create new infrastructure.`
65074
+ `Use ${pc66.cyan("wraps sms init")} to create new infrastructure.`
64844
65075
  );
64845
65076
  process.exit(1);
64846
65077
  }
@@ -64852,45 +65083,45 @@ ${pc65.bold("Current Configuration:")}
64852
65083
  "short-code": "Short code ($995+/mo, 100+ MPS)"
64853
65084
  };
64854
65085
  console.log(
64855
- ` Phone Type: ${pc65.cyan(phoneTypeLabels2[config2.phoneNumberType] || config2.phoneNumberType)}`
65086
+ ` Phone Type: ${pc66.cyan(phoneTypeLabels2[config2.phoneNumberType] || config2.phoneNumberType)}`
64856
65087
  );
64857
65088
  }
64858
65089
  if (config2.tracking?.enabled) {
64859
- console.log(` ${pc65.green("\u2713")} Delivery Tracking`);
65090
+ console.log(` ${pc66.green("\u2713")} Delivery Tracking`);
64860
65091
  if (config2.tracking.linkTracking) {
64861
- console.log(` ${pc65.dim("\u2514\u2500")} Link click tracking enabled`);
65092
+ console.log(` ${pc66.dim("\u2514\u2500")} Link click tracking enabled`);
64862
65093
  }
64863
65094
  }
64864
65095
  if (config2.eventTracking?.enabled) {
64865
- console.log(` ${pc65.green("\u2713")} Event Tracking (SNS)`);
65096
+ console.log(` ${pc66.green("\u2713")} Event Tracking (SNS)`);
64866
65097
  if (config2.eventTracking.dynamoDBHistory) {
64867
65098
  console.log(
64868
- ` ${pc65.dim("\u2514\u2500")} Message History: ${pc65.cyan(config2.eventTracking.archiveRetention || "90days")}`
65099
+ ` ${pc66.dim("\u2514\u2500")} Message History: ${pc66.cyan(config2.eventTracking.archiveRetention || "90days")}`
64869
65100
  );
64870
65101
  }
64871
65102
  }
64872
65103
  if (config2.messageArchiving?.enabled) {
64873
65104
  console.log(
64874
- ` ${pc65.green("\u2713")} Message Archiving (${config2.messageArchiving.retention})`
65105
+ ` ${pc66.green("\u2713")} Message Archiving (${config2.messageArchiving.retention})`
64875
65106
  );
64876
65107
  }
64877
65108
  if (config2.optOutManagement) {
64878
- console.log(` ${pc65.green("\u2713")} Opt-out Management`);
65109
+ console.log(` ${pc66.green("\u2713")} Opt-out Management`);
64879
65110
  }
64880
65111
  if (config2.protectConfiguration?.enabled) {
64881
65112
  const countries = config2.protectConfiguration.allowedCountries?.join(", ") || "US";
64882
- console.log(` ${pc65.green("\u2713")} Fraud Protection`);
64883
- console.log(` ${pc65.dim("\u2514\u2500")} Allowed countries: ${pc65.cyan(countries)}`);
65113
+ console.log(` ${pc66.green("\u2713")} Fraud Protection`);
65114
+ console.log(` ${pc66.dim("\u2514\u2500")} Allowed countries: ${pc66.cyan(countries)}`);
64884
65115
  if (config2.protectConfiguration.aitFiltering) {
64885
- console.log(` ${pc65.dim("\u2514\u2500")} AIT filtering: ${pc65.cyan("enabled")}`);
65116
+ console.log(` ${pc66.dim("\u2514\u2500")} AIT filtering: ${pc66.cyan("enabled")}`);
64886
65117
  }
64887
65118
  } else {
64888
- console.log(` ${pc65.dim("\u25CB")} Fraud Protection (not configured)`);
65119
+ console.log(` ${pc66.dim("\u25CB")} Fraud Protection (not configured)`);
64889
65120
  }
64890
65121
  const currentCostData = calculateSMSCosts(config2, 1e4);
64891
65122
  console.log(
64892
65123
  `
64893
- Estimated Cost: ${pc65.cyan(`~${formatCost3(currentCostData.total.monthly)}/mo`)}`
65124
+ Estimated Cost: ${pc66.cyan(`~${formatCost3(currentCostData.total.monthly)}/mo`)}`
64894
65125
  );
64895
65126
  console.log("");
64896
65127
  const phoneTypeLabels = {
@@ -64997,22 +65228,22 @@ ${pc65.bold("Current Configuration:")}
64997
65228
  if (selectedType === "toll-free") {
64998
65229
  console.log(
64999
65230
  `
65000
- ${pc65.yellow("\u26A0")} ${pc65.bold("Toll-free Registration Required")}
65231
+ ${pc66.yellow("\u26A0")} ${pc66.bold("Toll-free Registration Required")}
65001
65232
  `
65002
65233
  );
65003
65234
  console.log(
65004
- pc65.dim("Toll-free numbers require carrier registration before")
65235
+ pc66.dim("Toll-free numbers require carrier registration before")
65005
65236
  );
65006
65237
  console.log(
65007
- pc65.dim("they can send messages at scale. After deployment:\n")
65238
+ pc66.dim("they can send messages at scale. After deployment:\n")
65008
65239
  );
65009
65240
  console.log(
65010
- ` 1. Run ${pc65.cyan("wraps sms register")} to start registration`
65241
+ ` 1. Run ${pc66.cyan("wraps sms register")} to start registration`
65011
65242
  );
65012
65243
  console.log(" 2. Submit your business use case information");
65013
65244
  console.log(" 3. Wait for carrier verification (1-5 business days)");
65014
65245
  console.log(
65015
- pc65.dim("\nUntil verified, sending is limited to low volume.\n")
65246
+ pc66.dim("\nUntil verified, sending is limited to low volume.\n")
65016
65247
  );
65017
65248
  const confirmTollFree = await clack61.confirm({
65018
65249
  message: "Continue with toll-free number request?",
@@ -65026,10 +65257,10 @@ ${pc65.yellow("\u26A0")} ${pc65.bold("Toll-free Registration Required")}
65026
65257
  if (selectedType === "10dlc") {
65027
65258
  console.log(
65028
65259
  `
65029
- ${pc65.yellow("\u26A0")} ${pc65.bold("10DLC Campaign Registration Required")}
65260
+ ${pc66.yellow("\u26A0")} ${pc66.bold("10DLC Campaign Registration Required")}
65030
65261
  `
65031
65262
  );
65032
- console.log(pc65.dim("10DLC requires brand and campaign registration:"));
65263
+ console.log(pc66.dim("10DLC requires brand and campaign registration:"));
65033
65264
  console.log(" \u2022 Brand registration: one-time $4 fee");
65034
65265
  console.log(" \u2022 Campaign registration: $15/mo per campaign");
65035
65266
  console.log(" \u2022 Verification takes 1-7 business days");
@@ -65262,12 +65493,12 @@ ${pc65.yellow("\u26A0")} ${pc65.bold("10DLC Campaign Registration Required")}
65262
65493
  const enableLinkTracking = !config2.tracking?.linkTracking;
65263
65494
  if (enableLinkTracking) {
65264
65495
  clack61.log.info(
65265
- pc65.dim(
65496
+ pc66.dim(
65266
65497
  "Link tracking will track clicks on URLs in your SMS messages."
65267
65498
  )
65268
65499
  );
65269
65500
  clack61.log.info(
65270
- pc65.dim("URLs will be rewritten to go through a tracking endpoint.")
65501
+ pc66.dim("URLs will be rewritten to go through a tracking endpoint.")
65271
65502
  );
65272
65503
  }
65273
65504
  const confirmed = await clack61.confirm({
@@ -65480,18 +65711,18 @@ ${pc65.yellow("\u26A0")} ${pc65.bold("10DLC Campaign Registration Required")}
65480
65711
  const newCostData = calculateSMSCosts(updatedConfig, 1e4);
65481
65712
  const costDiff = newCostData.total.monthly - currentCostData.total.monthly;
65482
65713
  console.log(`
65483
- ${pc65.bold("Cost Impact:")}`);
65714
+ ${pc66.bold("Cost Impact:")}`);
65484
65715
  console.log(
65485
- ` Current: ${pc65.cyan(`${formatCost3(currentCostData.total.monthly)}/mo`)}`
65716
+ ` Current: ${pc66.cyan(`${formatCost3(currentCostData.total.monthly)}/mo`)}`
65486
65717
  );
65487
65718
  console.log(
65488
- ` New: ${pc65.cyan(`${formatCost3(newCostData.total.monthly)}/mo`)}`
65719
+ ` New: ${pc66.cyan(`${formatCost3(newCostData.total.monthly)}/mo`)}`
65489
65720
  );
65490
65721
  if (costDiff > 0) {
65491
- console.log(` Change: ${pc65.yellow(`+${formatCost3(costDiff)}/mo`)}`);
65722
+ console.log(` Change: ${pc66.yellow(`+${formatCost3(costDiff)}/mo`)}`);
65492
65723
  } else if (costDiff < 0) {
65493
65724
  console.log(
65494
- ` Change: ${pc65.green(`-${formatCost3(Math.abs(costDiff))}/mo`)}`
65725
+ ` Change: ${pc66.green(`-${formatCost3(Math.abs(costDiff))}/mo`)}`
65495
65726
  );
65496
65727
  }
65497
65728
  console.log("");
@@ -65520,7 +65751,7 @@ ${pc65.bold("Cost Impact:")}`);
65520
65751
  const stackName = metadata.services.sms?.pulumiStackName || `wraps-sms-${identity.accountId}-${region}`;
65521
65752
  const createStack = async () => {
65522
65753
  await ensurePulumiWorkDir({ accountId: identity.accountId, region });
65523
- const stack = await pulumi34.automation.LocalWorkspace.createOrSelectStack(
65754
+ const stack = await pulumi35.automation.LocalWorkspace.createOrSelectStack(
65524
65755
  {
65525
65756
  stackName,
65526
65757
  projectName: "wraps-sms",
@@ -65571,7 +65802,7 @@ ${pc65.bold("Cost Impact:")}`);
65571
65802
  commandName: "wraps sms upgrade"
65572
65803
  });
65573
65804
  clack61.outro(
65574
- pc65.green("Preview complete. Run without --preview to upgrade.")
65805
+ pc66.green("Preview complete. Run without --preview to upgrade.")
65575
65806
  );
65576
65807
  trackServiceUpgrade("sms", {
65577
65808
  region,
@@ -65676,43 +65907,43 @@ ${pc65.bold("Cost Impact:")}`);
65676
65907
  }
65677
65908
  progress.info("Connection metadata updated");
65678
65909
  console.log("\n");
65679
- clack61.log.success(pc65.green(pc65.bold("SMS infrastructure upgraded!")));
65910
+ clack61.log.success(pc66.green(pc66.bold("SMS infrastructure upgraded!")));
65680
65911
  console.log("\n");
65681
65912
  clack61.note(
65682
65913
  [
65683
- `${pc65.bold("Phone Number:")} ${pc65.cyan(outputs.phoneNumber || "Provisioning...")}`,
65684
- `${pc65.bold("Phone Type:")} ${pc65.cyan(updatedConfig.phoneNumberType || "simulator")}`,
65685
- `${pc65.bold("Config Set:")} ${pc65.cyan(outputs.configSetName || "wraps-sms-config")}`,
65686
- `${pc65.bold("Region:")} ${pc65.cyan(outputs.region)}`,
65687
- outputs.tableName ? `${pc65.bold("History Table:")} ${pc65.cyan(outputs.tableName)}` : "",
65914
+ `${pc66.bold("Phone Number:")} ${pc66.cyan(outputs.phoneNumber || "Provisioning...")}`,
65915
+ `${pc66.bold("Phone Type:")} ${pc66.cyan(updatedConfig.phoneNumberType || "simulator")}`,
65916
+ `${pc66.bold("Config Set:")} ${pc66.cyan(outputs.configSetName || "wraps-sms-config")}`,
65917
+ `${pc66.bold("Region:")} ${pc66.cyan(outputs.region)}`,
65918
+ outputs.tableName ? `${pc66.bold("History Table:")} ${pc66.cyan(outputs.tableName)}` : "",
65688
65919
  "",
65689
- pc65.dim("IAM Role:"),
65690
- pc65.dim(` ${outputs.roleArn}`)
65920
+ pc66.dim("IAM Role:"),
65921
+ pc66.dim(` ${outputs.roleArn}`)
65691
65922
  ].filter(Boolean).join("\n"),
65692
65923
  "SMS Infrastructure"
65693
65924
  );
65694
65925
  console.log(`
65695
- ${pc65.green("\u2713")} ${pc65.bold("Upgrade complete!")}
65926
+ ${pc66.green("\u2713")} ${pc66.bold("Upgrade complete!")}
65696
65927
  `);
65697
65928
  if (upgradeAction === "phone-number") {
65698
65929
  console.log(
65699
- `Upgraded to ${pc65.cyan(updatedConfig.phoneNumberType)} number (${pc65.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
65930
+ `Upgraded to ${pc66.cyan(updatedConfig.phoneNumberType)} number (${pc66.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
65700
65931
  `
65701
65932
  );
65702
65933
  if (updatedConfig.phoneNumberType === "toll-free") {
65703
- console.log(`${pc65.bold("Next Steps:")}`);
65934
+ console.log(`${pc66.bold("Next Steps:")}`);
65704
65935
  console.log(
65705
- ` 1. Run ${pc65.cyan("wraps sms register")} to start toll-free registration`
65936
+ ` 1. Run ${pc66.cyan("wraps sms register")} to start toll-free registration`
65706
65937
  );
65707
65938
  console.log(" 2. Submit your business information and use case");
65708
65939
  console.log(" 3. Wait for carrier verification (1-5 business days)");
65709
65940
  console.log("");
65710
65941
  console.log(
65711
- pc65.dim("Until verified, your number can only send limited messages.")
65942
+ pc66.dim("Until verified, your number can only send limited messages.")
65712
65943
  );
65713
65944
  console.log("");
65714
65945
  } else if (updatedConfig.phoneNumberType === "10dlc") {
65715
- console.log(`${pc65.bold("Next Steps:")}`);
65946
+ console.log(`${pc66.bold("Next Steps:")}`);
65716
65947
  console.log(" 1. Register your brand in the AWS Console");
65717
65948
  console.log(" 2. Create a 10DLC campaign for your use case");
65718
65949
  console.log(" 3. Wait for campaign approval (1-7 business days)");
@@ -65720,16 +65951,16 @@ ${pc65.green("\u2713")} ${pc65.bold("Upgrade complete!")}
65720
65951
  }
65721
65952
  } else if (upgradeAction === "preset" && newPreset) {
65722
65953
  console.log(
65723
- `Upgraded to ${pc65.cyan(newPreset)} preset (${pc65.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
65954
+ `Upgraded to ${pc66.cyan(newPreset)} preset (${pc66.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
65724
65955
  `
65725
65956
  );
65726
65957
  } else {
65727
65958
  console.log(
65728
- `Updated configuration (${pc65.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
65959
+ `Updated configuration (${pc66.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
65729
65960
  `
65730
65961
  );
65731
65962
  }
65732
- console.log(pc65.dim(getSMSCostSummary(updatedConfig, 1e4)));
65963
+ console.log(pc66.dim(getSMSCostSummary(updatedConfig, 1e4)));
65733
65964
  const enabledFeatures = [];
65734
65965
  if (updatedConfig.tracking?.enabled) {
65735
65966
  enabledFeatures.push("tracking");
@@ -65753,7 +65984,7 @@ ${pc65.green("\u2713")} ${pc65.bold("Upgrade complete!")}
65753
65984
  action: typeof upgradeAction === "string" ? upgradeAction : void 0,
65754
65985
  duration_ms: Date.now() - startTime
65755
65986
  });
65756
- clack61.outro(pc65.green("Upgrade complete!"));
65987
+ clack61.outro(pc66.green("Upgrade complete!"));
65757
65988
  }
65758
65989
 
65759
65990
  // src/commands/sms/verify-number.ts
@@ -65773,12 +66004,12 @@ import {
65773
66004
  VerifyDestinationNumberCommand
65774
66005
  } from "@aws-sdk/client-pinpoint-sms-voice-v2";
65775
66006
  import * as clack62 from "@clack/prompts";
65776
- import pc66 from "picocolors";
66007
+ import pc67 from "picocolors";
65777
66008
  async function smsVerifyNumber(options) {
65778
66009
  const startTime = Date.now();
65779
66010
  const progress = new DeploymentProgress();
65780
66011
  if (!isJsonMode()) {
65781
- clack62.intro(pc66.bold("Wraps SMS - Verify Destination Number"));
66012
+ clack62.intro(pc67.bold("Wraps SMS - Verify Destination Number"));
65782
66013
  }
65783
66014
  const identity = await progress.execute(
65784
66015
  "Validating AWS credentials",
@@ -65791,7 +66022,7 @@ async function smsVerifyNumber(options) {
65791
66022
  clack62.log.error("No SMS infrastructure found");
65792
66023
  console.log(
65793
66024
  `
65794
- Run ${pc66.cyan("wraps sms init")} to deploy SMS infrastructure.
66025
+ Run ${pc67.cyan("wraps sms init")} to deploy SMS infrastructure.
65795
66026
  `
65796
66027
  );
65797
66028
  process.exit(1);
@@ -65808,16 +66039,16 @@ Run ${pc66.cyan("wraps sms init")} to deploy SMS infrastructure.
65808
66039
  clack62.log.info("No verified destination numbers found");
65809
66040
  console.log(
65810
66041
  `
65811
- Run ${pc66.cyan("wraps sms verify-number")} to verify a number.
66042
+ Run ${pc67.cyan("wraps sms verify-number")} to verify a number.
65812
66043
  `
65813
66044
  );
65814
66045
  } else {
65815
66046
  console.log("\n");
65816
- clack62.log.info(pc66.bold("Verified Destination Numbers:"));
66047
+ clack62.log.info(pc67.bold("Verified Destination Numbers:"));
65817
66048
  console.log("");
65818
66049
  for (const num of response.VerifiedDestinationNumbers) {
65819
- const status2 = num.Status === "VERIFIED" ? pc66.green("\u2713 Verified") : pc66.yellow("\u29D6 Pending");
65820
- console.log(` ${pc66.cyan(num.DestinationPhoneNumber)} - ${status2}`);
66050
+ const status2 = num.Status === "VERIFIED" ? pc67.green("\u2713 Verified") : pc67.yellow("\u29D6 Pending");
66051
+ console.log(` ${pc67.cyan(num.DestinationPhoneNumber)} - ${status2}`);
65821
66052
  }
65822
66053
  console.log("");
65823
66054
  }
@@ -65835,7 +66066,7 @@ Run ${pc66.cyan("wraps sms verify-number")} to verify a number.
65835
66066
  });
65836
66067
  return;
65837
66068
  }
65838
- clack62.outro(pc66.green("Done!"));
66069
+ clack62.outro(pc67.green("Done!"));
65839
66070
  return;
65840
66071
  } catch (error) {
65841
66072
  progress.stop();
@@ -65854,7 +66085,7 @@ Run ${pc66.cyan("wraps sms verify-number")} to verify a number.
65854
66085
  clack62.log.error("Phone number is required for deletion");
65855
66086
  console.log(
65856
66087
  `
65857
- Usage: ${pc66.cyan("wraps sms verify-number --delete --phone-number +14155551234")}
66088
+ Usage: ${pc67.cyan("wraps sms verify-number --delete --phone-number +14155551234")}
65858
66089
  `
65859
66090
  );
65860
66091
  process.exit(1);
@@ -65879,7 +66110,7 @@ Usage: ${pc66.cyan("wraps sms verify-number --delete --phone-number +14155551234
65879
66110
  );
65880
66111
  });
65881
66112
  progress.stop();
65882
- clack62.log.success(`Removed ${pc66.cyan(phoneNumber2)} from verified list`);
66113
+ clack62.log.success(`Removed ${pc67.cyan(phoneNumber2)} from verified list`);
65883
66114
  trackCommand("sms:verify-number:delete", {
65884
66115
  success: true,
65885
66116
  duration_ms: Date.now() - startTime
@@ -65891,7 +66122,7 @@ Usage: ${pc66.cyan("wraps sms verify-number --delete --phone-number +14155551234
65891
66122
  });
65892
66123
  return;
65893
66124
  }
65894
- clack62.outro(pc66.green("Done!"));
66125
+ clack62.outro(pc67.green("Done!"));
65895
66126
  return;
65896
66127
  } catch (error) {
65897
66128
  progress.stop();
@@ -65963,11 +66194,11 @@ Usage: ${pc66.cyan("wraps sms verify-number --delete --phone-number +14155551234
65963
66194
  progress.stop();
65964
66195
  console.log("\n");
65965
66196
  clack62.log.success(
65966
- pc66.green(`Phone number ${pc66.cyan(phoneNumber)} verified!`)
66197
+ pc67.green(`Phone number ${pc67.cyan(phoneNumber)} verified!`)
65967
66198
  );
65968
66199
  console.log("");
65969
66200
  console.log(
65970
- `You can now send test messages to this number with ${pc66.cyan("wraps sms test")}`
66201
+ `You can now send test messages to this number with ${pc67.cyan("wraps sms test")}`
65971
66202
  );
65972
66203
  trackCommand("sms:verify-number:confirm", {
65973
66204
  success: true,
@@ -65980,7 +66211,7 @@ Usage: ${pc66.cyan("wraps sms verify-number --delete --phone-number +14155551234
65980
66211
  });
65981
66212
  return;
65982
66213
  }
65983
- clack62.outro(pc66.green("Verification complete!"));
66214
+ clack62.outro(pc67.green("Verification complete!"));
65984
66215
  return;
65985
66216
  } catch (error) {
65986
66217
  progress.stop();
@@ -65989,7 +66220,7 @@ Usage: ${pc66.cyan("wraps sms verify-number --delete --phone-number +14155551234
65989
66220
  clack62.log.error("Invalid verification code. Please try again.");
65990
66221
  console.log(
65991
66222
  `
65992
- Run ${pc66.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`)} to get a new code.
66223
+ Run ${pc67.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`)} to get a new code.
65993
66224
  `
65994
66225
  );
65995
66226
  } else {
@@ -66025,11 +66256,11 @@ Run ${pc66.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
66025
66256
  );
66026
66257
  });
66027
66258
  progress.stop();
66028
- clack62.log.success(`Verification code resent to ${pc66.cyan(phoneNumber)}`);
66259
+ clack62.log.success(`Verification code resent to ${pc67.cyan(phoneNumber)}`);
66029
66260
  console.log("");
66030
66261
  console.log(
66031
66262
  `Once you receive the code, run:
66032
- ${pc66.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`
66263
+ ${pc67.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`
66033
66264
  );
66034
66265
  trackCommand("sms:verify-number:resend", {
66035
66266
  success: true,
@@ -66042,7 +66273,7 @@ Run ${pc66.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
66042
66273
  });
66043
66274
  return;
66044
66275
  }
66045
- clack62.outro(pc66.green("Code sent!"));
66276
+ clack62.outro(pc67.green("Code sent!"));
66046
66277
  return;
66047
66278
  } catch (error) {
66048
66279
  progress.stop();
@@ -66071,9 +66302,9 @@ Run ${pc66.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
66071
66302
  return;
66072
66303
  }
66073
66304
  clack62.log.info(
66074
- `Number ${pc66.cyan(phoneNumber)} is already verified and ready to use!`
66305
+ `Number ${pc67.cyan(phoneNumber)} is already verified and ready to use!`
66075
66306
  );
66076
- clack62.outro(pc66.green("Done!"));
66307
+ clack62.outro(pc67.green("Done!"));
66077
66308
  return;
66078
66309
  }
66079
66310
  if (existingNumber?.Status === "PENDING") {
@@ -66098,14 +66329,14 @@ Run ${pc66.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
66098
66329
  return;
66099
66330
  }
66100
66331
  clack62.log.info(
66101
- `Verification already in progress. New code sent to ${pc66.cyan(phoneNumber)}`
66332
+ `Verification already in progress. New code sent to ${pc67.cyan(phoneNumber)}`
66102
66333
  );
66103
66334
  console.log("");
66104
66335
  console.log(
66105
66336
  `Once you receive the code, run:
66106
- ${pc66.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`
66337
+ ${pc67.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`
66107
66338
  );
66108
- clack62.outro(pc66.green("Code sent!"));
66339
+ clack62.outro(pc67.green("Code sent!"));
66109
66340
  return;
66110
66341
  }
66111
66342
  const createResponse = await progress.execute(
@@ -66127,7 +66358,7 @@ Run ${pc66.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
66127
66358
  progress.stop();
66128
66359
  console.log("\n");
66129
66360
  clack62.log.success(
66130
- `Verification code sent to ${pc66.cyan(phoneNumber)} via SMS`
66361
+ `Verification code sent to ${pc67.cyan(phoneNumber)} via SMS`
66131
66362
  );
66132
66363
  console.log("");
66133
66364
  clack62.note(
@@ -66135,9 +66366,9 @@ Run ${pc66.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
66135
66366
  "1. Check your phone for the verification code",
66136
66367
  "",
66137
66368
  "2. Complete verification with:",
66138
- ` ${pc66.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`,
66369
+ ` ${pc67.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`,
66139
66370
  "",
66140
- pc66.dim("The code expires in 24 hours")
66371
+ pc67.dim("The code expires in 24 hours")
66141
66372
  ].join("\n"),
66142
66373
  "Next Steps"
66143
66374
  );
@@ -66153,7 +66384,7 @@ Run ${pc66.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
66153
66384
  });
66154
66385
  return;
66155
66386
  }
66156
- clack62.outro(pc66.green("Verification started!"));
66387
+ clack62.outro(pc67.green("Verification started!"));
66157
66388
  } catch (error) {
66158
66389
  progress.stop();
66159
66390
  const errorMessage = error instanceof Error ? error.message : String(error);
@@ -66161,7 +66392,7 @@ Run ${pc66.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
66161
66392
  clack62.log.error("This number is already being verified");
66162
66393
  console.log(
66163
66394
  `
66164
- Run ${pc66.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`)} to get a new code.
66395
+ Run ${pc67.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`)} to get a new code.
66165
66396
  `
66166
66397
  );
66167
66398
  } else {
@@ -66178,21 +66409,21 @@ Run ${pc66.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
66178
66409
  init_esm_shims();
66179
66410
  init_events();
66180
66411
  import * as clack63 from "@clack/prompts";
66181
- import pc67 from "picocolors";
66412
+ import pc68 from "picocolors";
66182
66413
  async function support() {
66183
66414
  trackCommand("support", { success: true });
66184
- clack63.intro(pc67.bold("Get Help with Wraps"));
66415
+ clack63.intro(pc68.bold("Get Help with Wraps"));
66185
66416
  console.log();
66186
- console.log(` ${pc67.bold("Email:")} ${pc67.cyan("hey@wraps.dev")}`);
66417
+ console.log(` ${pc68.bold("Email:")} ${pc68.cyan("hey@wraps.dev")}`);
66187
66418
  console.log(
66188
- ` ${pc67.bold("GitHub:")} ${pc67.cyan("https://github.com/wraps-dev/wraps/issues")}`
66419
+ ` ${pc68.bold("GitHub:")} ${pc68.cyan("https://github.com/wraps-dev/wraps/issues")}`
66189
66420
  );
66190
- console.log(` ${pc67.bold("Docs:")} ${pc67.cyan("https://wraps.dev/docs")}`);
66421
+ console.log(` ${pc68.bold("Docs:")} ${pc68.cyan("https://wraps.dev/docs")}`);
66191
66422
  console.log(
66192
- ` ${pc67.bold("AI docs:")} ${pc67.cyan("https://wraps.dev/llms-full.txt")} ${pc67.dim("(complete docs, one file)")}`
66423
+ ` ${pc68.bold("AI docs:")} ${pc68.cyan("https://wraps.dev/llms-full.txt")} ${pc68.dim("(complete docs, one file)")}`
66193
66424
  );
66194
66425
  console.log();
66195
- console.log(pc67.dim(" Response time: Usually within 24 hours"));
66426
+ console.log(pc68.dim(" Response time: Usually within 24 hours"));
66196
66427
  console.log();
66197
66428
  }
66198
66429
 
@@ -66200,7 +66431,7 @@ async function support() {
66200
66431
  init_esm_shims();
66201
66432
  init_client();
66202
66433
  import * as clack64 from "@clack/prompts";
66203
- import pc68 from "picocolors";
66434
+ import pc69 from "picocolors";
66204
66435
  async function telemetryEnable() {
66205
66436
  const client2 = getTelemetryClient();
66206
66437
  const override = client2.enable();
@@ -66208,60 +66439,60 @@ async function telemetryEnable() {
66208
66439
  clack64.log.warn(
66209
66440
  "Telemetry enabled in config, but overridden by environment"
66210
66441
  );
66211
- console.log(` Reason: ${pc68.yellow(override)}`);
66212
- console.log(` Config: ${pc68.dim(client2.getConfigPath())}`);
66442
+ console.log(` Reason: ${pc69.yellow(override)}`);
66443
+ console.log(` Config: ${pc69.dim(client2.getConfigPath())}`);
66213
66444
  console.log();
66214
66445
  } else {
66215
- clack64.log.success(pc68.green("Telemetry enabled"));
66216
- console.log(` Config: ${pc68.dim(client2.getConfigPath())}`);
66446
+ clack64.log.success(pc69.green("Telemetry enabled"));
66447
+ console.log(` Config: ${pc69.dim(client2.getConfigPath())}`);
66217
66448
  console.log(`
66218
- ${pc68.dim("Thank you for helping improve Wraps!")}
66449
+ ${pc69.dim("Thank you for helping improve Wraps!")}
66219
66450
  `);
66220
66451
  }
66221
66452
  }
66222
66453
  async function telemetryDisable() {
66223
66454
  const client2 = getTelemetryClient();
66224
66455
  client2.disable();
66225
- clack64.log.success(pc68.green("Telemetry disabled"));
66226
- console.log(` Config: ${pc68.dim(client2.getConfigPath())}`);
66456
+ clack64.log.success(pc69.green("Telemetry disabled"));
66457
+ console.log(` Config: ${pc69.dim(client2.getConfigPath())}`);
66227
66458
  console.log(
66228
66459
  `
66229
- ${pc68.dim("You can re-enable with:")} wraps telemetry enable
66460
+ ${pc69.dim("You can re-enable with:")} wraps telemetry enable
66230
66461
  `
66231
66462
  );
66232
66463
  }
66233
66464
  async function telemetryStatus() {
66234
66465
  const client2 = getTelemetryClient();
66235
- clack64.intro(pc68.bold("Telemetry Status"));
66466
+ clack64.intro(pc69.bold("Telemetry Status"));
66236
66467
  const override = client2.getEnvOverride();
66237
- const status2 = client2.isEnabled() ? pc68.green("Enabled") : pc68.red("Disabled");
66468
+ const status2 = client2.isEnabled() ? pc69.green("Enabled") : pc69.red("Disabled");
66238
66469
  console.log();
66239
- console.log(` ${pc68.bold("Status:")} ${status2}`);
66470
+ console.log(` ${pc69.bold("Status:")} ${status2}`);
66240
66471
  if (!client2.isEnabled() && override) {
66241
- console.log(` ${pc68.bold("Reason:")} ${pc68.yellow(override)}`);
66472
+ console.log(` ${pc69.bold("Reason:")} ${pc69.yellow(override)}`);
66242
66473
  }
66243
- console.log(` ${pc68.bold("Config file:")} ${pc68.dim(client2.getConfigPath())}`);
66474
+ console.log(` ${pc69.bold("Config file:")} ${pc69.dim(client2.getConfigPath())}`);
66244
66475
  if (client2.isEnabled()) {
66245
66476
  console.log();
66246
- console.log(pc68.bold(" How to opt-out:"));
66247
- console.log(` ${pc68.cyan("wraps telemetry disable")}`);
66477
+ console.log(pc69.bold(" How to opt-out:"));
66478
+ console.log(` ${pc69.cyan("wraps telemetry disable")}`);
66248
66479
  console.log(
66249
- ` ${pc68.dim("Or set:")} ${pc68.cyan("WRAPS_TELEMETRY_DISABLED=1")}`
66480
+ ` ${pc69.dim("Or set:")} ${pc69.cyan("WRAPS_TELEMETRY_DISABLED=1")}`
66250
66481
  );
66251
- console.log(` ${pc68.dim("Or set:")} ${pc68.cyan("DO_NOT_TRACK=1")}`);
66482
+ console.log(` ${pc69.dim("Or set:")} ${pc69.cyan("DO_NOT_TRACK=1")}`);
66252
66483
  } else {
66253
66484
  console.log();
66254
- console.log(pc68.bold(" How to opt-in:"));
66255
- console.log(` ${pc68.cyan("wraps telemetry enable")}`);
66485
+ console.log(pc69.bold(" How to opt-in:"));
66486
+ console.log(` ${pc69.cyan("wraps telemetry enable")}`);
66256
66487
  }
66257
66488
  console.log();
66258
- console.log(pc68.bold(" Debug mode:"));
66489
+ console.log(pc69.bold(" Debug mode:"));
66259
66490
  console.log(
66260
- ` ${pc68.dim("See what would be sent:")} ${pc68.cyan("WRAPS_TELEMETRY_DEBUG=1 wraps <command>")}`
66491
+ ` ${pc69.dim("See what would be sent:")} ${pc69.cyan("WRAPS_TELEMETRY_DEBUG=1 wraps <command>")}`
66261
66492
  );
66262
66493
  console.log();
66263
66494
  console.log(
66264
- ` ${pc68.dim("Learn more:")} ${pc68.cyan("https://wraps.dev/docs/telemetry")}`
66495
+ ` ${pc69.dim("Learn more:")} ${pc69.cyan("https://wraps.dev/docs/telemetry")}`
66265
66496
  );
66266
66497
  console.log();
66267
66498
  }
@@ -66271,7 +66502,7 @@ init_esm_shims();
66271
66502
  import { existsSync as existsSync18, mkdirSync as mkdirSync2, writeFileSync } from "fs";
66272
66503
  import { join as join23 } from "path";
66273
66504
  import * as clack65 from "@clack/prompts";
66274
- import pc69 from "picocolors";
66505
+ import pc70 from "picocolors";
66275
66506
  var EXAMPLE_CASCADE_WORKFLOW = `import {
66276
66507
  defineWorkflow,
66277
66508
  sendEmail,
@@ -66366,13 +66597,13 @@ export default defineConfig({
66366
66597
  });
66367
66598
  `;
66368
66599
  async function workflowInit(options = {}) {
66369
- clack65.intro(pc69.bgCyan(pc69.black(" wraps workflow init ")));
66600
+ clack65.intro(pc70.bgCyan(pc70.black(" wraps workflow init ")));
66370
66601
  const wrapsDir = join23(process.cwd(), "wraps");
66371
66602
  const workflowsDir = join23(wrapsDir, "workflows");
66372
66603
  const configPath = join23(wrapsDir, "wraps.config.ts");
66373
66604
  if (existsSync18(workflowsDir)) {
66374
66605
  clack65.log.info(
66375
- `Workflows directory already exists at ${pc69.cyan("wraps/workflows/")}`
66606
+ `Workflows directory already exists at ${pc70.cyan("wraps/workflows/")}`
66376
66607
  );
66377
66608
  const files = existsSync18(join23(workflowsDir, "cart-recovery.ts")) || existsSync18(join23(workflowsDir, "welcome-sequence.ts"));
66378
66609
  if (files && !options.yes) {
@@ -66407,34 +66638,34 @@ async function workflowInit(options = {}) {
66407
66638
  s2.stop("Created 2 example workflows");
66408
66639
  if (!existsSync18(configPath)) {
66409
66640
  writeFileSync(configPath, EXAMPLE_CONFIG, "utf-8");
66410
- clack65.log.info(`Created ${pc69.cyan("wraps/wraps.config.ts")}`);
66641
+ clack65.log.info(`Created ${pc70.cyan("wraps/wraps.config.ts")}`);
66411
66642
  }
66412
66643
  clack65.log.success(
66413
- `${pc69.bold("Workflows scaffolded!")} Created:
66414
- ${pc69.cyan("wraps/wraps.config.ts")} \u2014 Project config
66415
- ${pc69.cyan("wraps/workflows/cart-recovery.ts")} \u2014 Cross-channel cascade example
66416
- ${pc69.cyan("wraps/workflows/welcome-sequence.ts")} \u2014 Welcome series example`
66644
+ `${pc70.bold("Workflows scaffolded!")} Created:
66645
+ ${pc70.cyan("wraps/wraps.config.ts")} \u2014 Project config
66646
+ ${pc70.cyan("wraps/workflows/cart-recovery.ts")} \u2014 Cross-channel cascade example
66647
+ ${pc70.cyan("wraps/workflows/welcome-sequence.ts")} \u2014 Welcome series example`
66417
66648
  );
66418
66649
  showNextSteps2();
66419
- clack65.outro(pc69.green("Happy orchestrating!"));
66650
+ clack65.outro(pc70.green("Happy orchestrating!"));
66420
66651
  } catch (error) {
66421
66652
  clack65.log.error(
66422
66653
  `Failed to scaffold workflows: ${error instanceof Error ? error.message : String(error)}`
66423
66654
  );
66424
- clack65.outro(pc69.red("Scaffolding failed."));
66655
+ clack65.outro(pc70.red("Scaffolding failed."));
66425
66656
  process.exitCode = 1;
66426
66657
  }
66427
66658
  }
66428
66659
  function showNextSteps2() {
66429
66660
  clack65.log.info(
66430
- `${pc69.bold("Next steps:")}
66661
+ `${pc70.bold("Next steps:")}
66431
66662
 
66432
- 1. Edit ${pc69.cyan("wraps/wraps.config.ts")} with your org slug and domain
66433
- 2. Edit your workflows in ${pc69.cyan("wraps/workflows/")}
66434
- 3. Validate: ${pc69.cyan("wraps email workflows validate")}
66435
- 4. Push: ${pc69.cyan("wraps email workflows push")}
66663
+ 1. Edit ${pc70.cyan("wraps/wraps.config.ts")} with your org slug and domain
66664
+ 2. Edit your workflows in ${pc70.cyan("wraps/workflows/")}
66665
+ 3. Validate: ${pc70.cyan("wraps email workflows validate")}
66666
+ 4. Push: ${pc70.cyan("wraps email workflows push")}
66436
66667
 
66437
- ${pc69.dim("Docs:")} ${pc69.underline("https://wraps.dev/docs/guides/orchestration")}`
66668
+ ${pc70.dim("Docs:")} ${pc70.underline("https://wraps.dev/docs/guides/orchestration")}`
66438
66669
  );
66439
66670
  }
66440
66671
 
@@ -66726,238 +66957,241 @@ function showVersion() {
66726
66957
  process.exit(0);
66727
66958
  }
66728
66959
  function showHelp() {
66729
- clack66.intro(pc71.bold(`WRAPS CLI v${VERSION}`));
66960
+ clack66.intro(pc72.bold(`WRAPS CLI v${VERSION}`));
66730
66961
  console.log("Deploy AWS infrastructure to your account\n");
66731
66962
  console.log("Usage: wraps [service] <command> [options]\n");
66732
66963
  console.log("Services:");
66733
- console.log(` ${pc71.cyan("email")} Email infrastructure (AWS SES)`);
66964
+ console.log(` ${pc72.cyan("email")} Email infrastructure (AWS SES)`);
66734
66965
  console.log(
66735
- ` ${pc71.cyan("sms")} SMS infrastructure (AWS End User Messaging)`
66966
+ ` ${pc72.cyan("sms")} SMS infrastructure (AWS End User Messaging)`
66736
66967
  );
66737
66968
  console.log(
66738
- ` ${pc71.cyan("cdn")} CDN infrastructure (AWS S3 + CloudFront)`
66969
+ ` ${pc72.cyan("cdn")} CDN infrastructure (AWS S3 + CloudFront)`
66739
66970
  );
66740
66971
  console.log(
66741
- ` ${pc71.cyan("selfhost")} Self-hosted Wraps control plane (enterprise)`
66972
+ ` ${pc72.cyan("selfhost")} Self-hosted Wraps control plane (enterprise)`
66742
66973
  );
66743
66974
  console.log(
66744
- ` ${pc71.cyan("license")} License key management (Wraps team only)
66975
+ ` ${pc72.cyan("license")} License key management (Wraps team only)
66745
66976
  `
66746
66977
  );
66747
66978
  console.log("Email Commands:");
66748
66979
  console.log(
66749
- ` ${pc71.cyan("email init")} Deploy new email infrastructure`
66980
+ ` ${pc72.cyan("email init")} Deploy new email infrastructure`
66750
66981
  );
66751
66982
  console.log(
66752
- ` ${pc71.cyan("email check")} Check email deliverability for a domain`
66983
+ ` ${pc72.cyan("email check")} Check email deliverability for a domain`
66753
66984
  );
66754
66985
  console.log(
66755
- ` ${pc71.cyan("email connect")} Connect to existing AWS SES`
66986
+ ` ${pc72.cyan("email connect")} Connect to existing AWS SES`
66756
66987
  );
66757
66988
  console.log(
66758
- ` ${pc71.cyan("email status")} Show email infrastructure details`
66989
+ ` ${pc72.cyan("email status")} Show email infrastructure details`
66759
66990
  );
66760
66991
  console.log(
66761
- ` ${pc71.cyan("email plan")} Show SES pricing plan and cheaper options`
66992
+ ` ${pc72.cyan("email plan")} Show SES pricing plan and cheaper options`
66762
66993
  );
66763
- console.log(` ${pc71.cyan("email test")} Send a test email`);
66764
- console.log(` ${pc71.cyan("email verify")} Verify domain DNS records`);
66994
+ console.log(` ${pc72.cyan("email test")} Send a test email`);
66995
+ console.log(` ${pc72.cyan("email verify")} Verify domain DNS records`);
66765
66996
  console.log(
66766
- ` ${pc71.cyan("email sync")} Apply CLI updates to infrastructure`
66997
+ ` ${pc72.cyan("email sync")} Apply CLI updates to infrastructure`
66767
66998
  );
66768
- console.log(` ${pc71.cyan("email upgrade")} Add features`);
66999
+ console.log(` ${pc72.cyan("email upgrade")} Add features`);
66769
67000
  console.log(
66770
- ` ${pc71.cyan("email restore")} Restore original configuration`
67001
+ ` ${pc72.cyan("email restore")} Restore original configuration`
66771
67002
  );
66772
67003
  console.log(
66773
- ` ${pc71.cyan("email destroy")} Remove email infrastructure`
67004
+ ` ${pc72.cyan("email destroy")} Remove email infrastructure`
66774
67005
  );
66775
67006
  console.log(
66776
- ` ${pc71.cyan("email doctor")} Diagnose and clean up email infrastructure`
67007
+ ` ${pc72.cyan("email doctor")} Diagnose and clean up email infrastructure`
66777
67008
  );
66778
- console.log(` ${pc71.cyan("email domains add")} Add a domain to SES`);
66779
- console.log(` ${pc71.cyan("email domains list")} List all domains`);
66780
- console.log(` ${pc71.cyan("email domains remove")} Remove a domain`);
67009
+ console.log(` ${pc72.cyan("email domains add")} Add a domain to SES`);
67010
+ console.log(` ${pc72.cyan("email domains list")} List all domains`);
67011
+ console.log(` ${pc72.cyan("email domains remove")} Remove a domain`);
66781
67012
  console.log(
66782
- ` ${pc71.cyan("email inbound init")} Enable inbound email receiving`
67013
+ ` ${pc72.cyan("email inbound init")} Enable inbound email receiving`
66783
67014
  );
66784
- console.log(` ${pc71.cyan("email inbound status")} Show inbound email status`);
67015
+ console.log(` ${pc72.cyan("email inbound status")} Show inbound email status`);
66785
67016
  console.log(
66786
- ` ${pc71.cyan("email inbound verify")} Verify inbound DNS records`
67017
+ ` ${pc72.cyan("email inbound verify")} Verify inbound DNS records`
66787
67018
  );
66788
67019
  console.log(
66789
- ` ${pc71.cyan("email inbound test")} Send test email and verify receipt`
67020
+ ` ${pc72.cyan("email inbound test")} Send test email and verify receipt`
66790
67021
  );
66791
67022
  console.log(
66792
- ` ${pc71.cyan("email inbound destroy")} Remove inbound email infrastructure
67023
+ ` ${pc72.cyan("email inbound destroy")} Remove inbound email infrastructure
66793
67024
  `
66794
67025
  );
66795
67026
  console.log("Agent Commands:");
66796
67027
  console.log(
66797
- ` ${pc71.cyan("email agent create")} Create a leashed agent mailbox`
67028
+ ` ${pc72.cyan("email agent create")} Create a leashed agent mailbox`
66798
67029
  );
66799
- console.log(` ${pc71.cyan("email agent list")} List agents`);
67030
+ console.log(` ${pc72.cyan("email agent list")} List agents`);
66800
67031
  console.log(
66801
- ` ${pc71.cyan("email agent kill")} Kill an agent (revoke sending)
67032
+ ` ${pc72.cyan("email agent kill")} Kill an agent (revoke sending)
66802
67033
  `
66803
67034
  );
66804
67035
  console.log("Template Commands:");
66805
67036
  console.log(
66806
- ` ${pc71.cyan("email templates init")} Initialize templates-as-code`
67037
+ ` ${pc72.cyan("email templates init")} Initialize templates-as-code`
66807
67038
  );
66808
67039
  console.log(
66809
- ` ${pc71.cyan("email templates push")} Push templates to SES + dashboard`
67040
+ ` ${pc72.cyan("email templates push")} Push templates to SES + dashboard`
66810
67041
  );
66811
67042
  console.log(
66812
- ` ${pc71.cyan("email templates preview")} Preview templates in browser`
67043
+ ` ${pc72.cyan("email templates preview")} Preview templates in browser`
66813
67044
  );
66814
67045
  console.log(
66815
- ` ${pc71.cyan("push")} ${pc71.dim("(alias for email templates push)")}
67046
+ ` ${pc72.cyan("push")} ${pc72.dim("(alias for email templates push)")}
66816
67047
  `
66817
67048
  );
66818
67049
  console.log("Workflow Commands:");
66819
67050
  console.log(
66820
- ` ${pc71.cyan("email workflows init")} Initialize workflows-as-code`
67051
+ ` ${pc72.cyan("email workflows init")} Initialize workflows-as-code`
66821
67052
  );
66822
67053
  console.log(
66823
- ` ${pc71.cyan("email workflows validate")} Validate workflow files`
67054
+ ` ${pc72.cyan("email workflows validate")} Validate workflow files`
66824
67055
  );
66825
67056
  console.log(
66826
- ` ${pc71.cyan("email workflows push")} Push workflows to dashboard
67057
+ ` ${pc72.cyan("email workflows push")} Push workflows to dashboard
66827
67058
  `
66828
67059
  );
66829
67060
  console.log("SMS Commands:");
66830
- console.log(` ${pc71.cyan("sms init")} Deploy SMS infrastructure`);
67061
+ console.log(` ${pc72.cyan("sms init")} Deploy SMS infrastructure`);
66831
67062
  console.log(
66832
- ` ${pc71.cyan("sms status")} Show SMS infrastructure details`
67063
+ ` ${pc72.cyan("sms status")} Show SMS infrastructure details`
66833
67064
  );
66834
- console.log(` ${pc71.cyan("sms test")} Send a test SMS message`);
67065
+ console.log(` ${pc72.cyan("sms test")} Send a test SMS message`);
66835
67066
  console.log(
66836
- ` ${pc71.cyan("sms verify-number")} Verify a destination phone number`
67067
+ ` ${pc72.cyan("sms verify-number")} Verify a destination phone number`
66837
67068
  );
66838
67069
  console.log(
66839
- ` ${pc71.cyan("sms sync")} Sync infrastructure (update Lambda, etc.)`
67070
+ ` ${pc72.cyan("sms sync")} Sync infrastructure (update Lambda, etc.)`
66840
67071
  );
66841
- console.log(` ${pc71.cyan("sms upgrade")} Upgrade SMS features`);
66842
- console.log(` ${pc71.cyan("sms register")} Register toll-free number`);
67072
+ console.log(` ${pc72.cyan("sms upgrade")} Upgrade SMS features`);
67073
+ console.log(` ${pc72.cyan("sms register")} Register toll-free number`);
66843
67074
  console.log(
66844
- ` ${pc71.cyan("sms destroy")} Remove SMS infrastructure
67075
+ ` ${pc72.cyan("sms destroy")} Remove SMS infrastructure
66845
67076
  `
66846
67077
  );
66847
67078
  console.log("CDN Commands:");
66848
67079
  console.log(
66849
- ` ${pc71.cyan("cdn init")} Deploy CDN infrastructure (S3 + CloudFront)`
67080
+ ` ${pc72.cyan("cdn init")} Deploy CDN infrastructure (S3 + CloudFront)`
66850
67081
  );
66851
67082
  console.log(
66852
- ` ${pc71.cyan("cdn status")} Show CDN infrastructure details`
67083
+ ` ${pc72.cyan("cdn status")} Show CDN infrastructure details`
66853
67084
  );
66854
67085
  console.log(
66855
- ` ${pc71.cyan("cdn verify")} Check DNS and certificate status`
67086
+ ` ${pc72.cyan("cdn verify")} Check DNS and certificate status`
66856
67087
  );
66857
67088
  console.log(
66858
- ` ${pc71.cyan("cdn upgrade")} Add custom domain after cert validation`
67089
+ ` ${pc72.cyan("cdn upgrade")} Add custom domain after cert validation`
66859
67090
  );
66860
67091
  console.log(
66861
- ` ${pc71.cyan("cdn sync")} Sync infrastructure with current config`
67092
+ ` ${pc72.cyan("cdn sync")} Sync infrastructure with current config`
66862
67093
  );
66863
67094
  console.log(
66864
- ` ${pc71.cyan("cdn destroy")} Remove CDN infrastructure
67095
+ ` ${pc72.cyan("cdn destroy")} Remove CDN infrastructure
66865
67096
  `
66866
67097
  );
66867
67098
  console.log("Self-Hosted Commands:");
66868
67099
  console.log(
66869
- ` ${pc71.cyan("selfhost login")} Sign in to your self-hosted Wraps instance`
67100
+ ` ${pc72.cyan("selfhost login")} Sign in to your self-hosted Wraps instance`
66870
67101
  );
66871
67102
  console.log(
66872
- ` ${pc71.cyan("selfhost logout")} Sign out of your self-hosted Wraps instance`
67103
+ ` ${pc72.cyan("selfhost logout")} Sign out of your self-hosted Wraps instance`
66873
67104
  );
66874
67105
  console.log(
66875
- ` ${pc71.cyan("selfhost status")} Show self-hosted deployment details`
67106
+ ` ${pc72.cyan("selfhost status")} Show self-hosted deployment details`
66876
67107
  );
66877
67108
  console.log(
66878
- ` ${pc71.cyan("selfhost logs")} Stream logs from your self-hosted API, dashboard, and workers`
67109
+ ` ${pc72.cyan("selfhost logs")} Stream logs from your self-hosted API, dashboard, and workers`
66879
67110
  );
66880
67111
  console.log(
66881
- ` ${pc71.cyan("selfhost env")} Print env vars for hosting the dashboard yourself`
67112
+ ` ${pc72.cyan("selfhost env")} Print env vars for hosting the dashboard yourself`
66882
67113
  );
66883
67114
  console.log(
66884
- ` ${pc71.cyan("selfhost connect")} Connect your AWS account to your self-hosted instance`
67115
+ ` ${pc72.cyan("selfhost connect")} Connect your AWS account to your self-hosted instance`
66885
67116
  );
66886
67117
  console.log(
66887
- ` ${pc71.cyan("selfhost update-role")} Refresh your self-hosted console role's permissions
67118
+ ` ${pc72.cyan("selfhost update-role")} Refresh your self-hosted console role's permissions
66888
67119
  `
66889
67120
  );
66890
67121
  console.log("Local Development:");
66891
67122
  console.log(
66892
- ` ${pc71.cyan("console")} Start local web console
67123
+ ` ${pc72.cyan("console")} Start local web console
66893
67124
  `
66894
67125
  );
66895
67126
  console.log("Platform:");
66896
67127
  console.log(
66897
- ` ${pc71.cyan("platform")} Show platform info and pricing`
67128
+ ` ${pc72.cyan("platform")} Show platform info and pricing`
67129
+ );
67130
+ console.log(
67131
+ ` ${pc72.cyan("platform connect")} Connect to Wraps Platform (events + IAM)`
66898
67132
  );
66899
67133
  console.log(
66900
- ` ${pc71.cyan("platform connect")} Connect to Wraps Platform (events + IAM)`
67134
+ ` ${pc72.cyan("platform disconnect")} Stop streaming events to Wraps Platform`
66901
67135
  );
66902
67136
  console.log(
66903
- ` ${pc71.cyan("platform update-role")} Update platform IAM permissions
67137
+ ` ${pc72.cyan("platform update-role")} Update platform IAM permissions
66904
67138
  `
66905
67139
  );
66906
67140
  console.log("Auth:");
66907
67141
  console.log(
66908
- ` ${pc71.cyan("auth login")} Sign in to wraps.dev (device flow)`
67142
+ ` ${pc72.cyan("auth login")} Sign in to wraps.dev (device flow)`
66909
67143
  );
66910
- console.log(` ${pc71.cyan("auth status")} Show current auth state`);
67144
+ console.log(` ${pc72.cyan("auth status")} Show current auth state`);
66911
67145
  console.log(
66912
- ` ${pc71.cyan("auth logout")} Sign out and remove stored token
67146
+ ` ${pc72.cyan("auth logout")} Sign out and remove stored token
66913
67147
  `
66914
67148
  );
66915
67149
  console.log("AWS Setup:");
66916
67150
  console.log(
66917
- ` ${pc71.cyan("aws setup")} Interactive AWS setup wizard`
67151
+ ` ${pc72.cyan("aws setup")} Interactive AWS setup wizard`
66918
67152
  );
66919
67153
  console.log(
66920
- ` ${pc71.cyan("aws doctor")} Diagnose AWS configuration issues
67154
+ ` ${pc72.cyan("aws doctor")} Diagnose AWS configuration issues
66921
67155
  `
66922
67156
  );
66923
67157
  console.log("Global Commands:");
66924
- console.log(` ${pc71.cyan("status")} Show overview of all services`);
67158
+ console.log(` ${pc72.cyan("status")} Show overview of all services`);
66925
67159
  console.log(
66926
- ` ${pc71.cyan("doctor")} Diagnose AWS + email infrastructure`
67160
+ ` ${pc72.cyan("doctor")} Diagnose AWS + email infrastructure`
66927
67161
  );
66928
- console.log(` ${pc71.cyan("destroy")} Remove deployed infrastructure`);
66929
- console.log(` ${pc71.cyan("permissions")} Show required AWS IAM permissions`);
66930
- console.log(` ${pc71.cyan("completion")} Generate shell completion script`);
67162
+ console.log(` ${pc72.cyan("destroy")} Remove deployed infrastructure`);
67163
+ console.log(` ${pc72.cyan("permissions")} Show required AWS IAM permissions`);
67164
+ console.log(` ${pc72.cyan("completion")} Generate shell completion script`);
66931
67165
  console.log(
66932
- ` ${pc71.cyan("telemetry")} Manage anonymous telemetry settings`
67166
+ ` ${pc72.cyan("telemetry")} Manage anonymous telemetry settings`
66933
67167
  );
66934
- console.log(` ${pc71.cyan("update")} Update CLI to latest version`);
66935
- console.log(` ${pc71.cyan("news")} Show recent Wraps updates`);
67168
+ console.log(` ${pc72.cyan("update")} Update CLI to latest version`);
67169
+ console.log(` ${pc72.cyan("news")} Show recent Wraps updates`);
66936
67170
  console.log(
66937
- ` ${pc71.cyan("support")} Get help and support contact info
67171
+ ` ${pc72.cyan("support")} Get help and support contact info
66938
67172
  `
66939
67173
  );
66940
67174
  console.log("Options:");
66941
67175
  console.log(
66942
- ` ${pc71.dim("-p, --provider")} Hosting provider (vercel, aws, railway, other)`
67176
+ ` ${pc72.dim("-p, --provider")} Hosting provider (vercel, aws, railway, other)`
66943
67177
  );
66944
- console.log(` ${pc71.dim("-r, --region")} AWS region`);
66945
- console.log(` ${pc71.dim("-d, --domain")} Domain name`);
66946
- console.log(` ${pc71.dim("--account")} AWS account ID or alias`);
66947
- console.log(` ${pc71.dim("--preset")} Configuration preset`);
66948
- console.log(` ${pc71.dim("--token")} API key or token for auth`);
66949
- console.log(` ${pc71.dim("-y, --yes")} Skip confirmation prompts`);
66950
- console.log(` ${pc71.dim("-f, --force")} Force destructive operations`);
67178
+ console.log(` ${pc72.dim("-r, --region")} AWS region`);
67179
+ console.log(` ${pc72.dim("-d, --domain")} Domain name`);
67180
+ console.log(` ${pc72.dim("--account")} AWS account ID or alias`);
67181
+ console.log(` ${pc72.dim("--preset")} Configuration preset`);
67182
+ console.log(` ${pc72.dim("--token")} API key or token for auth`);
67183
+ console.log(` ${pc72.dim("-y, --yes")} Skip confirmation prompts`);
67184
+ console.log(` ${pc72.dim("-f, --force")} Force destructive operations`);
66951
67185
  console.log(
66952
- ` ${pc71.dim("--preview")} Preview changes without deploying`
67186
+ ` ${pc72.dim("--preview")} Preview changes without deploying`
66953
67187
  );
66954
- console.log(` ${pc71.dim("-v, --version")} Show version number
67188
+ console.log(` ${pc72.dim("-v, --version")} Show version number
66955
67189
  `);
66956
67190
  console.log(
66957
- `Run ${pc71.cyan("wraps <service> <command> --help")} for more information.`
67191
+ `Run ${pc72.cyan("wraps <service> <command> --help")} for more information.`
66958
67192
  );
66959
67193
  console.log(
66960
- `AI agents: complete docs at ${pc71.cyan("https://wraps.dev/llms-full.txt")}
67194
+ `AI agents: complete docs at ${pc72.cyan("https://wraps.dev/llms-full.txt")}
66961
67195
  `
66962
67196
  );
66963
67197
  }
@@ -66979,25 +67213,25 @@ if (!primaryCommand) {
66979
67213
  const telemetry = getTelemetryClient();
66980
67214
  if (!isJsonMode() && telemetry.shouldShowNotification()) {
66981
67215
  console.log();
66982
- clack66.log.info(pc71.bold("Anonymous Telemetry"));
67216
+ clack66.log.info(pc72.bold("Anonymous Telemetry"));
66983
67217
  console.log(
66984
- ` Wraps collects ${pc71.cyan("anonymous usage data")} to improve the CLI.`
67218
+ ` Wraps collects ${pc72.cyan("anonymous usage data")} to improve the CLI.`
66985
67219
  );
66986
67220
  console.log(
66987
- ` We ${pc71.bold("never")} collect: domains, AWS credentials, email content, or PII.`
67221
+ ` We ${pc72.bold("never")} collect: domains, AWS credentials, email content, or PII.`
66988
67222
  );
66989
67223
  console.log(
66990
- ` We ${pc71.bold("only")} collect: command names, success/failure, CLI version, OS.`
67224
+ ` We ${pc72.bold("only")} collect: command names, success/failure, CLI version, OS.`
66991
67225
  );
66992
67226
  console.log();
66993
- console.log(` Opt-out anytime: ${pc71.cyan("wraps telemetry disable")}`);
66994
- console.log(` Or set: ${pc71.cyan("WRAPS_TELEMETRY_DISABLED=1")}`);
66995
- console.log(` Learn more: ${pc71.cyan("https://wraps.dev/docs")}`);
67227
+ console.log(` Opt-out anytime: ${pc72.cyan("wraps telemetry disable")}`);
67228
+ console.log(` Or set: ${pc72.cyan("WRAPS_TELEMETRY_DISABLED=1")}`);
67229
+ console.log(` Learn more: ${pc72.cyan("https://wraps.dev/docs")}`);
66996
67230
  console.log();
66997
67231
  telemetry.markNotificationShown();
66998
67232
  }
66999
67233
  trackCommand("interactive:menu", { success: true, duration_ms: 0 });
67000
- clack66.intro(pc71.bold(`WRAPS CLI v${VERSION}`));
67234
+ clack66.intro(pc72.bold(`WRAPS CLI v${VERSION}`));
67001
67235
  console.log(" Deploy AWS infrastructure to your account.\n");
67002
67236
  const action = await clack66.select({
67003
67237
  message: "What would you like to do?",
@@ -67136,20 +67370,20 @@ async function run() {
67136
67370
  const telemetry = getTelemetryClient();
67137
67371
  if (!isJsonMode() && telemetry.shouldShowNotification()) {
67138
67372
  console.log();
67139
- clack66.log.info(pc71.bold("Anonymous Telemetry"));
67373
+ clack66.log.info(pc72.bold("Anonymous Telemetry"));
67140
67374
  console.log(
67141
- ` Wraps collects ${pc71.cyan("anonymous usage data")} to improve the CLI.`
67375
+ ` Wraps collects ${pc72.cyan("anonymous usage data")} to improve the CLI.`
67142
67376
  );
67143
67377
  console.log(
67144
- ` We ${pc71.bold("never")} collect: domains, AWS credentials, email content, or PII.`
67378
+ ` We ${pc72.bold("never")} collect: domains, AWS credentials, email content, or PII.`
67145
67379
  );
67146
67380
  console.log(
67147
- ` We ${pc71.bold("only")} collect: command names, success/failure, CLI version, OS.`
67381
+ ` We ${pc72.bold("only")} collect: command names, success/failure, CLI version, OS.`
67148
67382
  );
67149
67383
  console.log();
67150
- console.log(` Opt-out anytime: ${pc71.cyan("wraps telemetry disable")}`);
67151
- console.log(` Or set: ${pc71.cyan("WRAPS_TELEMETRY_DISABLED=1")}`);
67152
- console.log(` Learn more: ${pc71.cyan("https://wraps.dev/docs")}`);
67384
+ console.log(` Opt-out anytime: ${pc72.cyan("wraps telemetry disable")}`);
67385
+ console.log(` Or set: ${pc72.cyan("WRAPS_TELEMETRY_DISABLED=1")}`);
67386
+ console.log(` Learn more: ${pc72.cyan("https://wraps.dev/docs")}`);
67153
67387
  console.log();
67154
67388
  telemetry.markNotificationShown();
67155
67389
  }
@@ -67919,6 +68153,14 @@ async function run() {
67919
68153
  json: flags.json
67920
68154
  });
67921
68155
  break;
68156
+ case "disconnect":
68157
+ await disconnect({
68158
+ region: flags.region,
68159
+ force: flags.force,
68160
+ yes: flags.yes,
68161
+ json: flags.json
68162
+ });
68163
+ break;
67922
68164
  case "update-role":
67923
68165
  await updateRole({
67924
68166
  region: flags.region,
@@ -67930,7 +68172,7 @@ async function run() {
67930
68172
  throw errors.unknownCommand(
67931
68173
  "platform command",
67932
68174
  subCommand,
67933
- "Available commands: connect, update-role\n\nRun wraps platform for more information."
68175
+ "Available commands: connect, disconnect, update-role\n\nRun wraps platform for more information."
67934
68176
  );
67935
68177
  }
67936
68178
  const platformDuration = Date.now() - startTime;