@wraps.dev/cli 2.14.4 → 2.14.6

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
@@ -8703,11 +8703,11 @@ var init_dynamodb_metrics = __esm({
8703
8703
  // src/cli.ts
8704
8704
  init_esm_shims();
8705
8705
  import { readFileSync as readFileSync3 } from "fs";
8706
- import { dirname as dirname3, join as join20 } from "path";
8706
+ import { dirname as dirname3, join as join19 } from "path";
8707
8707
  import { fileURLToPath as fileURLToPath5 } from "url";
8708
8708
  import * as clack50 from "@clack/prompts";
8709
8709
  import args from "args";
8710
- import pc54 from "picocolors";
8710
+ import pc53 from "picocolors";
8711
8711
 
8712
8712
  // src/commands/auth/login.ts
8713
8713
  init_esm_shims();
@@ -22214,7 +22214,7 @@ function renderViewerPage(compiled, allSlugs) {
22214
22214
  try {
22215
22215
  const doc = iframe.contentDocument || iframe.contentWindow.document;
22216
22216
  iframe.style.height = doc.documentElement.scrollHeight + 'px';
22217
- } catch {} // guardrails:allow-no-swallowed-errors \u2014 cross-origin iframe resize
22217
+ } catch {} // baseline:allow-no-swallowed-errors \u2014 cross-origin iframe resize
22218
22218
  }
22219
22219
  iframe.addEventListener('load', resizeIframe);
22220
22220
 
@@ -22225,7 +22225,7 @@ function renderViewerPage(compiled, allSlugs) {
22225
22225
  const data = JSON.parse(e.data);
22226
22226
  // Reload iframe (and toolbar metadata by reloading the page)
22227
22227
  iframe.src = '/${compiled.slug}/render?t=' + Date.now();
22228
- } catch { // guardrails:allow-no-swallowed-errors \u2014 SSE parse error is expected
22228
+ } catch { // baseline:allow-no-swallowed-errors \u2014 SSE parse error is expected
22229
22229
  // "connected" message or parse error \u2014 ignore
22230
22230
  }
22231
22231
  };
@@ -24720,349 +24720,16 @@ ${pc30.green("\u2713")} ${pc30.bold("Upgrade complete!")}
24720
24720
  });
24721
24721
  }
24722
24722
 
24723
- // src/commands/email/workflows/generate.ts
24724
- init_esm_shims();
24725
- init_events();
24726
- init_json_output();
24727
- import { existsSync as existsSync13, mkdirSync as mkdirSync2, writeFileSync } from "fs";
24728
- import { join as join14 } from "path";
24729
- import { intro as intro27, log as log29 } from "@clack/prompts";
24730
- import pc31 from "picocolors";
24731
- var TEMPLATES = {
24732
- welcome: `import {
24733
- defineWorkflow,
24734
- sendEmail,
24735
- delay,
24736
- condition,
24737
- exit,
24738
- } from '@wraps.dev/client';
24739
-
24740
- /**
24741
- * Welcome Sequence
24742
- *
24743
- * Send a welcome email when a contact is created,
24744
- * wait 1 day, then check if they activated.
24745
- * If not, send a follow-up with tips.
24746
- */
24747
- export default defineWorkflow({
24748
- name: 'Welcome Sequence',
24749
- trigger: {
24750
- type: 'contact_created',
24751
- },
24752
-
24753
- steps: [
24754
- sendEmail('send-welcome', { template: 'welcome-email' }),
24755
- delay('wait-1-day', { days: 1 }),
24756
- condition('check-activated', {
24757
- field: 'contact.hasActivated',
24758
- operator: 'equals',
24759
- value: true,
24760
- branches: {
24761
- yes: [exit('already-active')],
24762
- no: [
24763
- sendEmail('send-tips', { template: 'getting-started-tips' }),
24764
- ],
24765
- },
24766
- }),
24767
- ],
24768
- });
24769
- `,
24770
- "cart-recovery": `import {
24771
- defineWorkflow,
24772
- sendEmail,
24773
- sendSms,
24774
- delay,
24775
- cascade,
24776
- exit,
24777
- } from '@wraps.dev/client';
24778
-
24779
- /**
24780
- * Cart Recovery Cascade
24781
- *
24782
- * When a cart is abandoned, wait 30 minutes, then try
24783
- * email first. If not opened after 2 hours, fall back to SMS.
24784
- */
24785
- export default defineWorkflow({
24786
- name: 'Cart Recovery Cascade',
24787
- trigger: {
24788
- type: 'event',
24789
- eventName: 'cart.abandoned',
24790
- },
24791
-
24792
- steps: [
24793
- delay('initial-wait', { minutes: 30 }),
24794
-
24795
- ...cascade('recover-cart', {
24796
- channels: [
24797
- {
24798
- type: 'email',
24799
- template: 'cart-recovery',
24800
- waitFor: { hours: 2 },
24801
- engagement: 'opened',
24802
- },
24803
- {
24804
- type: 'sms',
24805
- template: 'cart-sms-reminder',
24806
- },
24807
- ],
24808
- }),
24809
-
24810
- exit('cascade-complete'),
24811
- ],
24812
- });
24813
- `,
24814
- "trial-conversion": `import {
24815
- defineWorkflow,
24816
- sendEmail,
24817
- delay,
24818
- condition,
24819
- exit,
24820
- } from '@wraps.dev/client';
24821
-
24822
- /**
24823
- * Trial Conversion
24824
- *
24825
- * Remind users 3 days before their trial ends.
24826
- * If they haven't upgraded after 1 day, send a final nudge.
24827
- */
24828
- export default defineWorkflow({
24829
- name: 'Trial Conversion',
24830
- trigger: {
24831
- type: 'event',
24832
- eventName: 'trial.ending',
24833
- },
24834
-
24835
- steps: [
24836
- sendEmail('send-reminder', { template: 'trial-ending-reminder' }),
24837
- delay('wait-1-day', { days: 1 }),
24838
- condition('check-upgraded', {
24839
- field: 'contact.plan',
24840
- operator: 'not_equals',
24841
- value: 'free',
24842
- branches: {
24843
- yes: [exit('already-upgraded')],
24844
- no: [
24845
- sendEmail('send-upgrade-nudge', { template: 'upgrade-offer' }),
24846
- ],
24847
- },
24848
- }),
24849
- ],
24850
- });
24851
- `,
24852
- "re-engagement": `import {
24853
- defineWorkflow,
24854
- sendEmail,
24855
- delay,
24856
- condition,
24857
- exit,
24858
- } from '@wraps.dev/client';
24859
-
24860
- /**
24861
- * Re-engagement Campaign
24862
- *
24863
- * Win back inactive users with a personalized email.
24864
- * Wait 3 days for engagement, then send a final offer.
24865
- */
24866
- export default defineWorkflow({
24867
- name: 'Re-engagement Campaign',
24868
- trigger: {
24869
- type: 'event',
24870
- eventName: 'contact.inactive',
24871
- },
24872
-
24873
- steps: [
24874
- sendEmail('send-win-back', { template: 'we-miss-you' }),
24875
- delay('wait-3-days', { days: 3 }),
24876
- condition('check-engaged', {
24877
- field: 'contact.lastActiveAt',
24878
- operator: 'is_set',
24879
- value: true,
24880
- branches: {
24881
- yes: [exit('re-engaged')],
24882
- no: [
24883
- sendEmail('send-final-offer', { template: 'final-offer' }),
24884
- ],
24885
- },
24886
- }),
24887
- ],
24888
- });
24889
- `,
24890
- onboarding: `import {
24891
- defineWorkflow,
24892
- sendEmail,
24893
- delay,
24894
- condition,
24895
- exit,
24896
- } from '@wraps.dev/client';
24897
-
24898
- /**
24899
- * Multi-step Onboarding
24900
- *
24901
- * Guide new users through setup with a series of emails.
24902
- * Check progress at each step and skip ahead if they're done.
24903
- */
24904
- export default defineWorkflow({
24905
- name: 'Onboarding Sequence',
24906
- trigger: {
24907
- type: 'contact_created',
24908
- },
24909
-
24910
- steps: [
24911
- sendEmail('send-welcome', { template: 'onboarding-welcome' }),
24912
- delay('wait-1-day', { days: 1 }),
24913
-
24914
- condition('check-profile-complete', {
24915
- field: 'contact.profileComplete',
24916
- operator: 'equals',
24917
- value: true,
24918
- branches: {
24919
- yes: [
24920
- sendEmail('send-next-steps', { template: 'onboarding-next-steps' }),
24921
- ],
24922
- no: [
24923
- sendEmail('send-profile-reminder', { template: 'complete-your-profile' }),
24924
- delay('wait-2-days', { days: 2 }),
24925
- sendEmail('send-next-steps-delayed', { template: 'onboarding-next-steps' }),
24926
- ],
24927
- },
24928
- }),
24929
-
24930
- delay('wait-3-days', { days: 3 }),
24931
-
24932
- condition('check-first-action', {
24933
- field: 'contact.hasCompletedFirstAction',
24934
- operator: 'equals',
24935
- value: true,
24936
- branches: {
24937
- yes: [exit('onboarding-complete')],
24938
- no: [
24939
- sendEmail('send-help', { template: 'need-help' }),
24940
- ],
24941
- },
24942
- }),
24943
- ],
24944
- });
24945
- `
24946
- };
24947
- var TEMPLATE_NAMES = Object.keys(TEMPLATES);
24948
- async function workflowsGenerate(options) {
24949
- const startTime = Date.now();
24950
- if (options.template) {
24951
- generateFromTemplate(options);
24952
- } else {
24953
- showUsage();
24954
- return;
24955
- }
24956
- trackCommand("email:workflows:generate", {
24957
- success: true,
24958
- duration_ms: Date.now() - startTime,
24959
- mode: "template"
24960
- });
24961
- }
24962
- function showUsage() {
24963
- if (isJsonMode()) {
24964
- jsonError("email.workflows.generate", {
24965
- code: "MISSING_INPUT",
24966
- message: "Provide a --template name to generate a workflow"
24967
- });
24968
- return;
24969
- }
24970
- log29.error("Provide a --template to generate a workflow.");
24971
- console.log();
24972
- console.log(` ${pc31.bold("Usage:")}`);
24973
- console.log(
24974
- ` ${pc31.cyan("wraps email workflows generate --template welcome")}`
24975
- );
24976
- console.log();
24977
- console.log(
24978
- ` ${pc31.bold("Available templates:")} ${TEMPLATE_NAMES.join(", ")}`
24979
- );
24980
- console.log();
24981
- console.log(` ${pc31.bold("Want a custom workflow?")}`);
24982
- console.log(
24983
- " Describe what you need to your AI coding assistant (Claude Code, Cursor, etc.)"
24984
- );
24985
- console.log(
24986
- ` and it will generate a workflow file using the ${pc31.cyan("@wraps.dev/client")} DSL.`
24987
- );
24988
- console.log();
24989
- }
24990
- function generateFromTemplate(options) {
24991
- const templateName = options.template ?? "";
24992
- const templateCode = TEMPLATES[templateName];
24993
- if (!templateCode) {
24994
- if (isJsonMode()) {
24995
- jsonError("email.workflows.generate", {
24996
- code: "UNKNOWN_TEMPLATE",
24997
- message: `Unknown template: ${templateName}. Available: ${TEMPLATE_NAMES.join(", ")}`
24998
- });
24999
- } else {
25000
- log29.error(`Unknown template: ${pc31.red(templateName)}`);
25001
- console.log(
25002
- `
25003
- Available templates: ${TEMPLATE_NAMES.map((t) => pc31.cyan(t)).join(", ")}
25004
- `
25005
- );
25006
- }
25007
- return;
25008
- }
25009
- const slug = options.name || templateName;
25010
- const cwd = process.cwd();
25011
- const workflowsDir = join14(cwd, "wraps", "workflows");
25012
- const filePath = join14(workflowsDir, `${slug}.ts`);
25013
- if (existsSync13(filePath) && !options.force) {
25014
- if (isJsonMode()) {
25015
- jsonError("email.workflows.generate", {
25016
- code: "FILE_EXISTS",
25017
- message: `wraps/workflows/${slug}.ts already exists. Use --force to overwrite.`
25018
- });
25019
- } else {
25020
- log29.error(
25021
- `${pc31.cyan(`wraps/workflows/${slug}.ts`)} already exists. Use ${pc31.bold("--force")} to overwrite.`
25022
- );
25023
- }
25024
- return;
25025
- }
25026
- mkdirSync2(workflowsDir, { recursive: true });
25027
- writeFileSync(filePath, templateCode, "utf-8");
25028
- if (isJsonMode()) {
25029
- jsonSuccess("email.workflows.generate", {
25030
- mode: "template",
25031
- template: templateName,
25032
- slug,
25033
- path: `wraps/workflows/${slug}.ts`
25034
- });
25035
- } else {
25036
- intro27(pc31.bold("Generate Workflow"));
25037
- log29.success(
25038
- `Created ${pc31.cyan(`wraps/workflows/${slug}.ts`)} from ${pc31.bold(templateName)} template`
25039
- );
25040
- showNextSteps2(slug);
25041
- }
25042
- }
25043
- function showNextSteps2(slug) {
25044
- console.log();
25045
- console.log(` ${pc31.bold("Next steps:")}`);
25046
- console.log(
25047
- ` 1. Edit template references in ${pc31.cyan(`wraps/workflows/${slug}.ts`)}`
25048
- );
25049
- console.log(
25050
- ` 2. Validate: ${pc31.cyan(`wraps email workflows validate --workflow ${slug}`)}`
25051
- );
25052
- console.log(` 3. Push: ${pc31.cyan("wraps email workflows push")}`);
25053
- console.log();
25054
- }
25055
-
25056
24723
  // src/commands/email/workflows/init.ts
25057
24724
  init_esm_shims();
25058
24725
  init_events();
25059
24726
  init_json_output();
25060
24727
  init_output();
25061
- import { existsSync as existsSync14 } from "fs";
24728
+ import { existsSync as existsSync13 } from "fs";
25062
24729
  import { mkdir as mkdir7, readFile as readFile7, writeFile as writeFile9 } from "fs/promises";
25063
- import { join as join15 } from "path";
24730
+ import { join as join14 } from "path";
25064
24731
  import * as clack30 from "@clack/prompts";
25065
- import pc32 from "picocolors";
24732
+ import pc31 from "picocolors";
25066
24733
 
25067
24734
  // src/commands/email/workflows/claude-content.ts
25068
24735
  init_esm_shims();
@@ -25075,8 +24742,6 @@ Workflow automation files live at \`wraps/workflows/*.ts\` and are written using
25075
24742
 
25076
24743
  - \`wraps email workflows validate\` \u2014 Validate workflow files locally
25077
24744
  - \`wraps email workflows push\` \u2014 Push workflows to the Wraps dashboard
25078
- - \`wraps email workflows generate --template <name>\` \u2014 Generate from a built-in template
25079
- - \`wraps email workflows generate "description"\` \u2014 Generate from a natural language description
25080
24745
 
25081
24746
  ### Quick Reference
25082
24747
 
@@ -25408,8 +25073,6 @@ export default defineWorkflow({
25408
25073
  wraps email workflows validate # Validate all workflow files
25409
25074
  wraps email workflows validate --workflow welcome # Validate a specific workflow
25410
25075
  wraps email workflows push # Push workflows to dashboard
25411
- wraps email workflows generate --template welcome # Generate from built-in template
25412
- wraps email workflows generate "description..." # Generate from AI description
25413
25076
  \`\`\`
25414
25077
  `;
25415
25078
 
@@ -25455,12 +25118,12 @@ export default defineWorkflow({
25455
25118
  async function workflowsInit(options) {
25456
25119
  const startTime = Date.now();
25457
25120
  const cwd = process.cwd();
25458
- const workflowsDir = join15(cwd, "wraps", "workflows");
25121
+ const workflowsDir = join14(cwd, "wraps", "workflows");
25459
25122
  if (!isJsonMode()) {
25460
- clack30.intro(pc32.bold("Workflows as Code"));
25123
+ clack30.intro(pc31.bold("Workflows as Code"));
25461
25124
  }
25462
25125
  const progress = new DeploymentProgress();
25463
- if (existsSync14(workflowsDir) && !options.force) {
25126
+ if (existsSync13(workflowsDir) && !options.force) {
25464
25127
  const { readdir: readdir4 } = await import("fs/promises");
25465
25128
  const files = await readdir4(workflowsDir);
25466
25129
  const tsFiles = files.filter(
@@ -25468,14 +25131,14 @@ async function workflowsInit(options) {
25468
25131
  );
25469
25132
  if (tsFiles.length > 0 && !options.force && !isJsonMode()) {
25470
25133
  clack30.log.warn(
25471
- `${pc32.cyan("wraps/workflows/")} already contains ${tsFiles.length} workflow file(s). Use ${pc32.bold("--force")} to overwrite.`
25134
+ `${pc31.cyan("wraps/workflows/")} already contains ${tsFiles.length} workflow file(s). Use ${pc31.bold("--force")} to overwrite.`
25472
25135
  );
25473
25136
  }
25474
25137
  }
25475
25138
  progress.start("Creating wraps/workflows/ directory");
25476
25139
  await mkdir7(workflowsDir, { recursive: true });
25477
- const configPath = join15(cwd, "wraps", "wraps.config.ts");
25478
- if (existsSync14(configPath)) {
25140
+ const configPath = join14(cwd, "wraps", "wraps.config.ts");
25141
+ if (existsSync13(configPath)) {
25479
25142
  const configContent = await readFile7(configPath, "utf-8");
25480
25143
  if (!configContent.includes("workflowsDir")) {
25481
25144
  const updated = configContent.replace(
@@ -25492,8 +25155,8 @@ async function workflowsInit(options) {
25492
25155
  }
25493
25156
  const filesCreated = [];
25494
25157
  if (!options.noExample) {
25495
- const examplePath = join15(workflowsDir, "welcome.ts");
25496
- if (!existsSync14(examplePath) || options.force) {
25158
+ const examplePath = join14(workflowsDir, "welcome.ts");
25159
+ if (!existsSync13(examplePath) || options.force) {
25497
25160
  await writeFile9(examplePath, EXAMPLE_WORKFLOW, "utf-8");
25498
25161
  filesCreated.push("wraps/workflows/welcome.ts");
25499
25162
  }
@@ -25534,26 +25197,26 @@ async function workflowsInit(options) {
25534
25197
  return;
25535
25198
  }
25536
25199
  console.log();
25537
- clack30.log.success(pc32.green("Workflows as Code initialized!"));
25200
+ clack30.log.success(pc31.green("Workflows as Code initialized!"));
25538
25201
  console.log();
25539
- console.log(` ${pc32.dim("Directory:")} ${pc32.cyan("wraps/workflows/")}`);
25202
+ console.log(` ${pc31.dim("Directory:")} ${pc31.cyan("wraps/workflows/")}`);
25540
25203
  if (!options.noExample) {
25541
25204
  console.log(
25542
- ` ${pc32.dim("Example:")} ${pc32.cyan("wraps/workflows/welcome.ts")}`
25205
+ ` ${pc31.dim("Example:")} ${pc31.cyan("wraps/workflows/welcome.ts")}`
25543
25206
  );
25544
25207
  }
25545
25208
  if (!options.noClaude) {
25546
25209
  console.log(
25547
- ` ${pc32.dim("AI Context:")} ${pc32.cyan(".claude/skills/wraps-workflows/")}`
25210
+ ` ${pc31.dim("AI Context:")} ${pc31.cyan(".claude/skills/wraps-workflows/")}`
25548
25211
  );
25549
25212
  }
25550
25213
  console.log();
25551
- console.log(`${pc32.bold("Next steps:")}`);
25214
+ console.log(`${pc31.bold("Next steps:")}`);
25552
25215
  console.log(
25553
- ` 1. Edit or create workflows in ${pc32.cyan("wraps/workflows/")}`
25216
+ ` 1. Edit or create workflows in ${pc31.cyan("wraps/workflows/")}`
25554
25217
  );
25555
- console.log(` 2. Validate: ${pc32.cyan("wraps email workflows validate")}`);
25556
- console.log(` 3. Push: ${pc32.cyan("wraps email workflows push")}`);
25218
+ console.log(` 2. Validate: ${pc31.cyan("wraps email workflows validate")}`);
25219
+ console.log(` 3. Push: ${pc31.cyan("wraps email workflows push")}`);
25557
25220
  if (!options.noClaude) {
25558
25221
  console.log(" 4. Use Claude Code to generate workflows from descriptions");
25559
25222
  }
@@ -25575,10 +25238,10 @@ export default defineConfig({
25575
25238
  // src/commands/email/workflows/push.ts
25576
25239
  init_esm_shims();
25577
25240
  init_events();
25578
- import { existsSync as existsSync16 } from "fs";
25579
- import { join as join17 } from "path";
25241
+ import { existsSync as existsSync15 } from "fs";
25242
+ import { join as join16 } from "path";
25580
25243
  import * as clack31 from "@clack/prompts";
25581
- import pc33 from "picocolors";
25244
+ import pc32 from "picocolors";
25582
25245
 
25583
25246
  // src/utils/email/workflow-transform.ts
25584
25247
  init_esm_shims();
@@ -25795,11 +25458,11 @@ function assignPositions(steps, transitions) {
25795
25458
  // src/utils/email/workflow-ts.ts
25796
25459
  init_esm_shims();
25797
25460
  import { createHash as createHash2 } from "crypto";
25798
- import { existsSync as existsSync15 } from "fs";
25461
+ import { existsSync as existsSync14 } from "fs";
25799
25462
  import { mkdir as mkdir8, readdir as readdir3, readFile as readFile8, writeFile as writeFile10 } from "fs/promises";
25800
- import { basename, join as join16 } from "path";
25463
+ import { basename, join as join15 } from "path";
25801
25464
  async function discoverWorkflows(dir, filter) {
25802
- if (!existsSync15(dir)) {
25465
+ if (!existsSync14(dir)) {
25803
25466
  return [];
25804
25467
  }
25805
25468
  const entries = await readdir3(dir);
@@ -25822,7 +25485,7 @@ async function parseWorkflowTs(filePath, wrapsDir) {
25822
25485
  const source = await readFile8(filePath, "utf-8");
25823
25486
  const sourceHash = createHash2("sha256").update(source).digest("hex");
25824
25487
  const slug = basename(filePath, ".ts");
25825
- const shimDir = join16(wrapsDir, ".wraps", "_shims");
25488
+ const shimDir = join15(wrapsDir, ".wraps", "_shims");
25826
25489
  await mkdir8(shimDir, { recursive: true });
25827
25490
  const clientShimContent = `
25828
25491
  // Identity functions for workflow definitions
@@ -26051,7 +25714,7 @@ function durationToSeconds(duration) {
26051
25714
  }
26052
25715
  `;
26053
25716
  await writeFile10(
26054
- join16(shimDir, "wraps-client-shim.mjs"),
25717
+ join15(shimDir, "wraps-client-shim.mjs"),
26055
25718
  clientShimContent,
26056
25719
  "utf-8"
26057
25720
  );
@@ -26063,13 +25726,13 @@ function durationToSeconds(duration) {
26063
25726
  platform: "node",
26064
25727
  target: "node20",
26065
25728
  alias: {
26066
- "@wraps.dev/client": join16(shimDir, "wraps-client-shim.mjs")
25729
+ "@wraps.dev/client": join15(shimDir, "wraps-client-shim.mjs")
26067
25730
  }
26068
25731
  });
26069
25732
  const bundledCode = result.outputFiles[0].text;
26070
- const tmpDir = join16(wrapsDir, ".wraps", "_workflows");
25733
+ const tmpDir = join15(wrapsDir, ".wraps", "_workflows");
26071
25734
  await mkdir8(tmpDir, { recursive: true });
26072
- const tmpPath = join16(tmpDir, `${slug}.mjs`);
25735
+ const tmpPath = join15(tmpDir, `${slug}.mjs`);
26073
25736
  await writeFile10(tmpPath, bundledCode, "utf-8");
26074
25737
  const mod = await import(`${tmpPath}?t=${Date.now()}`);
26075
25738
  const definition = mod.default;
@@ -26422,20 +26085,20 @@ init_output();
26422
26085
  async function workflowsPush(options) {
26423
26086
  const startTime = Date.now();
26424
26087
  const cwd = process.cwd();
26425
- const wrapsDir = join17(cwd, "wraps");
26426
- const configPath = join17(wrapsDir, "wraps.config.ts");
26427
- if (!existsSync16(configPath)) {
26088
+ const wrapsDir = join16(cwd, "wraps");
26089
+ const configPath = join16(wrapsDir, "wraps.config.ts");
26090
+ if (!existsSync15(configPath)) {
26428
26091
  throw errors.wrapsConfigNotFound();
26429
26092
  }
26430
26093
  if (!isJsonMode()) {
26431
- clack31.intro(pc33.bold("Push Workflows"));
26094
+ clack31.intro(pc32.bold("Push Workflows"));
26432
26095
  }
26433
26096
  const progress = new DeploymentProgress();
26434
26097
  progress.start("Loading configuration");
26435
26098
  const config2 = await loadWrapsConfig(wrapsDir);
26436
26099
  progress.succeed("Configuration loaded");
26437
- const workflowsDir = join17(wrapsDir, config2.workflowsDir || "./workflows");
26438
- if (!existsSync16(workflowsDir)) {
26100
+ const workflowsDir = join16(wrapsDir, config2.workflowsDir || "./workflows");
26101
+ if (!existsSync15(workflowsDir)) {
26439
26102
  if (isJsonMode()) {
26440
26103
  jsonSuccess("email.workflows.push", {
26441
26104
  pushed: [],
@@ -26461,9 +26124,9 @@ async function workflowsPush(options) {
26461
26124
  return;
26462
26125
  }
26463
26126
  const lockfile = await loadLockfile(wrapsDir);
26464
- const templatesDir = join17(wrapsDir, config2.templatesDir || "./templates");
26127
+ const templatesDir = join16(wrapsDir, config2.templatesDir || "./templates");
26465
26128
  let localTemplateSlugs;
26466
- if (existsSync16(templatesDir)) {
26129
+ if (existsSync15(templatesDir)) {
26467
26130
  const templateFiles = await discoverTemplates(templatesDir);
26468
26131
  localTemplateSlugs = new Set(
26469
26132
  templateFiles.map((f) => f.replace(/\.tsx?$/, ""))
@@ -26475,14 +26138,14 @@ async function workflowsPush(options) {
26475
26138
  const validationErrors = [];
26476
26139
  for (const file of workflowFiles) {
26477
26140
  const slug = file.replace(/\.ts$/, "");
26478
- const filePath = join17(workflowsDir, file);
26479
- progress.start(`Processing ${pc33.cyan(slug)}`);
26141
+ const filePath = join16(workflowsDir, file);
26142
+ progress.start(`Processing ${pc32.cyan(slug)}`);
26480
26143
  try {
26481
26144
  const parsed = await parseWorkflowTs(filePath, wrapsDir);
26482
26145
  const localHashMatches = lockfile.workflows?.[slug]?.localHash === parsed.sourceHash;
26483
26146
  if (!options.force && localHashMatches) {
26484
26147
  unchanged.push(slug);
26485
- progress.succeed(`${pc33.cyan(slug)} unchanged`);
26148
+ progress.succeed(`${pc32.cyan(slug)} unchanged`);
26486
26149
  continue;
26487
26150
  }
26488
26151
  const transformed = transformWorkflow(parsed.definition);
@@ -26499,15 +26162,15 @@ async function workflowsPush(options) {
26499
26162
  message: e.message
26500
26163
  }))
26501
26164
  });
26502
- progress.fail(`${pc33.cyan(slug)} has validation errors`);
26165
+ progress.fail(`${pc32.cyan(slug)} has validation errors`);
26503
26166
  continue;
26504
26167
  }
26505
26168
  toProcess.push({ slug, parsed, transformed });
26506
- progress.succeed(`${pc33.cyan(slug)} validated`);
26169
+ progress.succeed(`${pc32.cyan(slug)} validated`);
26507
26170
  } catch (err) {
26508
26171
  const errMsg = err instanceof Error ? err.message : String(err);
26509
26172
  parseErrors.push({ slug, error: errMsg });
26510
- progress.fail(`Failed to parse ${pc33.cyan(slug)}: ${errMsg}`);
26173
+ progress.fail(`Failed to parse ${pc32.cyan(slug)}: ${errMsg}`);
26511
26174
  }
26512
26175
  }
26513
26176
  if (validationErrors.length > 0 || parseErrors.length > 0) {
@@ -26526,7 +26189,7 @@ async function workflowsPush(options) {
26526
26189
  } else {
26527
26190
  console.log();
26528
26191
  clack31.log.error(
26529
- pc33.red("Cannot push due to validation errors. Fix errors and retry.")
26192
+ pc32.red("Cannot push due to validation errors. Fix errors and retry.")
26530
26193
  );
26531
26194
  console.log();
26532
26195
  }
@@ -26561,22 +26224,25 @@ async function workflowsPush(options) {
26561
26224
  });
26562
26225
  } else {
26563
26226
  console.log();
26564
- clack31.log.info(pc33.bold("Dry run \u2014 no changes made"));
26227
+ clack31.log.info(pc32.bold("Dry run \u2014 no changes made"));
26565
26228
  console.log();
26566
26229
  for (const w of toProcess) {
26567
26230
  console.log(
26568
- ` ${pc33.green("\u25CF")} ${pc33.cyan(w.slug)} \u2014 ${w.parsed.definition.name} (${w.transformed.steps.length} steps)`
26231
+ ` ${pc32.green("\u25CF")} ${pc32.cyan(w.slug)} \u2014 ${w.parsed.definition.name} (${w.transformed.steps.length} steps)`
26569
26232
  );
26570
26233
  }
26571
26234
  for (const slug of unchanged) {
26572
- console.log(` ${pc33.dim("\u25CB")} ${pc33.dim(slug)} \u2014 unchanged`);
26235
+ console.log(` ${pc32.dim("\u25CB")} ${pc32.dim(slug)} \u2014 unchanged`);
26573
26236
  }
26574
26237
  console.log();
26575
26238
  }
26576
26239
  return;
26577
26240
  }
26578
26241
  const token = await resolveTokenAsync({ token: options.token });
26579
- const apiResults = await pushToAPI2(toProcess, token, progress, options.force);
26242
+ const apiResults = await pushToAPI2(toProcess, token, progress, {
26243
+ force: options.force,
26244
+ draft: options.draft
26245
+ });
26580
26246
  for (const w of toProcess) {
26581
26247
  const apiResult = apiResults.find((r) => r.slug === w.slug);
26582
26248
  if (apiResult?.success) {
@@ -26593,12 +26259,15 @@ async function workflowsPush(options) {
26593
26259
  await saveLockfile(wrapsDir, lockfile);
26594
26260
  const pushed = apiResults.filter((r) => r.success);
26595
26261
  const conflicts = apiResults.filter((r) => r.conflict);
26262
+ const drafts = pushed.filter((r) => r.status === "draft");
26263
+ const enabled = pushed.filter((r) => r.status !== "draft");
26596
26264
  if (isJsonMode()) {
26597
26265
  if (conflicts.length === 0) {
26598
26266
  jsonSuccess("email.workflows.push", {
26599
26267
  pushed: pushed.map((r) => ({
26600
26268
  slug: r.slug,
26601
- id: r.id
26269
+ id: r.id,
26270
+ status: r.status
26602
26271
  })),
26603
26272
  unchanged,
26604
26273
  conflicts: []
@@ -26611,9 +26280,14 @@ async function workflowsPush(options) {
26611
26280
  }
26612
26281
  } else {
26613
26282
  console.log();
26614
- if (pushed.length > 0) {
26283
+ if (enabled.length > 0) {
26615
26284
  clack31.log.success(
26616
- pc33.green(`${pushed.length} workflow(s) pushed successfully`)
26285
+ pc32.green(`${enabled.length} workflow(s) pushed and enabled`)
26286
+ );
26287
+ }
26288
+ if (drafts.length > 0) {
26289
+ clack31.log.success(
26290
+ pc32.green(`${drafts.length} workflow(s) pushed as draft`)
26617
26291
  );
26618
26292
  }
26619
26293
  if (unchanged.length > 0) {
@@ -26624,7 +26298,7 @@ async function workflowsPush(options) {
26624
26298
  `${conflicts.length} workflow(s) skipped due to dashboard edits. Use --force to overwrite.`
26625
26299
  );
26626
26300
  for (const c of conflicts) {
26627
- console.log(` ${pc33.yellow("!")} ${pc33.cyan(c.slug)}`);
26301
+ console.log(` ${pc32.yellow("!")} ${pc32.cyan(c.slug)}`);
26628
26302
  }
26629
26303
  }
26630
26304
  console.log();
@@ -26637,7 +26311,7 @@ async function workflowsPush(options) {
26637
26311
  conflict_count: conflicts.length
26638
26312
  });
26639
26313
  }
26640
- async function pushToAPI2(workflows, token, progress, force) {
26314
+ async function pushToAPI2(workflows, token, progress, options) {
26641
26315
  if (!token) {
26642
26316
  progress.info(
26643
26317
  "No API token \u2014 skipping dashboard sync. Run: wraps auth login"
@@ -26669,7 +26343,8 @@ async function pushToAPI2(workflows, token, progress, force) {
26669
26343
  settings: w.transformed.settings,
26670
26344
  defaults: w.transformed.defaults,
26671
26345
  cliProjectPath: w.parsed.cliProjectPath,
26672
- force: force ?? false
26346
+ force: options.force ?? false,
26347
+ draft: options.draft ?? false
26673
26348
  }))
26674
26349
  })
26675
26350
  });
@@ -26679,7 +26354,12 @@ async function pushToAPI2(workflows, token, progress, force) {
26679
26354
  results.push({ slug: c.slug, success: false, conflict: true });
26680
26355
  }
26681
26356
  for (const r of data.results ?? []) {
26682
- results.push({ slug: r.slug, id: r.id, success: true });
26357
+ results.push({
26358
+ slug: r.slug,
26359
+ id: r.id,
26360
+ status: r.status,
26361
+ success: true
26362
+ });
26683
26363
  }
26684
26364
  const successCount = data.results?.length ?? 0;
26685
26365
  const conflictCount = data.conflicts?.length ?? 0;
@@ -26687,20 +26367,25 @@ async function pushToAPI2(workflows, token, progress, force) {
26687
26367
  progress.succeed(`Synced ${successCount} workflows to dashboard`);
26688
26368
  for (const c of data.conflicts ?? []) {
26689
26369
  progress.fail(
26690
- `${pc33.cyan(c.slug)} was edited on the dashboard. Use ${pc33.bold("--force")} to overwrite.`
26370
+ `${pc32.cyan(c.slug)} was edited on the dashboard. Use ${pc32.bold("--force")} to overwrite.`
26691
26371
  );
26692
26372
  }
26693
26373
  } else if (conflictCount > 0) {
26694
26374
  for (const c of data.conflicts ?? []) {
26695
26375
  progress.fail(
26696
- `${pc33.cyan(c.slug)} was edited on the dashboard. Use ${pc33.bold("--force")} to overwrite.`
26376
+ `${pc32.cyan(c.slug)} was edited on the dashboard. Use ${pc32.bold("--force")} to overwrite.`
26697
26377
  );
26698
26378
  }
26699
26379
  }
26700
26380
  } else if (resp.ok) {
26701
26381
  const data = await resp.json();
26702
26382
  for (const r of data.results) {
26703
- results.push({ slug: r.slug, id: r.id, success: true });
26383
+ results.push({
26384
+ slug: r.slug,
26385
+ id: r.id,
26386
+ status: r.status,
26387
+ success: true
26388
+ });
26704
26389
  }
26705
26390
  progress.succeed(`Synced ${workflows.length} workflows to dashboard`);
26706
26391
  } else {
@@ -26716,7 +26401,7 @@ async function pushToAPI2(workflows, token, progress, force) {
26716
26401
  }
26717
26402
  } else if (workflows.length === 1) {
26718
26403
  const w = workflows[0];
26719
- progress.start(`Syncing ${pc33.cyan(w.slug)} to dashboard`);
26404
+ progress.start(`Syncing ${pc32.cyan(w.slug)} to dashboard`);
26720
26405
  try {
26721
26406
  const resp = await fetch(`${apiBase}/v1/workflows/push`, {
26722
26407
  method: "POST",
@@ -26737,18 +26422,24 @@ async function pushToAPI2(workflows, token, progress, force) {
26737
26422
  settings: w.transformed.settings,
26738
26423
  defaults: w.transformed.defaults,
26739
26424
  cliProjectPath: w.parsed.cliProjectPath,
26740
- force: force ?? false
26425
+ force: options.force ?? false,
26426
+ draft: options.draft ?? false
26741
26427
  })
26742
26428
  });
26743
26429
  if (Number(resp.status) === 409) {
26744
26430
  results.push({ slug: w.slug, success: false, conflict: true });
26745
26431
  progress.fail(
26746
- `${pc33.cyan(w.slug)} was edited on the dashboard since last push. Use ${pc33.bold("--force")} to overwrite.`
26432
+ `${pc32.cyan(w.slug)} was edited on the dashboard since last push. Use ${pc32.bold("--force")} to overwrite.`
26747
26433
  );
26748
26434
  } else if (resp.ok) {
26749
26435
  const data = await resp.json();
26750
- results.push({ slug: data.slug, id: data.id, success: true });
26751
- progress.succeed(`Synced ${pc33.cyan(w.slug)} to dashboard`);
26436
+ results.push({
26437
+ slug: data.slug,
26438
+ id: data.id,
26439
+ status: data.status,
26440
+ success: true
26441
+ });
26442
+ progress.succeed(`Synced ${pc32.cyan(w.slug)} to dashboard`);
26752
26443
  } else {
26753
26444
  const body = await resp.text();
26754
26445
  throw new Error(`API returned ${resp.status}: ${body}`);
@@ -26765,30 +26456,30 @@ async function pushToAPI2(workflows, token, progress, force) {
26765
26456
  // src/commands/email/workflows/validate.ts
26766
26457
  init_esm_shims();
26767
26458
  init_events();
26768
- import { existsSync as existsSync17 } from "fs";
26769
- import { join as join18 } from "path";
26459
+ import { existsSync as existsSync16 } from "fs";
26460
+ import { join as join17 } from "path";
26770
26461
  import * as clack32 from "@clack/prompts";
26771
- import pc34 from "picocolors";
26462
+ import pc33 from "picocolors";
26772
26463
  init_errors();
26773
26464
  init_json_output();
26774
26465
  init_output();
26775
26466
  async function workflowsValidate(options) {
26776
26467
  const startTime = Date.now();
26777
26468
  const cwd = process.cwd();
26778
- const wrapsDir = join18(cwd, "wraps");
26779
- const configPath = join18(wrapsDir, "wraps.config.ts");
26780
- if (!existsSync17(configPath)) {
26469
+ const wrapsDir = join17(cwd, "wraps");
26470
+ const configPath = join17(wrapsDir, "wraps.config.ts");
26471
+ if (!existsSync16(configPath)) {
26781
26472
  throw errors.wrapsConfigNotFound();
26782
26473
  }
26783
26474
  if (!isJsonMode()) {
26784
- clack32.intro(pc34.bold("Validate Workflows"));
26475
+ clack32.intro(pc33.bold("Validate Workflows"));
26785
26476
  }
26786
26477
  const progress = new DeploymentProgress();
26787
26478
  progress.start("Loading configuration");
26788
26479
  const config2 = await loadWrapsConfig(wrapsDir);
26789
26480
  progress.succeed("Configuration loaded");
26790
- const workflowsDir = join18(wrapsDir, config2.workflowsDir || "./workflows");
26791
- if (!existsSync17(workflowsDir)) {
26481
+ const workflowsDir = join17(wrapsDir, config2.workflowsDir || "./workflows");
26482
+ if (!existsSync16(workflowsDir)) {
26792
26483
  if (isJsonMode()) {
26793
26484
  jsonSuccess("email.workflows.validate", { workflows: [], errors: [] });
26794
26485
  } else {
@@ -26805,9 +26496,9 @@ async function workflowsValidate(options) {
26805
26496
  }
26806
26497
  return;
26807
26498
  }
26808
- const templatesDir = join18(wrapsDir, config2.templatesDir || "./templates");
26499
+ const templatesDir = join17(wrapsDir, config2.templatesDir || "./templates");
26809
26500
  let localTemplateSlugs;
26810
- if (existsSync17(templatesDir)) {
26501
+ if (existsSync16(templatesDir)) {
26811
26502
  const templateFiles = await discoverTemplates(templatesDir);
26812
26503
  localTemplateSlugs = new Set(
26813
26504
  templateFiles.map((f) => f.replace(/\.tsx?$/, ""))
@@ -26817,8 +26508,8 @@ async function workflowsValidate(options) {
26817
26508
  const parseErrors = [];
26818
26509
  for (const file of workflowFiles) {
26819
26510
  const slug = file.replace(/\.ts$/, "");
26820
- const filePath = join18(workflowsDir, file);
26821
- progress.start(`Validating ${pc34.cyan(slug)}`);
26511
+ const filePath = join17(workflowsDir, file);
26512
+ progress.start(`Validating ${pc33.cyan(slug)}`);
26822
26513
  try {
26823
26514
  const parsed = await parseWorkflowTs(filePath, wrapsDir);
26824
26515
  const transformed = transformWorkflow(parsed.definition);
@@ -26843,20 +26534,20 @@ async function workflowsValidate(options) {
26843
26534
  }))
26844
26535
  });
26845
26536
  if (errs.length === 0 && warnings.length === 0) {
26846
- progress.succeed(`${pc34.cyan(slug)} is valid`);
26537
+ progress.succeed(`${pc33.cyan(slug)} is valid`);
26847
26538
  } else if (errs.length === 0) {
26848
26539
  progress.succeed(
26849
- `${pc34.cyan(slug)} is valid with ${warnings.length} warning(s)`
26540
+ `${pc33.cyan(slug)} is valid with ${warnings.length} warning(s)`
26850
26541
  );
26851
26542
  } else {
26852
26543
  progress.fail(
26853
- `${pc34.cyan(slug)} has ${errs.length} error(s), ${warnings.length} warning(s)`
26544
+ `${pc33.cyan(slug)} has ${errs.length} error(s), ${warnings.length} warning(s)`
26854
26545
  );
26855
26546
  }
26856
26547
  } catch (err) {
26857
26548
  const errMsg = err instanceof Error ? err.message : String(err);
26858
26549
  parseErrors.push({ slug, error: errMsg });
26859
- progress.fail(`Failed to parse ${pc34.cyan(slug)}: ${errMsg}`);
26550
+ progress.fail(`Failed to parse ${pc33.cyan(slug)}: ${errMsg}`);
26860
26551
  }
26861
26552
  }
26862
26553
  if (isJsonMode()) {
@@ -26879,34 +26570,34 @@ async function workflowsValidate(options) {
26879
26570
  const parseErrorCount = parseErrors.length;
26880
26571
  if (parseErrorCount === 0 && invalidCount === 0) {
26881
26572
  clack32.log.success(
26882
- pc34.green(`${validCount} workflow(s) validated successfully`)
26573
+ pc33.green(`${validCount} workflow(s) validated successfully`)
26883
26574
  );
26884
26575
  } else {
26885
26576
  if (validCount > 0) {
26886
- clack32.log.success(pc34.green(`${validCount} workflow(s) valid`));
26577
+ clack32.log.success(pc33.green(`${validCount} workflow(s) valid`));
26887
26578
  }
26888
26579
  if (invalidCount > 0) {
26889
- clack32.log.error(pc34.red(`${invalidCount} workflow(s) have errors`));
26580
+ clack32.log.error(pc33.red(`${invalidCount} workflow(s) have errors`));
26890
26581
  }
26891
26582
  if (parseErrorCount > 0) {
26892
26583
  clack32.log.error(
26893
- pc34.red(`${parseErrorCount} workflow(s) failed to parse`)
26584
+ pc33.red(`${parseErrorCount} workflow(s) failed to parse`)
26894
26585
  );
26895
26586
  }
26896
26587
  console.log();
26897
26588
  for (const result of validationResults) {
26898
26589
  if (!result.valid) {
26899
- console.log(` ${pc34.cyan(result.slug)}:`);
26590
+ console.log(` ${pc33.cyan(result.slug)}:`);
26900
26591
  for (const err of result.errors) {
26901
26592
  console.log(
26902
- ` ${pc34.red("\u2715")} ${err.nodeId ? `[${err.nodeId}] ` : ""}${err.message}`
26593
+ ` ${pc33.red("\u2715")} ${err.nodeId ? `[${err.nodeId}] ` : ""}${err.message}`
26903
26594
  );
26904
26595
  }
26905
26596
  }
26906
26597
  }
26907
26598
  for (const parseErr of parseErrors) {
26908
- console.log(` ${pc34.cyan(parseErr.slug)}:`);
26909
- console.log(` ${pc34.red("\u2715")} Parse error: ${parseErr.error}`);
26599
+ console.log(` ${pc33.cyan(parseErr.slug)}:`);
26600
+ console.log(` ${pc33.red("\u2715")} Parse error: ${parseErr.error}`);
26910
26601
  }
26911
26602
  }
26912
26603
  console.log();
@@ -26924,18 +26615,18 @@ async function workflowsValidate(options) {
26924
26615
  init_esm_shims();
26925
26616
  init_events();
26926
26617
  import * as clack33 from "@clack/prompts";
26927
- import pc35 from "picocolors";
26618
+ import pc34 from "picocolors";
26928
26619
  async function news() {
26929
26620
  trackCommand("news", { success: true });
26930
- clack33.intro(pc35.bold("What's New in Wraps"));
26621
+ clack33.intro(pc34.bold("What's New in Wraps"));
26931
26622
  console.log();
26932
26623
  console.log(" See the latest updates, features, and improvements:");
26933
26624
  console.log();
26934
26625
  console.log(
26935
- ` ${pc35.cyan("\u2192")} ${pc35.bold("Changelog:")} ${pc35.cyan("https://wraps.dev/changelog")}`
26626
+ ` ${pc34.cyan("\u2192")} ${pc34.bold("Changelog:")} ${pc34.cyan("https://wraps.dev/changelog")}`
26936
26627
  );
26937
26628
  console.log();
26938
- console.log(pc35.dim(" Subscribe to get notified about new releases."));
26629
+ console.log(pc34.dim(" Subscribe to get notified about new releases."));
26939
26630
  console.log();
26940
26631
  }
26941
26632
 
@@ -26944,7 +26635,7 @@ init_esm_shims();
26944
26635
  init_events();
26945
26636
  init_json_output();
26946
26637
  import * as clack34 from "@clack/prompts";
26947
- import pc36 from "picocolors";
26638
+ import pc35 from "picocolors";
26948
26639
  function getBaseStatements() {
26949
26640
  return [
26950
26641
  {
@@ -27335,74 +27026,74 @@ function buildPolicy(service, preset) {
27335
27026
  };
27336
27027
  }
27337
27028
  function displaySummary(service, preset) {
27338
- clack34.intro(pc36.bold("Wraps Required AWS Permissions"));
27029
+ clack34.intro(pc35.bold("Wraps Required AWS Permissions"));
27339
27030
  const serviceLabel = service ? service.toUpperCase() : "All Services";
27340
27031
  const presetLabel = preset ? preset.charAt(0).toUpperCase() + preset.slice(1) : "All Features";
27341
27032
  console.log(`
27342
- ${pc36.dim("Service:")} ${pc36.cyan(serviceLabel)}`);
27343
- console.log(`${pc36.dim("Preset:")} ${pc36.cyan(presetLabel)}
27033
+ ${pc35.dim("Service:")} ${pc35.cyan(serviceLabel)}`);
27034
+ console.log(`${pc35.dim("Preset:")} ${pc35.cyan(presetLabel)}
27344
27035
  `);
27345
- console.log(pc36.bold("Required AWS Services:\n"));
27346
- console.log(` ${pc36.green("+")} ${pc36.bold("IAM")} - Role management`);
27347
- console.log(` ${pc36.green("+")} ${pc36.bold("STS")} - Credential validation`);
27348
- console.log(` ${pc36.green("+")} ${pc36.bold("CloudWatch")} - Metrics access`);
27036
+ console.log(pc35.bold("Required AWS Services:\n"));
27037
+ console.log(` ${pc35.green("+")} ${pc35.bold("IAM")} - Role management`);
27038
+ console.log(` ${pc35.green("+")} ${pc35.bold("STS")} - Credential validation`);
27039
+ console.log(` ${pc35.green("+")} ${pc35.bold("CloudWatch")} - Metrics access`);
27349
27040
  console.log(
27350
- ` ${pc36.green("+")} ${pc36.bold("S3")} - State management ${pc36.dim("(wraps-state-* buckets)")}`
27041
+ ` ${pc35.green("+")} ${pc35.bold("S3")} - State management ${pc35.dim("(wraps-state-* buckets)")}`
27351
27042
  );
27352
27043
  if (!service || service === "email") {
27353
27044
  console.log(
27354
- ` ${pc36.green("+")} ${pc36.bold("SES")} - Email sending & configuration`
27045
+ ` ${pc35.green("+")} ${pc35.bold("SES")} - Email sending & configuration`
27355
27046
  );
27356
27047
  if (!preset || preset === "production" || preset === "enterprise") {
27357
27048
  console.log(
27358
- ` ${pc36.green("+")} ${pc36.bold("EventBridge")} - Event routing (Production+)`
27049
+ ` ${pc35.green("+")} ${pc35.bold("EventBridge")} - Event routing (Production+)`
27359
27050
  );
27360
27051
  console.log(
27361
- ` ${pc36.green("+")} ${pc36.bold("SQS")} - Event queuing (Production+)`
27052
+ ` ${pc35.green("+")} ${pc35.bold("SQS")} - Event queuing (Production+)`
27362
27053
  );
27363
27054
  console.log(
27364
- ` ${pc36.green("+")} ${pc36.bold("Lambda")} - Event processing (Production+)`
27055
+ ` ${pc35.green("+")} ${pc35.bold("Lambda")} - Event processing (Production+)`
27365
27056
  );
27366
27057
  console.log(
27367
- ` ${pc36.green("+")} ${pc36.bold("DynamoDB")} - Email history (Production+)`
27058
+ ` ${pc35.green("+")} ${pc35.bold("DynamoDB")} - Email history (Production+)`
27368
27059
  );
27369
27060
  }
27370
27061
  console.log(
27371
- ` ${pc36.yellow("?")} ${pc36.bold("Route53")} - Auto DNS ${pc36.dim("(optional)")}`
27062
+ ` ${pc35.yellow("?")} ${pc35.bold("Route53")} - Auto DNS ${pc35.dim("(optional)")}`
27372
27063
  );
27373
27064
  console.log(
27374
- ` ${pc36.yellow("?")} ${pc36.bold("IAM OIDC")} - Vercel integration ${pc36.dim("(if using Vercel)")}`
27065
+ ` ${pc35.yellow("?")} ${pc35.bold("IAM OIDC")} - Vercel integration ${pc35.dim("(if using Vercel)")}`
27375
27066
  );
27376
27067
  }
27377
27068
  if (!service || service === "sms") {
27378
27069
  console.log(
27379
- ` ${pc36.green("+")} ${pc36.bold("SMS Voice")} - SMS sending & management`
27070
+ ` ${pc35.green("+")} ${pc35.bold("SMS Voice")} - SMS sending & management`
27380
27071
  );
27381
- console.log(` ${pc36.green("+")} ${pc36.bold("DynamoDB")} - Message history`);
27382
- console.log(` ${pc36.green("+")} ${pc36.bold("Lambda")} - Event processing`);
27072
+ console.log(` ${pc35.green("+")} ${pc35.bold("DynamoDB")} - Message history`);
27073
+ console.log(` ${pc35.green("+")} ${pc35.bold("Lambda")} - Event processing`);
27383
27074
  }
27384
27075
  if (!service || service === "cdn") {
27385
- console.log(` ${pc36.green("+")} ${pc36.bold("S3")} - Asset storage`);
27076
+ console.log(` ${pc35.green("+")} ${pc35.bold("S3")} - Asset storage`);
27386
27077
  console.log(
27387
- ` ${pc36.green("+")} ${pc36.bold("CloudFront")} - CDN distribution`
27078
+ ` ${pc35.green("+")} ${pc35.bold("CloudFront")} - CDN distribution`
27388
27079
  );
27389
- console.log(` ${pc36.green("+")} ${pc36.bold("ACM")} - SSL certificates`);
27080
+ console.log(` ${pc35.green("+")} ${pc35.bold("ACM")} - SSL certificates`);
27390
27081
  console.log(
27391
- ` ${pc36.yellow("?")} ${pc36.bold("Route53")} - DNS management ${pc36.dim("(optional)")}`
27082
+ ` ${pc35.yellow("?")} ${pc35.bold("Route53")} - DNS management ${pc35.dim("(optional)")}`
27392
27083
  );
27393
27084
  }
27394
27085
  console.log(`
27395
- ${pc36.dim("Get full IAM policy JSON:")}`);
27396
- console.log(` ${pc36.cyan("wraps permissions --json")}`);
27086
+ ${pc35.dim("Get full IAM policy JSON:")}`);
27087
+ console.log(` ${pc35.cyan("wraps permissions --json")}`);
27397
27088
  if (service) {
27398
27089
  console.log(`
27399
- ${pc36.dim("Get permissions for all services:")}`);
27400
- console.log(` ${pc36.cyan("wraps permissions")}`);
27090
+ ${pc35.dim("Get permissions for all services:")}`);
27091
+ console.log(` ${pc35.cyan("wraps permissions")}`);
27401
27092
  }
27402
27093
  console.log(`
27403
- ${pc36.dim("Documentation:")}`);
27094
+ ${pc35.dim("Documentation:")}`);
27404
27095
  console.log(
27405
- ` ${pc36.blue("https://wraps.dev/docs/guides/aws-setup/permissions")}
27096
+ ` ${pc35.blue("https://wraps.dev/docs/guides/aws-setup/permissions")}
27406
27097
  `
27407
27098
  );
27408
27099
  }
@@ -27420,17 +27111,17 @@ async function permissions(options) {
27420
27111
  });
27421
27112
  } else {
27422
27113
  displaySummary(options.service, options.preset);
27423
- console.log(pc36.bold("Quick Setup:\n"));
27114
+ console.log(pc35.bold("Quick Setup:\n"));
27424
27115
  console.log("1. Copy the IAM policy:");
27425
27116
  console.log(
27426
- ` ${pc36.cyan("wraps permissions --json > wraps-policy.json")}
27117
+ ` ${pc35.cyan("wraps permissions --json > wraps-policy.json")}
27427
27118
  `
27428
27119
  );
27429
27120
  console.log("2. Create the policy in AWS Console:");
27430
27121
  console.log(" IAM > Policies > Create Policy > JSON\n");
27431
27122
  console.log("3. Attach to your IAM user/role\n");
27432
27123
  clack34.outro(
27433
- pc36.green("Run with --json to get the full IAM policy document")
27124
+ pc35.green("Run with --json to get the full IAM policy document")
27434
27125
  );
27435
27126
  }
27436
27127
  trackCommand("permissions", {
@@ -27447,9 +27138,9 @@ import {
27447
27138
  IAMClient as IAMClient2,
27448
27139
  PutRolePolicyCommand
27449
27140
  } from "@aws-sdk/client-iam";
27450
- import { confirm as confirm14, intro as intro33, isCancel as isCancel20, log as log33, outro as outro19, select as select14 } from "@clack/prompts";
27141
+ import { confirm as confirm14, intro as intro32, isCancel as isCancel20, log as log32, outro as outro19, select as select14 } from "@clack/prompts";
27451
27142
  import * as pulumi21 from "@pulumi/pulumi";
27452
- import pc37 from "picocolors";
27143
+ import pc36 from "picocolors";
27453
27144
  init_events();
27454
27145
  init_aws();
27455
27146
  init_config();
@@ -27627,7 +27318,7 @@ async function validateAndLoadMetadata(options, progress) {
27627
27318
  "Validating AWS credentials",
27628
27319
  async () => validateAWSCredentials()
27629
27320
  );
27630
- progress.info(`Connected to AWS account: ${pc37.cyan(identity.accountId)}`);
27321
+ progress.info(`Connected to AWS account: ${pc36.cyan(identity.accountId)}`);
27631
27322
  let region = options.region;
27632
27323
  if (!region) {
27633
27324
  region = await getAWSRegion();
@@ -27635,12 +27326,12 @@ async function validateAndLoadMetadata(options, progress) {
27635
27326
  const metadata = await loadConnectionMetadata(identity.accountId, region);
27636
27327
  if (!metadata) {
27637
27328
  progress.stop();
27638
- log33.error(
27639
- `No Wraps deployment found for account ${pc37.cyan(identity.accountId)} in region ${pc37.cyan(region)}`
27329
+ log32.error(
27330
+ `No Wraps deployment found for account ${pc36.cyan(identity.accountId)} in region ${pc36.cyan(region)}`
27640
27331
  );
27641
27332
  console.log(
27642
27333
  `
27643
- Run ${pc37.cyan("wraps email init")} to deploy infrastructure first.
27334
+ Run ${pc36.cyan("wraps email init")} to deploy infrastructure first.
27644
27335
  `
27645
27336
  );
27646
27337
  process.exit(1);
@@ -27649,10 +27340,10 @@ Run ${pc37.cyan("wraps email init")} to deploy infrastructure first.
27649
27340
  const hasSms = !!metadata.services.sms?.config;
27650
27341
  if (!(hasEmail || hasSms)) {
27651
27342
  progress.stop();
27652
- log33.error("No services deployed in this region.");
27343
+ log32.error("No services deployed in this region.");
27653
27344
  console.log(
27654
27345
  `
27655
- Run ${pc37.cyan("wraps email init")} or ${pc37.cyan("wraps sms init")} first.
27346
+ Run ${pc36.cyan("wraps email init")} or ${pc36.cyan("wraps sms init")} first.
27656
27347
  `
27657
27348
  );
27658
27349
  process.exit(1);
@@ -27777,7 +27468,7 @@ async function updatePlatformRole(metadata, progress, externalId) {
27777
27468
  progress.succeed("Platform access role created");
27778
27469
  } else {
27779
27470
  progress.info(
27780
- `IAM role ${pc37.cyan(roleName)} will be created when you add your AWS account in the dashboard`
27471
+ `IAM role ${pc36.cyan(roleName)} will be created when you add your AWS account in the dashboard`
27781
27472
  );
27782
27473
  }
27783
27474
  }
@@ -27831,7 +27522,7 @@ async function registerConnection(params) {
27831
27522
  async function authenticatedConnect(token, options) {
27832
27523
  const startTime = Date.now();
27833
27524
  if (!isJsonMode()) {
27834
- intro33(pc37.bold("Connect to Wraps Platform"));
27525
+ intro32(pc36.bold("Connect to Wraps Platform"));
27835
27526
  }
27836
27527
  const progress = new DeploymentProgress();
27837
27528
  try {
@@ -27843,20 +27534,20 @@ async function authenticatedConnect(token, options) {
27843
27534
  const org = await resolveOrganization();
27844
27535
  if (!org) {
27845
27536
  progress.stop();
27846
- log33.error(
27537
+ log32.error(
27847
27538
  "No organizations found. Sign in at https://app.wraps.dev to create one."
27848
27539
  );
27849
27540
  process.exit(1);
27850
27541
  }
27851
27542
  if (!isJsonMode()) {
27852
- progress.info(`Organization: ${pc37.cyan(org.name)}`);
27543
+ progress.info(`Organization: ${pc36.cyan(org.name)}`);
27853
27544
  }
27854
27545
  if (hasEmail) {
27855
27546
  const emailConfig = metadata.services.email?.config;
27856
27547
  if (!emailConfig?.eventTracking?.enabled) {
27857
27548
  if (!isJsonMode()) {
27858
27549
  progress.stop();
27859
- log33.warn(
27550
+ log32.warn(
27860
27551
  "Event tracking must be enabled to connect to the Wraps Platform."
27861
27552
  );
27862
27553
  }
@@ -27906,12 +27597,12 @@ async function authenticatedConnect(token, options) {
27906
27597
  );
27907
27598
  if (!(result.success && result.webhookSecret)) {
27908
27599
  progress.stop();
27909
- log33.error(
27600
+ log32.error(
27910
27601
  `Failed to register connection: ${result.error || "Unknown error"}`
27911
27602
  );
27912
27603
  console.log(
27913
27604
  `
27914
- You can try the manual flow: ${pc37.cyan("wraps auth logout")} then ${pc37.cyan("wraps platform connect")}
27605
+ You can try the manual flow: ${pc36.cyan("wraps auth logout")} then ${pc36.cyan("wraps platform connect")}
27915
27606
  `
27916
27607
  );
27917
27608
  process.exit(1);
@@ -27939,10 +27630,10 @@ You can try the manual flow: ${pc37.cyan("wraps auth logout")} then ${pc37.cyan(
27939
27630
  } catch (error) {
27940
27631
  const errName = error && typeof error === "object" && "name" in error ? error.name : "Unknown";
27941
27632
  const errMsg = error instanceof Error ? error.message : String(error);
27942
- log33.warn(
27633
+ log32.warn(
27943
27634
  `Could not create/update IAM role (${errName}): ${errMsg}
27944
- You may need ${pc37.cyan("iam:GetRole")}, ${pc37.cyan("iam:CreateRole")}, and ${pc37.cyan("iam:PutRolePolicy")} permissions.
27945
- Run ${pc37.cyan("wraps platform update-role")} to retry.`
27635
+ You may need ${pc36.cyan("iam:GetRole")}, ${pc36.cyan("iam:CreateRole")}, and ${pc36.cyan("iam:PutRolePolicy")} permissions.
27636
+ Run ${pc36.cyan("wraps platform update-role")} to retry.`
27946
27637
  );
27947
27638
  }
27948
27639
  await saveConnectionMetadata(metadata);
@@ -27956,14 +27647,14 @@ You can try the manual flow: ${pc37.cyan("wraps auth logout")} then ${pc37.cyan(
27956
27647
  webhookConnected: true
27957
27648
  });
27958
27649
  } else {
27959
- outro19(pc37.green("Platform connection complete!"));
27650
+ outro19(pc36.green("Platform connection complete!"));
27960
27651
  console.log();
27961
27652
  console.log(
27962
- pc37.dim(
27653
+ pc36.dim(
27963
27654
  "Events from your AWS infrastructure will stream to the dashboard."
27964
27655
  )
27965
27656
  );
27966
- console.log(` Dashboard: ${pc37.cyan("https://app.wraps.dev")}`);
27657
+ console.log(` Dashboard: ${pc36.cyan("https://app.wraps.dev")}`);
27967
27658
  console.log();
27968
27659
  }
27969
27660
  const duration = Date.now() - startTime;
@@ -27994,7 +27685,7 @@ async function connect3(options) {
27994
27685
  return;
27995
27686
  }
27996
27687
  const startTime = Date.now();
27997
- intro33(pc37.bold("Connect to Wraps Platform"));
27688
+ intro32(pc36.bold("Connect to Wraps Platform"));
27998
27689
  const progress = new DeploymentProgress();
27999
27690
  try {
28000
27691
  const wasAutoInstalled = await progress.execute(
@@ -28008,7 +27699,7 @@ async function connect3(options) {
28008
27699
  "Validating AWS credentials",
28009
27700
  async () => validateAWSCredentials()
28010
27701
  );
28011
- progress.info(`Connected to AWS account: ${pc37.cyan(identity.accountId)}`);
27702
+ progress.info(`Connected to AWS account: ${pc36.cyan(identity.accountId)}`);
28012
27703
  let region = options.region;
28013
27704
  if (!region) {
28014
27705
  region = await getAWSRegion();
@@ -28016,12 +27707,12 @@ async function connect3(options) {
28016
27707
  const metadata = await loadConnectionMetadata(identity.accountId, region);
28017
27708
  if (!metadata) {
28018
27709
  progress.stop();
28019
- log33.error(
28020
- `No Wraps deployment found for account ${pc37.cyan(identity.accountId)} in region ${pc37.cyan(region)}`
27710
+ log32.error(
27711
+ `No Wraps deployment found for account ${pc36.cyan(identity.accountId)} in region ${pc36.cyan(region)}`
28021
27712
  );
28022
27713
  console.log(
28023
27714
  `
28024
- Run ${pc37.cyan("wraps email init")} to deploy infrastructure first.
27715
+ Run ${pc36.cyan("wraps email init")} to deploy infrastructure first.
28025
27716
  `
28026
27717
  );
28027
27718
  process.exit(1);
@@ -28030,10 +27721,10 @@ Run ${pc37.cyan("wraps email init")} to deploy infrastructure first.
28030
27721
  const hasSms = !!metadata.services.sms?.config;
28031
27722
  if (!(hasEmail || hasSms)) {
28032
27723
  progress.stop();
28033
- log33.error("No services deployed in this region.");
27724
+ log32.error("No services deployed in this region.");
28034
27725
  console.log(
28035
27726
  `
28036
- Run ${pc37.cyan("wraps email init")} or ${pc37.cyan("wraps sms init")} first.
27727
+ Run ${pc36.cyan("wraps email init")} or ${pc36.cyan("wraps sms init")} first.
28037
27728
  `
28038
27729
  );
28039
27730
  process.exit(1);
@@ -28048,10 +27739,10 @@ Run ${pc37.cyan("wraps email init")} or ${pc37.cyan("wraps sms init")} first.
28048
27739
  const existingSecret = metadata.services.email?.webhookSecret;
28049
27740
  if (!emailConfig?.eventTracking?.enabled) {
28050
27741
  progress.stop();
28051
- log33.warn(
27742
+ log32.warn(
28052
27743
  "Event tracking must be enabled to connect to the Wraps Platform."
28053
27744
  );
28054
- log33.info(
27745
+ log32.info(
28055
27746
  "Enabling event tracking will allow SES events to be streamed to the dashboard."
28056
27747
  );
28057
27748
  const enableEventTracking = await confirm14({
@@ -28083,8 +27774,8 @@ Run ${pc37.cyan("wraps email init")} or ${pc37.cyan("wraps sms init")} first.
28083
27774
  }
28084
27775
  if (existingSecret) {
28085
27776
  progress.stop();
28086
- log33.info(
28087
- `Already connected to Wraps Platform (AWS Account: ${pc37.cyan(metadata.accountId)})`
27777
+ log32.info(
27778
+ `Already connected to Wraps Platform (AWS Account: ${pc36.cyan(metadata.accountId)})`
28088
27779
  );
28089
27780
  const action = await select14({
28090
27781
  message: "What would you like to do?",
@@ -28211,36 +27902,36 @@ Run ${pc37.cyan("wraps email init")} or ${pc37.cyan("wraps sms init")} first.
28211
27902
  progress.succeed("Platform access role updated");
28212
27903
  } else {
28213
27904
  progress.info(
28214
- `IAM role ${pc37.cyan(roleName)} will be created when you add your AWS account in the dashboard`
27905
+ `IAM role ${pc36.cyan(roleName)} will be created when you add your AWS account in the dashboard`
28215
27906
  );
28216
27907
  }
28217
27908
  await saveConnectionMetadata(metadata);
28218
27909
  progress.stop();
28219
- outro19(pc37.green("Platform connection complete!"));
27910
+ outro19(pc36.green("Platform connection complete!"));
28220
27911
  if (webhookSecret && needsDeployment) {
28221
27912
  console.log(`
28222
- ${pc37.bold("Webhook Secret")} ${pc37.dim("(save this!)")}`);
28223
- console.log(pc37.dim("\u2500".repeat(60)));
28224
- console.log(` ${pc37.cyan(webhookSecret)}`);
28225
- console.log(pc37.dim("\u2500".repeat(60)));
27913
+ ${pc36.bold("Webhook Secret")} ${pc36.dim("(save this!)")}`);
27914
+ console.log(pc36.dim("\u2500".repeat(60)));
27915
+ console.log(` ${pc36.cyan(webhookSecret)}`);
27916
+ console.log(pc36.dim("\u2500".repeat(60)));
28226
27917
  } else if (metadata.services.email?.webhookSecret && !needsDeployment) {
28227
27918
  console.log(`
28228
- ${pc37.bold("Existing Webhook Secret:")}`);
28229
- console.log(pc37.dim("\u2500".repeat(60)));
28230
- console.log(` ${pc37.cyan(metadata.services.email.webhookSecret)}`);
28231
- console.log(pc37.dim("\u2500".repeat(60)));
27919
+ ${pc36.bold("Existing Webhook Secret:")}`);
27920
+ console.log(pc36.dim("\u2500".repeat(60)));
27921
+ console.log(` ${pc36.cyan(metadata.services.email.webhookSecret)}`);
27922
+ console.log(pc36.dim("\u2500".repeat(60)));
28232
27923
  }
28233
27924
  console.log(`
28234
- ${pc37.bold("Next Steps:")}`);
28235
- console.log(` 1. Go to ${pc37.cyan("https://app.wraps.dev")}`);
28236
- console.log(` 2. Navigate to ${pc37.dim("Settings \u2192 AWS Accounts")}`);
28237
- console.log(` 3. Add your AWS account: ${pc37.cyan(identity.accountId)}`);
27925
+ ${pc36.bold("Next Steps:")}`);
27926
+ console.log(` 1. Go to ${pc36.cyan("https://app.wraps.dev")}`);
27927
+ console.log(` 2. Navigate to ${pc36.dim("Settings \u2192 AWS Accounts")}`);
27928
+ console.log(` 3. Add your AWS account: ${pc36.cyan(identity.accountId)}`);
28238
27929
  if (webhookSecret) {
28239
27930
  console.log(" 4. Paste the webhook secret shown above");
28240
27931
  }
28241
27932
  console.log();
28242
27933
  console.log(
28243
- pc37.dim(
27934
+ pc36.dim(
28244
27935
  "Events from your AWS infrastructure will stream to the dashboard."
28245
27936
  )
28246
27937
  );
@@ -28268,51 +27959,51 @@ ${pc37.bold("Next Steps:")}`);
28268
27959
  // src/commands/platform/index.ts
28269
27960
  init_esm_shims();
28270
27961
  import * as clack35 from "@clack/prompts";
28271
- import pc38 from "picocolors";
27962
+ import pc37 from "picocolors";
28272
27963
  async function platform() {
28273
- clack35.intro(pc38.bold("Wraps Platform"));
27964
+ clack35.intro(pc37.bold("Wraps Platform"));
28274
27965
  console.log();
28275
27966
  console.log(
28276
27967
  " The Wraps Platform extends the free CLI with hosted features:"
28277
27968
  );
28278
27969
  console.log();
28279
- console.log(` ${pc38.bold("Features:")}`);
28280
- console.log(` ${pc38.green("\u2713")} Visual email template editor`);
28281
- console.log(` ${pc38.green("\u2713")} Broadcast campaigns & scheduling`);
28282
- console.log(` ${pc38.green("\u2713")} Contact management & segments`);
28283
- console.log(` ${pc38.green("\u2713")} Workflow automations`);
28284
- console.log(` ${pc38.green("\u2713")} Analytics dashboard`);
28285
- console.log(` ${pc38.green("\u2713")} Team collaboration`);
27970
+ console.log(` ${pc37.bold("Features:")}`);
27971
+ console.log(` ${pc37.green("\u2713")} Visual email template editor`);
27972
+ console.log(` ${pc37.green("\u2713")} Broadcast campaigns & scheduling`);
27973
+ console.log(` ${pc37.green("\u2713")} Contact management & segments`);
27974
+ console.log(` ${pc37.green("\u2713")} Workflow automations`);
27975
+ console.log(` ${pc37.green("\u2713")} Analytics dashboard`);
27976
+ console.log(` ${pc37.green("\u2713")} Team collaboration`);
28286
27977
  console.log();
28287
- console.log(` ${pc38.bold("Pricing:")}`);
28288
- console.log(` ${pc38.cyan("Starter")} $10/mo 5,000 contacts`);
28289
- console.log(` ${pc38.cyan("Growth")} $25/mo 25,000 contacts`);
28290
- console.log(` ${pc38.cyan("Scale")} $50/mo 100,000 contacts`);
28291
- console.log(` ${pc38.cyan("Enterprise")} Custom Unlimited contacts`);
27978
+ console.log(` ${pc37.bold("Pricing:")}`);
27979
+ console.log(` ${pc37.cyan("Starter")} $10/mo 5,000 contacts`);
27980
+ console.log(` ${pc37.cyan("Growth")} $25/mo 25,000 contacts`);
27981
+ console.log(` ${pc37.cyan("Scale")} $50/mo 100,000 contacts`);
27982
+ console.log(` ${pc37.cyan("Enterprise")} Custom Unlimited contacts`);
28292
27983
  console.log();
28293
27984
  console.log(
28294
- pc38.dim(" + AWS costs at $0.10 per 1,000 emails (paid directly to AWS)")
27985
+ pc37.dim(" + AWS costs at $0.10 per 1,000 emails (paid directly to AWS)")
28295
27986
  );
28296
27987
  console.log();
28297
27988
  console.log(
28298
- ` ${pc38.bold("Learn more:")} ${pc38.cyan("https://wraps.dev/platform")}`
27989
+ ` ${pc37.bold("Learn more:")} ${pc37.cyan("https://wraps.dev/platform")}`
28299
27990
  );
28300
27991
  console.log();
28301
- console.log(pc38.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"));
27992
+ console.log(pc37.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"));
28302
27993
  console.log();
28303
- console.log(` ${pc38.bold("Platform Commands:")}`);
27994
+ console.log(` ${pc37.bold("Platform Commands:")}`);
28304
27995
  console.log();
28305
27996
  console.log(
28306
- ` ${pc38.cyan("wraps platform connect")} Connect infrastructure to Wraps Platform`
27997
+ ` ${pc37.cyan("wraps platform connect")} Connect infrastructure to Wraps Platform`
28307
27998
  );
28308
27999
  console.log(
28309
- ` ${pc38.cyan("wraps platform update-role")} Update IAM permissions for dashboard`
28000
+ ` ${pc37.cyan("wraps platform update-role")} Update IAM permissions for dashboard`
28310
28001
  );
28311
28002
  console.log();
28312
28003
  console.log(
28313
- pc38.dim(" The connect command sets up event streaming and IAM permissions")
28004
+ pc37.dim(" The connect command sets up event streaming and IAM permissions")
28314
28005
  );
28315
- console.log(pc38.dim(" in one step. Run it after deploying infrastructure."));
28006
+ console.log(pc37.dim(" in one step. Run it after deploying infrastructure."));
28316
28007
  console.log();
28317
28008
  }
28318
28009
 
@@ -28328,12 +28019,12 @@ import {
28328
28019
  GetRoleCommand as GetRoleCommand2,
28329
28020
  IAMClient as IAMClient3
28330
28021
  } from "@aws-sdk/client-iam";
28331
- import { confirm as confirm15, intro as intro35, isCancel as isCancel21, log as log34, outro as outro20 } from "@clack/prompts";
28332
- import pc39 from "picocolors";
28022
+ import { confirm as confirm15, intro as intro34, isCancel as isCancel21, log as log33, outro as outro20 } from "@clack/prompts";
28023
+ import pc38 from "picocolors";
28333
28024
  async function updateRole(options) {
28334
28025
  const startTime = Date.now();
28335
28026
  if (!isJsonMode()) {
28336
- intro35(pc39.bold("Update Platform Access Role"));
28027
+ intro34(pc38.bold("Update Platform Access Role"));
28337
28028
  }
28338
28029
  const progress = new DeploymentProgress();
28339
28030
  const identity = await progress.execute(
@@ -28344,12 +28035,12 @@ async function updateRole(options) {
28344
28035
  const metadata = await loadConnectionMetadata(identity.accountId, region);
28345
28036
  if (!metadata) {
28346
28037
  progress.stop();
28347
- log34.error(
28348
- `No Wraps deployment found for account ${pc39.cyan(identity.accountId)} in region ${pc39.cyan(region)}`
28038
+ log33.error(
28039
+ `No Wraps deployment found for account ${pc38.cyan(identity.accountId)} in region ${pc38.cyan(region)}`
28349
28040
  );
28350
28041
  console.log(
28351
28042
  `
28352
- Run ${pc39.cyan("wraps email init")} to deploy infrastructure first.
28043
+ Run ${pc38.cyan("wraps email init")} to deploy infrastructure first.
28353
28044
  `
28354
28045
  );
28355
28046
  process.exit(1);
@@ -28369,28 +28060,28 @@ Run ${pc39.cyan("wraps email init")} to deploy infrastructure first.
28369
28060
  const externalId = metadata.platform?.externalId;
28370
28061
  if (!(roleExists2 || externalId)) {
28371
28062
  progress.stop();
28372
- log34.warn(`IAM role ${pc39.cyan(roleName)} does not exist`);
28063
+ log33.warn(`IAM role ${pc38.cyan(roleName)} does not exist`);
28373
28064
  console.log(
28374
28065
  "\nThis role is created when you connect AWS accounts through the Wraps Platform."
28375
28066
  );
28376
28067
  console.log(
28377
- `Run ${pc39.cyan("wraps platform connect")} while logged in to create the role automatically.
28068
+ `Run ${pc38.cyan("wraps platform connect")} while logged in to create the role automatically.
28378
28069
  `
28379
28070
  );
28380
28071
  process.exit(0);
28381
28072
  }
28382
28073
  if (roleExists2) {
28383
- progress.info(`Found IAM role: ${pc39.cyan(roleName)}`);
28074
+ progress.info(`Found IAM role: ${pc38.cyan(roleName)}`);
28384
28075
  } else {
28385
28076
  progress.info(
28386
- `IAM role ${pc39.cyan(roleName)} not found \u2014 will create it using stored externalId`
28077
+ `IAM role ${pc38.cyan(roleName)} not found \u2014 will create it using stored externalId`
28387
28078
  );
28388
28079
  }
28389
28080
  if (!options.force) {
28390
28081
  progress.stop();
28391
28082
  const actionLabel = roleExists2 ? "Update" : "Create";
28392
28083
  const shouldContinue = await confirm15({
28393
- message: `${actionLabel} IAM role ${pc39.cyan(roleName)} with latest permissions?`,
28084
+ message: `${actionLabel} IAM role ${pc38.cyan(roleName)} with latest permissions?`,
28394
28085
  initialValue: true
28395
28086
  });
28396
28087
  if (isCancel21(shouldContinue) || !shouldContinue) {
@@ -28474,53 +28165,53 @@ Run ${pc39.cyan("wraps email init")} to deploy infrastructure first.
28474
28165
  });
28475
28166
  return;
28476
28167
  }
28477
- outro20(pc39.green(`\u2713 Platform access role ${actionVerb} successfully`));
28168
+ outro20(pc38.green(`\u2713 Platform access role ${actionVerb} successfully`));
28478
28169
  console.log(`
28479
- ${pc39.bold("Permissions:")}`);
28170
+ ${pc38.bold("Permissions:")}`);
28480
28171
  console.log(`
28481
- ${pc39.bold(pc39.cyan("Email:"))}`);
28172
+ ${pc38.bold(pc38.cyan("Email:"))}`);
28482
28173
  console.log(
28483
- ` ${pc39.green("\u2713")} SES metrics and identity verification (always enabled)`
28174
+ ` ${pc38.green("\u2713")} SES metrics and identity verification (always enabled)`
28484
28175
  );
28485
- console.log(` ${pc39.green("\u2713")} SES template management (always enabled)`);
28486
- console.log(` ${pc39.green("\u2713")} Inbound bucket detection (always enabled)`);
28176
+ console.log(` ${pc38.green("\u2713")} SES template management (always enabled)`);
28177
+ console.log(` ${pc38.green("\u2713")} Inbound bucket detection (always enabled)`);
28487
28178
  if (sendingEnabled) {
28488
- console.log(` ${pc39.green("\u2713")} Email sending via SES`);
28179
+ console.log(` ${pc38.green("\u2713")} Email sending via SES`);
28489
28180
  }
28490
28181
  if (eventTracking?.dynamoDBHistory) {
28491
28182
  console.log(
28492
- ` ${pc39.green("\u2713")} DynamoDB read access (including DescribeTable)`
28183
+ ` ${pc38.green("\u2713")} DynamoDB read access (including DescribeTable)`
28493
28184
  );
28494
28185
  }
28495
28186
  if (eventTracking?.enabled) {
28496
- console.log(` ${pc39.green("\u2713")} EventBridge and SQS access`);
28187
+ console.log(` ${pc38.green("\u2713")} EventBridge and SQS access`);
28497
28188
  }
28498
28189
  if (emailArchiving?.enabled) {
28499
- console.log(` ${pc39.green("\u2713")} Mail Manager Archive access`);
28190
+ console.log(` ${pc38.green("\u2713")} Mail Manager Archive access`);
28500
28191
  }
28501
28192
  const inbound = emailConfig?.inbound;
28502
28193
  if (inbound?.enabled) {
28503
- console.log(` ${pc39.green("\u2713")} S3 access for inbound email`);
28194
+ console.log(` ${pc38.green("\u2713")} S3 access for inbound email`);
28504
28195
  }
28505
28196
  if (smsEnabled) {
28506
28197
  console.log(`
28507
- ${pc39.bold(pc39.cyan("SMS:"))}`);
28198
+ ${pc38.bold(pc38.cyan("SMS:"))}`);
28508
28199
  console.log(
28509
- ` ${pc39.green("\u2713")} SMS Voice V2 read access (phone numbers, config, registrations)`
28200
+ ` ${pc38.green("\u2713")} SMS Voice V2 read access (phone numbers, config, registrations)`
28510
28201
  );
28511
28202
  if (smsSendingEnabled) {
28512
- console.log(` ${pc39.green("\u2713")} SMS sending via SMS Voice V2`);
28203
+ console.log(` ${pc38.green("\u2713")} SMS sending via SMS Voice V2`);
28513
28204
  }
28514
28205
  if (smsEventTracking?.dynamoDBHistory) {
28515
- console.log(` ${pc39.green("\u2713")} DynamoDB read access for SMS history`);
28206
+ console.log(` ${pc38.green("\u2713")} DynamoDB read access for SMS history`);
28516
28207
  }
28517
28208
  if (smsEventTracking?.enabled) {
28518
- console.log(` ${pc39.green("\u2713")} SNS topic access for SMS events`);
28209
+ console.log(` ${pc38.green("\u2713")} SNS topic access for SMS events`);
28519
28210
  }
28520
28211
  }
28521
28212
  console.log(
28522
28213
  `
28523
- ${pc39.dim(`The Wraps Platform will now have ${actionVerb} permissions for feature detection.`)}
28214
+ ${pc38.dim(`The Wraps Platform will now have ${actionVerb} permissions for feature detection.`)}
28524
28215
  `
28525
28216
  );
28526
28217
  }
@@ -28715,7 +28406,7 @@ import * as clack36 from "@clack/prompts";
28715
28406
  import * as pulumi22 from "@pulumi/pulumi";
28716
28407
  import getPort from "get-port";
28717
28408
  import open2 from "open";
28718
- import pc40 from "picocolors";
28409
+ import pc39 from "picocolors";
28719
28410
 
28720
28411
  // src/console/server.ts
28721
28412
  init_esm_shims();
@@ -29905,13 +29596,13 @@ function createMetricsRouter(config2) {
29905
29596
  const router = createRouter5();
29906
29597
  router.get("/stream", async (req, res) => {
29907
29598
  const connectionId = randomUUID().slice(0, 8);
29908
- const log48 = (msg, data) => {
29599
+ const log47 = (msg, data) => {
29909
29600
  console.log(JSON.stringify({ connectionId, msg, ...data }));
29910
29601
  };
29911
29602
  res.setHeader("Content-Type", "text/event-stream");
29912
29603
  res.setHeader("Cache-Control", "no-cache");
29913
29604
  res.setHeader("Connection", "keep-alive");
29914
- log48("SSE connected");
29605
+ log47("SSE connected");
29915
29606
  res.write('data: {"type":"connected"}\n\n');
29916
29607
  const { startTime, endTime } = req.query;
29917
29608
  const getTimeRange = () => ({
@@ -29921,7 +29612,7 @@ function createMetricsRouter(config2) {
29921
29612
  const sendMetrics = async () => {
29922
29613
  try {
29923
29614
  const timeRange = getTimeRange();
29924
- log48("Fetching metrics", {
29615
+ log47("Fetching metrics", {
29925
29616
  start: timeRange.start.toISOString(),
29926
29617
  end: timeRange.end.toISOString()
29927
29618
  });
@@ -29934,7 +29625,7 @@ function createMetricsRouter(config2) {
29934
29625
  ),
29935
29626
  fetchSendQuota(config2.roleArn, config2.region)
29936
29627
  ]);
29937
- log48("Metrics fetched successfully");
29628
+ log47("Metrics fetched successfully");
29938
29629
  const data = {
29939
29630
  type: "metrics",
29940
29631
  timestamp: Date.now(),
@@ -29964,7 +29655,7 @@ function createMetricsRouter(config2) {
29964
29655
  const interval = setInterval(sendMetrics, 6e4);
29965
29656
  req.on("close", () => {
29966
29657
  clearInterval(interval);
29967
- log48("SSE disconnected");
29658
+ log47("SSE disconnected");
29968
29659
  });
29969
29660
  });
29970
29661
  router.get("/snapshot", async (_req, res) => {
@@ -31342,7 +31033,7 @@ init_fs();
31342
31033
  init_metadata();
31343
31034
  init_output();
31344
31035
  async function dashboard(options) {
31345
- clack36.intro(pc40.bold("Wraps Dashboard"));
31036
+ clack36.intro(pc39.bold("Wraps Dashboard"));
31346
31037
  const progress = new DeploymentProgress();
31347
31038
  const identity = await progress.execute(
31348
31039
  "Validating AWS credentials",
@@ -31385,7 +31076,7 @@ async function dashboard(options) {
31385
31076
  progress.stop();
31386
31077
  clack36.log.error("No Wraps infrastructure found");
31387
31078
  console.log(
31388
- `\\nRun ${pc40.cyan("wraps email init")}, ${pc40.cyan("wraps sms init")}, or ${pc40.cyan("wraps storage init")} to deploy infrastructure first.\\n`
31079
+ `\\nRun ${pc39.cyan("wraps email init")}, ${pc39.cyan("wraps sms init")}, or ${pc39.cyan("wraps storage init")} to deploy infrastructure first.\\n`
31389
31080
  );
31390
31081
  process.exit(1);
31391
31082
  }
@@ -31429,7 +31120,7 @@ async function dashboard(options) {
31429
31120
  progress.stop();
31430
31121
  clack36.log.success("Starting dashboard server...");
31431
31122
  console.log(
31432
- `${pc40.dim("Using current AWS credentials (no role assumption)")}\\n`
31123
+ `${pc39.dim("Using current AWS credentials (no role assumption)")}\\n`
31433
31124
  );
31434
31125
  const { url } = await startConsoleServer({
31435
31126
  port,
@@ -31462,8 +31153,8 @@ async function dashboard(options) {
31462
31153
  cdnCustomDomain,
31463
31154
  cdnCertificateArn
31464
31155
  });
31465
- console.log(`\\n${pc40.bold("Dashboard:")} ${pc40.cyan(url)}`);
31466
- console.log(`${pc40.dim("Press Ctrl+C to stop")}\\n`);
31156
+ console.log(`\\n${pc39.bold("Dashboard:")} ${pc39.cyan(url)}`);
31157
+ console.log(`${pc39.dim("Press Ctrl+C to stop")}\\n`);
31467
31158
  getTelemetryClient().showFooterOnce();
31468
31159
  if (!options.noOpen) {
31469
31160
  await open2(url);
@@ -31485,7 +31176,7 @@ init_errors();
31485
31176
  init_json_output();
31486
31177
  init_metadata();
31487
31178
  import * as clack37 from "@clack/prompts";
31488
- import pc41 from "picocolors";
31179
+ import pc40 from "picocolors";
31489
31180
  async function destroy(options) {
31490
31181
  trackCommand("destroy", { success: true });
31491
31182
  if (isJsonMode() && !options.force) {
@@ -31496,7 +31187,7 @@ async function destroy(options) {
31496
31187
  );
31497
31188
  }
31498
31189
  if (!isJsonMode()) {
31499
- clack37.intro(pc41.bold("Wraps Infrastructure Teardown"));
31190
+ clack37.intro(pc40.bold("Wraps Infrastructure Teardown"));
31500
31191
  }
31501
31192
  const spinner10 = clack37.spinner();
31502
31193
  spinner10.start("Validating AWS credentials");
@@ -31518,14 +31209,14 @@ async function destroy(options) {
31518
31209
  clack37.log.warn("No Wraps services found in this region");
31519
31210
  console.log(
31520
31211
  `
31521
- Run ${pc41.cyan("wraps email init")} to deploy infrastructure.
31212
+ Run ${pc40.cyan("wraps email init")} to deploy infrastructure.
31522
31213
  `
31523
31214
  );
31524
31215
  process.exit(0);
31525
31216
  }
31526
31217
  if (deployedServices.length === 1) {
31527
31218
  const service = deployedServices[0];
31528
- clack37.log.info(`Found ${pc41.cyan(service)} service deployed`);
31219
+ clack37.log.info(`Found ${pc40.cyan(service)} service deployed`);
31529
31220
  if (service === "email") {
31530
31221
  await emailDestroy(options);
31531
31222
  return;
@@ -31563,7 +31254,7 @@ Run ${pc41.cyan("wraps email init")} to deploy infrastructure.
31563
31254
  await emailDestroy(options);
31564
31255
  }
31565
31256
  if (serviceToDestroy === "all") {
31566
- clack37.outro(pc41.green("All Wraps infrastructure has been removed"));
31257
+ clack37.outro(pc40.green("All Wraps infrastructure has been removed"));
31567
31258
  }
31568
31259
  }
31569
31260
 
@@ -31576,23 +31267,23 @@ init_json_output();
31576
31267
  init_output();
31577
31268
  import * as clack38 from "@clack/prompts";
31578
31269
  import * as pulumi23 from "@pulumi/pulumi";
31579
- import pc42 from "picocolors";
31270
+ import pc41 from "picocolors";
31580
31271
  async function status(_options) {
31581
31272
  const startTime = Date.now();
31582
31273
  const progress = new DeploymentProgress();
31583
31274
  if (!isJsonMode()) {
31584
- clack38.intro(pc42.bold("Wraps Infrastructure Status"));
31275
+ clack38.intro(pc41.bold("Wraps Infrastructure Status"));
31585
31276
  }
31586
31277
  const identity = await progress.execute(
31587
31278
  "Loading infrastructure status",
31588
31279
  async () => validateAWSCredentials()
31589
31280
  );
31590
31281
  if (!isJsonMode()) {
31591
- progress.info(`AWS Account: ${pc42.cyan(identity.accountId)}`);
31282
+ progress.info(`AWS Account: ${pc41.cyan(identity.accountId)}`);
31592
31283
  }
31593
31284
  const region = await getAWSRegion();
31594
31285
  if (!isJsonMode()) {
31595
- progress.info(`Region: ${pc42.cyan(region)}`);
31286
+ progress.info(`Region: ${pc41.cyan(region)}`);
31596
31287
  }
31597
31288
  const services = [];
31598
31289
  try {
@@ -31647,32 +31338,32 @@ async function status(_options) {
31647
31338
  clack38.note(
31648
31339
  services.map((s) => {
31649
31340
  if (s.status === "deployed") {
31650
- const details = s.details ? pc42.dim(` (${s.details})`) : "";
31651
- return ` ${pc42.green("\u2713")} ${s.name}${details}`;
31341
+ const details = s.details ? pc41.dim(` (${s.details})`) : "";
31342
+ return ` ${pc41.green("\u2713")} ${s.name}${details}`;
31652
31343
  }
31653
- return ` ${pc42.dim("\u25CB")} ${s.name} ${pc42.dim("(not deployed)")}`;
31344
+ return ` ${pc41.dim("\u25CB")} ${s.name} ${pc41.dim("(not deployed)")}`;
31654
31345
  }).join("\n"),
31655
31346
  "Services"
31656
31347
  );
31657
31348
  const hasDeployedServices = services.some((s) => s.status === "deployed");
31658
31349
  if (hasDeployedServices) {
31659
31350
  console.log(`
31660
- ${pc42.bold("Details:")}`);
31351
+ ${pc41.bold("Details:")}`);
31661
31352
  if (services.find((s) => s.name === "Email")?.status === "deployed") {
31662
- console.log(` ${pc42.dim("Email:")} ${pc42.cyan("wraps email status")}`);
31353
+ console.log(` ${pc41.dim("Email:")} ${pc41.cyan("wraps email status")}`);
31663
31354
  }
31664
31355
  if (services.find((s) => s.name === "SMS")?.status === "deployed") {
31665
- console.log(` ${pc42.dim("SMS:")} ${pc42.cyan("wraps sms status")}`);
31356
+ console.log(` ${pc41.dim("SMS:")} ${pc41.cyan("wraps sms status")}`);
31666
31357
  }
31667
31358
  } else {
31668
31359
  console.log(`
31669
- ${pc42.bold("Get started:")}`);
31670
- console.log(` ${pc42.dim("Deploy email:")} ${pc42.cyan("wraps email init")}`);
31671
- console.log(` ${pc42.dim("Deploy SMS:")} ${pc42.cyan("wraps sms init")}`);
31360
+ ${pc41.bold("Get started:")}`);
31361
+ console.log(` ${pc41.dim("Deploy email:")} ${pc41.cyan("wraps email init")}`);
31362
+ console.log(` ${pc41.dim("Deploy SMS:")} ${pc41.cyan("wraps sms init")}`);
31672
31363
  }
31673
31364
  console.log(`
31674
- ${pc42.bold("Dashboard:")} ${pc42.blue("https://app.wraps.dev")}`);
31675
- console.log(`${pc42.bold("Docs:")} ${pc42.blue("https://wraps.dev/docs")}
31365
+ ${pc41.bold("Dashboard:")} ${pc41.blue("https://app.wraps.dev")}`);
31366
+ console.log(`${pc41.bold("Docs:")} ${pc41.blue("https://wraps.dev/docs")}
31676
31367
  `);
31677
31368
  trackCommand("status", {
31678
31369
  success: true,
@@ -31685,7 +31376,7 @@ ${pc42.bold("Dashboard:")} ${pc42.blue("https://app.wraps.dev")}`);
31685
31376
  init_esm_shims();
31686
31377
  import * as clack39 from "@clack/prompts";
31687
31378
  import * as pulumi25 from "@pulumi/pulumi";
31688
- import pc43 from "picocolors";
31379
+ import pc42 from "picocolors";
31689
31380
 
31690
31381
  // src/infrastructure/sms-stack.ts
31691
31382
  init_esm_shims();
@@ -32377,18 +32068,18 @@ async function createSMSProtectConfigurationWithSDK(configurationSetName, region
32377
32068
  const existing = await client.send(
32378
32069
  new DescribeProtectConfigurationsCommand({})
32379
32070
  );
32380
- for (const pc55 of existing.ProtectConfigurations || []) {
32381
- if (!(pc55.ProtectConfigurationArn && pc55.ProtectConfigurationId)) {
32071
+ for (const pc54 of existing.ProtectConfigurations || []) {
32072
+ if (!(pc54.ProtectConfigurationArn && pc54.ProtectConfigurationId)) {
32382
32073
  continue;
32383
32074
  }
32384
32075
  const tagsResponse = await client.send(
32385
32076
  new ListTagsForResourceCommand({
32386
- ResourceArn: pc55.ProtectConfigurationArn
32077
+ ResourceArn: pc54.ProtectConfigurationArn
32387
32078
  })
32388
32079
  );
32389
32080
  const nameTag = tagsResponse.Tags?.find((t) => t.Key === "Name");
32390
32081
  if (nameTag?.Value === protectConfigName) {
32391
- existingProtectConfigId = pc55.ProtectConfigurationId;
32082
+ existingProtectConfigId = pc54.ProtectConfigurationId;
32392
32083
  break;
32393
32084
  }
32394
32085
  }
@@ -32484,13 +32175,13 @@ async function deleteSMSProtectConfigurationWithSDK(region) {
32484
32175
  new DescribeProtectConfigurationsCommand({})
32485
32176
  );
32486
32177
  if (existing.ProtectConfigurations) {
32487
- for (const pc55 of existing.ProtectConfigurations) {
32488
- if (!(pc55.ProtectConfigurationArn && pc55.ProtectConfigurationId)) {
32178
+ for (const pc54 of existing.ProtectConfigurations) {
32179
+ if (!(pc54.ProtectConfigurationArn && pc54.ProtectConfigurationId)) {
32489
32180
  continue;
32490
32181
  }
32491
32182
  const tagsResponse = await client.send(
32492
32183
  new ListTagsForResourceCommand({
32493
- ResourceArn: pc55.ProtectConfigurationArn
32184
+ ResourceArn: pc54.ProtectConfigurationArn
32494
32185
  })
32495
32186
  );
32496
32187
  const isWrapsManaged = tagsResponse.Tags?.some(
@@ -32499,7 +32190,7 @@ async function deleteSMSProtectConfigurationWithSDK(region) {
32499
32190
  if (isWrapsManaged) {
32500
32191
  await client.send(
32501
32192
  new DeleteProtectConfigurationCommand({
32502
- ProtectConfigurationId: pc55.ProtectConfigurationId
32193
+ ProtectConfigurationId: pc54.ProtectConfigurationId
32503
32194
  })
32504
32195
  );
32505
32196
  }
@@ -32533,7 +32224,7 @@ async function smsDestroy(options) {
32533
32224
  }
32534
32225
  if (!isJsonMode()) {
32535
32226
  clack39.intro(
32536
- pc43.bold(
32227
+ pc42.bold(
32537
32228
  options.preview ? "SMS Infrastructure Destruction Preview" : "SMS Infrastructure Teardown"
32538
32229
  )
32539
32230
  );
@@ -32583,7 +32274,7 @@ async function smsDestroy(options) {
32583
32274
  }
32584
32275
  if (!(options.force || options.preview)) {
32585
32276
  const confirmed = await clack39.confirm({
32586
- message: pc43.red(
32277
+ message: pc42.red(
32587
32278
  "Are you sure you want to destroy all SMS infrastructure?"
32588
32279
  ),
32589
32280
  initialValue: false
@@ -32622,7 +32313,7 @@ async function smsDestroy(options) {
32622
32313
  commandName: "wraps sms destroy"
32623
32314
  });
32624
32315
  clack39.outro(
32625
- pc43.green("Preview complete. Run without --preview to destroy.")
32316
+ pc42.green("Preview complete. Run without --preview to destroy.")
32626
32317
  );
32627
32318
  trackServiceRemoved("sms", {
32628
32319
  preview: true,
@@ -32719,20 +32410,20 @@ async function smsDestroy(options) {
32719
32410
  }
32720
32411
  if (destroyFailed) {
32721
32412
  clack39.outro(
32722
- pc43.yellow("SMS infrastructure partially removed. Metadata cleaned up.")
32413
+ pc42.yellow("SMS infrastructure partially removed. Metadata cleaned up.")
32723
32414
  );
32724
32415
  } else {
32725
- clack39.outro(pc43.green("SMS infrastructure has been removed"));
32416
+ clack39.outro(pc42.green("SMS infrastructure has been removed"));
32726
32417
  console.log(`
32727
- ${pc43.bold("Cleaned up:")}`);
32728
- console.log(` ${pc43.green("\u2713")} Phone number released`);
32729
- console.log(` ${pc43.green("\u2713")} Configuration set deleted`);
32730
- console.log(` ${pc43.green("\u2713")} Event processing infrastructure removed`);
32731
- console.log(` ${pc43.green("\u2713")} IAM role deleted`);
32418
+ ${pc42.bold("Cleaned up:")}`);
32419
+ console.log(` ${pc42.green("\u2713")} Phone number released`);
32420
+ console.log(` ${pc42.green("\u2713")} Configuration set deleted`);
32421
+ console.log(` ${pc42.green("\u2713")} Event processing infrastructure removed`);
32422
+ console.log(` ${pc42.green("\u2713")} IAM role deleted`);
32732
32423
  }
32733
32424
  console.log(
32734
32425
  `
32735
- Run ${pc43.cyan("wraps sms init")} to deploy infrastructure again.
32426
+ Run ${pc42.cyan("wraps sms init")} to deploy infrastructure again.
32736
32427
  `
32737
32428
  );
32738
32429
  trackServiceRemoved("sms", {
@@ -32746,7 +32437,7 @@ Run ${pc43.cyan("wraps sms init")} to deploy infrastructure again.
32746
32437
  init_esm_shims();
32747
32438
  import * as clack40 from "@clack/prompts";
32748
32439
  import * as pulumi26 from "@pulumi/pulumi";
32749
- import pc44 from "picocolors";
32440
+ import pc43 from "picocolors";
32750
32441
  init_events();
32751
32442
  init_aws();
32752
32443
  init_errors();
@@ -33273,7 +32964,7 @@ async function promptEstimatedSMSVolume() {
33273
32964
  async function init3(options) {
33274
32965
  const startTime = Date.now();
33275
32966
  if (!isJsonMode()) {
33276
- clack40.intro(pc44.bold("Wraps SMS Infrastructure Setup"));
32967
+ clack40.intro(pc43.bold("Wraps SMS Infrastructure Setup"));
33277
32968
  }
33278
32969
  const progress = new DeploymentProgress();
33279
32970
  const wasAutoInstalled = await progress.execute(
@@ -33287,7 +32978,7 @@ async function init3(options) {
33287
32978
  "Validating AWS credentials",
33288
32979
  async () => validateAWSCredentials()
33289
32980
  );
33290
- progress.info(`Connected to AWS account: ${pc44.cyan(identity.accountId)}`);
32981
+ progress.info(`Connected to AWS account: ${pc43.cyan(identity.accountId)}`);
33291
32982
  const provider = options.provider || await promptProvider();
33292
32983
  const region = options.region || await promptRegion(await getAWSRegion());
33293
32984
  let vercelConfig;
@@ -33300,9 +32991,9 @@ async function init3(options) {
33300
32991
  );
33301
32992
  if (existingConnection?.services?.sms) {
33302
32993
  clack40.log.warn(
33303
- `SMS already configured for account ${pc44.cyan(identity.accountId)} in region ${pc44.cyan(region)}`
32994
+ `SMS already configured for account ${pc43.cyan(identity.accountId)} in region ${pc43.cyan(region)}`
33304
32995
  );
33305
- clack40.log.info(`Use ${pc44.cyan("wraps sms status")} to view current setup`);
32996
+ clack40.log.info(`Use ${pc43.cyan("wraps sms status")} to view current setup`);
33306
32997
  process.exit(0);
33307
32998
  }
33308
32999
  let preset = options.preset;
@@ -33344,7 +33035,7 @@ async function init3(options) {
33344
33035
  }
33345
33036
  progress.info(
33346
33037
  `
33347
- ${pc44.bold("Fraud Protection")} - Block SMS to countries where you don't do business`
33038
+ ${pc43.bold("Fraud Protection")} - Block SMS to countries where you don't do business`
33348
33039
  );
33349
33040
  const allowedCountries = await promptAllowedCountries();
33350
33041
  let aitFiltering = false;
@@ -33366,13 +33057,13 @@ ${pc44.bold("Fraud Protection")} - Block SMS to countries where you don't do bus
33366
33057
  };
33367
33058
  const estimatedVolume = await promptEstimatedSMSVolume();
33368
33059
  progress.info(`
33369
- ${pc44.bold("Cost Estimate:")}`);
33060
+ ${pc43.bold("Cost Estimate:")}`);
33370
33061
  const costSummary = getSMSCostSummary(smsConfig, estimatedVolume);
33371
33062
  clack40.log.info(costSummary);
33372
33063
  const warnings = validateSMSConfig(smsConfig);
33373
33064
  if (warnings.length > 0) {
33374
33065
  progress.info(`
33375
- ${pc44.yellow(pc44.bold("Important Notes:"))}`);
33066
+ ${pc43.yellow(pc43.bold("Important Notes:"))}`);
33376
33067
  for (const warning of warnings) {
33377
33068
  clack40.log.warn(warning);
33378
33069
  }
@@ -33455,7 +33146,7 @@ ${pc44.yellow(pc44.bold("Important Notes:"))}`);
33455
33146
  const msg = sdkError instanceof Error ? sdkError.message : String(sdkError);
33456
33147
  clack40.log.warn(`Phone pool creation failed: ${msg}`);
33457
33148
  clack40.log.info(
33458
- `Run ${pc44.cyan("wraps sms sync")} to retry SDK resource creation.`
33149
+ `Run ${pc43.cyan("wraps sms sync")} to retry SDK resource creation.`
33459
33150
  );
33460
33151
  }
33461
33152
  }
@@ -33473,7 +33164,7 @@ ${pc44.yellow(pc44.bold("Important Notes:"))}`);
33473
33164
  const msg = sdkError instanceof Error ? sdkError.message : String(sdkError);
33474
33165
  clack40.log.warn(`Event destination creation failed: ${msg}`);
33475
33166
  clack40.log.info(
33476
- `Run ${pc44.cyan("wraps sms sync")} to retry SDK resource creation.`
33167
+ `Run ${pc43.cyan("wraps sms sync")} to retry SDK resource creation.`
33477
33168
  );
33478
33169
  }
33479
33170
  }
@@ -33494,7 +33185,7 @@ ${pc44.yellow(pc44.bold("Important Notes:"))}`);
33494
33185
  const msg = sdkError instanceof Error ? sdkError.message : String(sdkError);
33495
33186
  clack40.log.warn(`Protect configuration creation failed: ${msg}`);
33496
33187
  clack40.log.info(
33497
- `Run ${pc44.cyan("wraps sms sync")} to retry SDK resource creation.`
33188
+ `Run ${pc43.cyan("wraps sms sync")} to retry SDK resource creation.`
33498
33189
  );
33499
33190
  }
33500
33191
  }
@@ -33548,47 +33239,47 @@ ${pc44.yellow(pc44.bold("Important Notes:"))}`);
33548
33239
  return;
33549
33240
  }
33550
33241
  console.log("\n");
33551
- clack40.log.success(pc44.green(pc44.bold("SMS infrastructure deployed!")));
33242
+ clack40.log.success(pc43.green(pc43.bold("SMS infrastructure deployed!")));
33552
33243
  console.log("\n");
33553
33244
  clack40.note(
33554
33245
  [
33555
- `${pc44.bold("Phone Number:")} ${pc44.cyan(outputs.phoneNumber || "Provisioning...")}`,
33556
- `${pc44.bold("Phone Type:")} ${pc44.cyan(smsConfig.phoneNumberType || "simulator")}`,
33557
- `${pc44.bold("Config Set:")} ${pc44.cyan(outputs.configSetName || "wraps-sms-config")}`,
33558
- `${pc44.bold("Region:")} ${pc44.cyan(outputs.region)}`,
33559
- outputs.tableName ? `${pc44.bold("History Table:")} ${pc44.cyan(outputs.tableName)}` : "",
33246
+ `${pc43.bold("Phone Number:")} ${pc43.cyan(outputs.phoneNumber || "Provisioning...")}`,
33247
+ `${pc43.bold("Phone Type:")} ${pc43.cyan(smsConfig.phoneNumberType || "simulator")}`,
33248
+ `${pc43.bold("Config Set:")} ${pc43.cyan(outputs.configSetName || "wraps-sms-config")}`,
33249
+ `${pc43.bold("Region:")} ${pc43.cyan(outputs.region)}`,
33250
+ outputs.tableName ? `${pc43.bold("History Table:")} ${pc43.cyan(outputs.tableName)}` : "",
33560
33251
  "",
33561
- pc44.dim("IAM Role:"),
33562
- pc44.dim(` ${outputs.roleArn}`)
33252
+ pc43.dim("IAM Role:"),
33253
+ pc43.dim(` ${outputs.roleArn}`)
33563
33254
  ].filter(Boolean).join("\n"),
33564
33255
  "SMS Infrastructure"
33565
33256
  );
33566
33257
  const nextSteps = [];
33567
33258
  if (smsConfig.phoneNumberType === "toll-free") {
33568
33259
  nextSteps.push(
33569
- `${pc44.cyan("wraps sms register")} - Submit toll-free registration (required before sending)`
33260
+ `${pc43.cyan("wraps sms register")} - Submit toll-free registration (required before sending)`
33570
33261
  );
33571
33262
  }
33572
33263
  nextSteps.push(
33573
- `${pc44.cyan("wraps sms test --to +1234567890")} - Send a test message`
33264
+ `${pc43.cyan("wraps sms test --to +1234567890")} - Send a test message`
33574
33265
  );
33575
- nextSteps.push(`${pc44.cyan("wraps sms status")} - View SMS configuration`);
33266
+ nextSteps.push(`${pc43.cyan("wraps sms status")} - View SMS configuration`);
33576
33267
  console.log("\n");
33577
- clack40.log.info(pc44.bold("Next steps:"));
33268
+ clack40.log.info(pc43.bold("Next steps:"));
33578
33269
  for (const step of nextSteps) {
33579
33270
  console.log(` ${step}`);
33580
33271
  }
33581
33272
  console.log("\n");
33582
- clack40.log.info(pc44.bold("SDK Usage:"));
33583
- console.log(pc44.dim(" npm install @wraps.dev/sms"));
33273
+ clack40.log.info(pc43.bold("SDK Usage:"));
33274
+ console.log(pc43.dim(" npm install @wraps.dev/sms"));
33584
33275
  console.log("");
33585
- console.log(pc44.dim(" import { Wraps } from '@wraps.dev/sms';"));
33586
- console.log(pc44.dim(" const wraps = new Wraps();"));
33587
- console.log(pc44.dim(" await wraps.sms.send({"));
33588
- console.log(pc44.dim(" to: '+14155551234',"));
33589
- console.log(pc44.dim(" message: 'Your code is 123456',"));
33590
- console.log(pc44.dim(" });"));
33591
- clack40.outro(pc44.green("Setup complete!"));
33276
+ console.log(pc43.dim(" import { Wraps } from '@wraps.dev/sms';"));
33277
+ console.log(pc43.dim(" const wraps = new Wraps();"));
33278
+ console.log(pc43.dim(" await wraps.sms.send({"));
33279
+ console.log(pc43.dim(" to: '+14155551234',"));
33280
+ console.log(pc43.dim(" message: 'Your code is 123456',"));
33281
+ console.log(pc43.dim(" });"));
33282
+ clack40.outro(pc43.green("Setup complete!"));
33592
33283
  const duration = Date.now() - startTime;
33593
33284
  const enabledFeatures = [];
33594
33285
  if (smsConfig.tracking?.enabled) {
@@ -33625,7 +33316,7 @@ init_json_output();
33625
33316
  init_metadata();
33626
33317
  init_output();
33627
33318
  import * as clack41 from "@clack/prompts";
33628
- import pc45 from "picocolors";
33319
+ import pc44 from "picocolors";
33629
33320
  async function getPhoneNumberDetails(region) {
33630
33321
  const { PinpointSMSVoiceV2Client: PinpointSMSVoiceV2Client5, DescribePhoneNumbersCommand: DescribePhoneNumbersCommand2 } = await import("@aws-sdk/client-pinpoint-sms-voice-v2");
33631
33322
  const client = new PinpointSMSVoiceV2Client5({ region });
@@ -33666,7 +33357,7 @@ async function getRegistrationStatus(region, registrationId) {
33666
33357
  async function smsRegister(options) {
33667
33358
  const startTime = Date.now();
33668
33359
  if (!isJsonMode()) {
33669
- clack41.intro(pc45.bold("Wraps SMS - Toll-Free Registration"));
33360
+ clack41.intro(pc44.bold("Wraps SMS - Toll-Free Registration"));
33670
33361
  }
33671
33362
  const progress = new DeploymentProgress();
33672
33363
  const identity = await progress.execute(
@@ -33680,7 +33371,7 @@ async function smsRegister(options) {
33680
33371
  const metadata = await loadConnectionMetadata(identity.accountId, region);
33681
33372
  if (!metadata?.services?.sms) {
33682
33373
  clack41.log.error("No SMS infrastructure found.");
33683
- clack41.log.info(`Run ${pc45.cyan("wraps sms init")} first.`);
33374
+ clack41.log.info(`Run ${pc44.cyan("wraps sms init")} first.`);
33684
33375
  process.exit(1);
33685
33376
  }
33686
33377
  const phoneDetails = await progress.execute(
@@ -33714,14 +33405,14 @@ async function smsRegister(options) {
33714
33405
  }
33715
33406
  console.log("");
33716
33407
  console.log(
33717
- `${pc45.bold("Phone Number:")} ${pc45.cyan(phoneDetails.phoneNumber)}`
33408
+ `${pc44.bold("Phone Number:")} ${pc44.cyan(phoneDetails.phoneNumber)}`
33718
33409
  );
33719
- console.log(`${pc45.bold("Type:")} ${pc45.cyan(phoneDetails.type)}`);
33410
+ console.log(`${pc44.bold("Type:")} ${pc44.cyan(phoneDetails.type)}`);
33720
33411
  console.log(
33721
- `${pc45.bold("Status:")} ${phoneDetails.status === "ACTIVE" ? pc45.green(phoneDetails.status) : pc45.yellow(phoneDetails.status)}`
33412
+ `${pc44.bold("Status:")} ${phoneDetails.status === "ACTIVE" ? pc44.green(phoneDetails.status) : pc44.yellow(phoneDetails.status)}`
33722
33413
  );
33723
33414
  if (registrationStatus) {
33724
- console.log(`${pc45.bold("Registration:")} ${pc45.cyan(registrationStatus)}`);
33415
+ console.log(`${pc44.bold("Registration:")} ${pc44.cyan(registrationStatus)}`);
33725
33416
  }
33726
33417
  console.log("");
33727
33418
  if (phoneDetails.status === "ACTIVE") {
@@ -33739,21 +33430,21 @@ async function smsRegister(options) {
33739
33430
  clack41.log.info(`Your ${phoneDetails.type} number should be ready to use.`);
33740
33431
  process.exit(0);
33741
33432
  }
33742
- console.log(pc45.bold("Toll-Free Registration Required"));
33433
+ console.log(pc44.bold("Toll-Free Registration Required"));
33743
33434
  console.log("");
33744
33435
  console.log(
33745
- pc45.dim("To send SMS at scale, you must register your toll-free number.")
33436
+ pc44.dim("To send SMS at scale, you must register your toll-free number.")
33746
33437
  );
33747
- console.log(pc45.dim("This process typically takes 1-15 business days."));
33438
+ console.log(pc44.dim("This process typically takes 1-15 business days."));
33748
33439
  console.log("");
33749
- console.log(pc45.bold("You'll need to provide:"));
33750
- console.log(` ${pc45.dim("\u2022")} Business name and address`);
33440
+ console.log(pc44.bold("You'll need to provide:"));
33441
+ console.log(` ${pc44.dim("\u2022")} Business name and address`);
33751
33442
  console.log(
33752
- ` ${pc45.dim("\u2022")} Use case description (what messages you're sending)`
33443
+ ` ${pc44.dim("\u2022")} Use case description (what messages you're sending)`
33753
33444
  );
33754
- console.log(` ${pc45.dim("\u2022")} Sample messages (2-3 examples)`);
33755
- console.log(` ${pc45.dim("\u2022")} How users opt-in to receive messages`);
33756
- console.log(` ${pc45.dim("\u2022")} Expected monthly message volume`);
33445
+ console.log(` ${pc44.dim("\u2022")} Sample messages (2-3 examples)`);
33446
+ console.log(` ${pc44.dim("\u2022")} How users opt-in to receive messages`);
33447
+ console.log(` ${pc44.dim("\u2022")} Expected monthly message volume`);
33757
33448
  console.log("");
33758
33449
  const openConsole = await clack41.confirm({
33759
33450
  message: "Open AWS Console to start registration?",
@@ -33778,33 +33469,33 @@ async function smsRegister(options) {
33778
33469
  } catch {
33779
33470
  clack41.log.info("Open this URL in your browser:");
33780
33471
  console.log(`
33781
- ${pc45.cyan(consoleUrl)}
33472
+ ${pc44.cyan(consoleUrl)}
33782
33473
  `);
33783
33474
  }
33784
33475
  }
33785
33476
  console.log("");
33786
- console.log(pc45.bold("Next Steps:"));
33477
+ console.log(pc44.bold("Next Steps:"));
33787
33478
  console.log(
33788
- ` 1. Click ${pc45.cyan("Create registration")} in the AWS Console`
33479
+ ` 1. Click ${pc44.cyan("Create registration")} in the AWS Console`
33789
33480
  );
33790
- console.log(` 2. Select ${pc45.cyan("Toll-free number registration")}`);
33481
+ console.log(` 2. Select ${pc44.cyan("Toll-free number registration")}`);
33791
33482
  console.log(" 3. Fill out the business information form");
33792
33483
  console.log(" 4. Submit and wait for approval (1-15 business days)");
33793
33484
  console.log("");
33794
33485
  console.log(
33795
- pc45.dim("Once approved, run `wraps sms sync` to complete setup.")
33486
+ pc44.dim("Once approved, run `wraps sms sync` to complete setup.")
33796
33487
  );
33797
33488
  } else {
33798
33489
  const consoleUrl = `https://${region}.console.aws.amazon.com/sms-voice/home?region=${region}#/registrations`;
33799
33490
  console.log("");
33800
33491
  console.log("When you're ready, go to:");
33801
- console.log(` ${pc45.cyan(consoleUrl)}`);
33492
+ console.log(` ${pc44.cyan(consoleUrl)}`);
33802
33493
  }
33803
33494
  trackCommand("sms:register", {
33804
33495
  success: true,
33805
33496
  duration_ms: Date.now() - startTime
33806
33497
  });
33807
- clack41.outro(pc45.dim("Good luck with your registration!"));
33498
+ clack41.outro(pc44.dim("Good luck with your registration!"));
33808
33499
  }
33809
33500
 
33810
33501
  // src/commands/sms/status.ts
@@ -33817,43 +33508,43 @@ init_metadata();
33817
33508
  init_output();
33818
33509
  import * as clack42 from "@clack/prompts";
33819
33510
  import * as pulumi27 from "@pulumi/pulumi";
33820
- import pc46 from "picocolors";
33511
+ import pc45 from "picocolors";
33821
33512
  function displaySMSStatus(options) {
33822
33513
  const lines = [];
33823
- lines.push(pc46.bold(pc46.green("SMS Infrastructure Active")));
33514
+ lines.push(pc45.bold(pc45.green("SMS Infrastructure Active")));
33824
33515
  lines.push("");
33825
- lines.push(pc46.bold("Phone Number"));
33516
+ lines.push(pc45.bold("Phone Number"));
33826
33517
  if (options.phoneNumber) {
33827
- lines.push(` Number: ${pc46.cyan(options.phoneNumber)}`);
33518
+ lines.push(` Number: ${pc45.cyan(options.phoneNumber)}`);
33828
33519
  } else {
33829
- lines.push(` Number: ${pc46.yellow("Provisioning...")}`);
33520
+ lines.push(` Number: ${pc45.yellow("Provisioning...")}`);
33830
33521
  }
33831
- lines.push(` Type: ${pc46.cyan(options.phoneNumberType || "simulator")}`);
33522
+ lines.push(` Type: ${pc45.cyan(options.phoneNumberType || "simulator")}`);
33832
33523
  lines.push("");
33833
- lines.push(pc46.bold("Configuration"));
33834
- lines.push(` Region: ${pc46.cyan(options.region)}`);
33524
+ lines.push(pc45.bold("Configuration"));
33525
+ lines.push(` Region: ${pc45.cyan(options.region)}`);
33835
33526
  if (options.preset) {
33836
- lines.push(` Preset: ${pc46.cyan(options.preset)}`);
33527
+ lines.push(` Preset: ${pc45.cyan(options.preset)}`);
33837
33528
  }
33838
33529
  if (options.configSetName) {
33839
- lines.push(` Config Set: ${pc46.cyan(options.configSetName)}`);
33530
+ lines.push(` Config Set: ${pc45.cyan(options.configSetName)}`);
33840
33531
  }
33841
33532
  lines.push("");
33842
- lines.push(pc46.bold("Features"));
33533
+ lines.push(pc45.bold("Features"));
33843
33534
  lines.push(
33844
- ` Event Tracking: ${options.eventTracking ? pc46.green("Enabled") : pc46.dim("Disabled")}`
33535
+ ` Event Tracking: ${options.eventTracking ? pc45.green("Enabled") : pc45.dim("Disabled")}`
33845
33536
  );
33846
33537
  if (options.tableName) {
33847
- lines.push(` Message History: ${pc46.green("Enabled")}`);
33848
- lines.push(` Table: ${pc46.dim(options.tableName)}`);
33538
+ lines.push(` Message History: ${pc45.green("Enabled")}`);
33539
+ lines.push(` Table: ${pc45.dim(options.tableName)}`);
33849
33540
  }
33850
33541
  if (options.queueUrl) {
33851
- lines.push(` Event Queue: ${pc46.green("Enabled")}`);
33542
+ lines.push(` Event Queue: ${pc45.green("Enabled")}`);
33852
33543
  }
33853
33544
  lines.push("");
33854
33545
  if (options.roleArn) {
33855
- lines.push(pc46.bold("IAM Role"));
33856
- lines.push(` ${pc46.dim(options.roleArn)}`);
33546
+ lines.push(pc45.bold("IAM Role"));
33547
+ lines.push(` ${pc45.dim(options.roleArn)}`);
33857
33548
  }
33858
33549
  clack42.note(lines.join("\n"), "SMS Status");
33859
33550
  }
@@ -33861,7 +33552,7 @@ async function smsStatus(_options) {
33861
33552
  const startTime = Date.now();
33862
33553
  const progress = new DeploymentProgress();
33863
33554
  if (!isJsonMode()) {
33864
- clack42.intro(pc46.bold("Wraps SMS Status"));
33555
+ clack42.intro(pc45.bold("Wraps SMS Status"));
33865
33556
  }
33866
33557
  const identity = await progress.execute(
33867
33558
  "Loading SMS infrastructure status",
@@ -33874,7 +33565,7 @@ async function smsStatus(_options) {
33874
33565
  clack42.log.error("No SMS infrastructure found");
33875
33566
  console.log(
33876
33567
  `
33877
- Run ${pc46.cyan("wraps sms init")} to deploy SMS infrastructure.
33568
+ Run ${pc45.cyan("wraps sms init")} to deploy SMS infrastructure.
33878
33569
  `
33879
33570
  );
33880
33571
  process.exit(1);
@@ -33910,25 +33601,25 @@ Run ${pc46.cyan("wraps sms init")} to deploy SMS infrastructure.
33910
33601
  }
33911
33602
  displaySMSStatus(smsStatusData);
33912
33603
  console.log("");
33913
- clack42.log.info(pc46.bold("Commands:"));
33604
+ clack42.log.info(pc45.bold("Commands:"));
33914
33605
  console.log(
33915
- ` ${pc46.cyan("wraps sms test --to +1234567890")} - Send a test message`
33606
+ ` ${pc45.cyan("wraps sms test --to +1234567890")} - Send a test message`
33916
33607
  );
33917
- console.log(` ${pc46.cyan("wraps sms destroy")} - Remove SMS infrastructure`);
33608
+ console.log(` ${pc45.cyan("wraps sms destroy")} - Remove SMS infrastructure`);
33918
33609
  trackCommand("sms:status", {
33919
33610
  success: true,
33920
33611
  phone_type: smsConfig?.phoneNumberType,
33921
33612
  event_tracking: smsConfig?.eventTracking?.enabled,
33922
33613
  duration_ms: Date.now() - startTime
33923
33614
  });
33924
- clack42.outro(pc46.dim("SMS infrastructure is ready"));
33615
+ clack42.outro(pc45.dim("SMS infrastructure is ready"));
33925
33616
  }
33926
33617
 
33927
33618
  // src/commands/sms/sync.ts
33928
33619
  init_esm_shims();
33929
33620
  import * as clack43 from "@clack/prompts";
33930
33621
  import * as pulumi28 from "@pulumi/pulumi";
33931
- import pc47 from "picocolors";
33622
+ import pc46 from "picocolors";
33932
33623
  init_events();
33933
33624
  init_aws();
33934
33625
  init_errors();
@@ -33939,7 +33630,7 @@ init_output();
33939
33630
  async function smsSync(options) {
33940
33631
  const startTime = Date.now();
33941
33632
  if (!isJsonMode()) {
33942
- clack43.intro(pc47.bold("Wraps SMS Infrastructure Sync"));
33633
+ clack43.intro(pc46.bold("Wraps SMS Infrastructure Sync"));
33943
33634
  }
33944
33635
  const progress = new DeploymentProgress();
33945
33636
  const identity = await progress.execute(
@@ -33954,7 +33645,7 @@ async function smsSync(options) {
33954
33645
  clack43.log.error("No SMS infrastructure found to sync");
33955
33646
  console.log(
33956
33647
  `
33957
- Run ${pc47.cyan("wraps sms init")} to deploy SMS infrastructure first.
33648
+ Run ${pc46.cyan("wraps sms init")} to deploy SMS infrastructure first.
33958
33649
  `
33959
33650
  );
33960
33651
  process.exit(1);
@@ -33963,10 +33654,10 @@ Run ${pc47.cyan("wraps sms init")} to deploy SMS infrastructure first.
33963
33654
  const storedStackName = smsService.pulumiStackName;
33964
33655
  progress.info("Found existing SMS configuration");
33965
33656
  progress.info(
33966
- `Phone type: ${pc47.cyan(smsConfig.phoneNumberType || "simulator")}`
33657
+ `Phone type: ${pc46.cyan(smsConfig.phoneNumberType || "simulator")}`
33967
33658
  );
33968
33659
  progress.info(
33969
- `Event tracking: ${pc47.cyan(smsConfig.eventTracking?.enabled ? "enabled" : "disabled")}`
33660
+ `Event tracking: ${pc46.cyan(smsConfig.eventTracking?.enabled ? "enabled" : "disabled")}`
33970
33661
  );
33971
33662
  if (!options.yes) {
33972
33663
  const confirmed = await clack43.confirm({
@@ -34099,7 +33790,7 @@ Run ${pc47.cyan("wraps sms init")} to deploy SMS infrastructure first.
34099
33790
  return;
34100
33791
  }
34101
33792
  console.log("\n");
34102
- clack43.log.success(pc47.green("SMS infrastructure synced successfully!"));
33793
+ clack43.log.success(pc46.green("SMS infrastructure synced successfully!"));
34103
33794
  const changes = [];
34104
33795
  if (outputs.lambdaFunctions?.length) {
34105
33796
  changes.push("Lambda functions updated");
@@ -34107,13 +33798,13 @@ Run ${pc47.cyan("wraps sms init")} to deploy SMS infrastructure first.
34107
33798
  changes.push("SDK resources verified");
34108
33799
  console.log("");
34109
33800
  for (const change of changes) {
34110
- console.log(` ${pc47.green("\u2713")} ${change}`);
33801
+ console.log(` ${pc46.green("\u2713")} ${change}`);
34111
33802
  }
34112
33803
  trackCommand("sms:sync", {
34113
33804
  success: true,
34114
33805
  duration_ms: Date.now() - startTime
34115
33806
  });
34116
- clack43.outro(pc47.green("Sync complete!"));
33807
+ clack43.outro(pc46.green("Sync complete!"));
34117
33808
  }
34118
33809
 
34119
33810
  // src/commands/sms/test.ts
@@ -34129,7 +33820,7 @@ import {
34129
33820
  SendTextMessageCommand
34130
33821
  } from "@aws-sdk/client-pinpoint-sms-voice-v2";
34131
33822
  import * as clack44 from "@clack/prompts";
34132
- import pc48 from "picocolors";
33823
+ import pc47 from "picocolors";
34133
33824
 
34134
33825
  // src/utils/sms/validation.ts
34135
33826
  init_esm_shims();
@@ -34152,7 +33843,7 @@ async function smsTest(options) {
34152
33843
  const startTime = Date.now();
34153
33844
  const progress = new DeploymentProgress();
34154
33845
  if (!isJsonMode()) {
34155
- clack44.intro(pc48.bold("Wraps SMS Test"));
33846
+ clack44.intro(pc47.bold("Wraps SMS Test"));
34156
33847
  }
34157
33848
  const identity = await progress.execute(
34158
33849
  "Validating AWS credentials",
@@ -34165,7 +33856,7 @@ async function smsTest(options) {
34165
33856
  clack44.log.error("No SMS infrastructure found");
34166
33857
  console.log(
34167
33858
  `
34168
- Run ${pc48.cyan("wraps sms init")} to deploy SMS infrastructure.
33859
+ Run ${pc47.cyan("wraps sms init")} to deploy SMS infrastructure.
34169
33860
  `
34170
33861
  );
34171
33862
  process.exit(1);
@@ -34294,16 +33985,16 @@ Run ${pc48.cyan("wraps sms init")} to deploy SMS infrastructure.
34294
33985
  return;
34295
33986
  }
34296
33987
  console.log("\n");
34297
- clack44.log.success(pc48.green("Test SMS sent successfully!"));
33988
+ clack44.log.success(pc47.green("Test SMS sent successfully!"));
34298
33989
  console.log("");
34299
33990
  clack44.note(
34300
33991
  [
34301
- `${pc48.bold("Message ID:")} ${pc48.cyan(messageId || "unknown")}`,
34302
- `${pc48.bold("To:")} ${pc48.cyan(toNumber)}`,
34303
- `${pc48.bold("Message:")} ${message}`,
34304
- `${pc48.bold("Type:")} ${pc48.cyan(smsConfig?.phoneNumberType || "simulator")}`,
33992
+ `${pc47.bold("Message ID:")} ${pc47.cyan(messageId || "unknown")}`,
33993
+ `${pc47.bold("To:")} ${pc47.cyan(toNumber)}`,
33994
+ `${pc47.bold("Message:")} ${message}`,
33995
+ `${pc47.bold("Type:")} ${pc47.cyan(smsConfig?.phoneNumberType || "simulator")}`,
34305
33996
  "",
34306
- pc48.dim(
33997
+ pc47.dim(
34307
33998
  smsConfig?.phoneNumberType === "simulator" ? "Note: Simulator messages are not actually delivered" : "Check your phone for the message!"
34308
33999
  )
34309
34000
  ].join("\n"),
@@ -34312,10 +34003,10 @@ Run ${pc48.cyan("wraps sms init")} to deploy SMS infrastructure.
34312
34003
  if (smsConfig?.eventTracking?.enabled) {
34313
34004
  console.log("");
34314
34005
  clack44.log.info(
34315
- pc48.dim("Event tracking is enabled. Check DynamoDB for delivery status.")
34006
+ pc47.dim("Event tracking is enabled. Check DynamoDB for delivery status.")
34316
34007
  );
34317
34008
  }
34318
- clack44.outro(pc48.green("Test complete!"));
34009
+ clack44.outro(pc47.green("Test complete!"));
34319
34010
  } catch (error) {
34320
34011
  progress.stop();
34321
34012
  const errorMessage = error instanceof Error ? error.message : String(error);
@@ -34340,7 +34031,7 @@ Run ${pc48.cyan("wraps sms init")} to deploy SMS infrastructure.
34340
34031
  clack44.log.error("Toll-free number registration is not complete");
34341
34032
  console.log(
34342
34033
  `
34343
- Run ${pc48.cyan("wraps sms register")} to check registration status.
34034
+ Run ${pc47.cyan("wraps sms register")} to check registration status.
34344
34035
  `
34345
34036
  );
34346
34037
  } else if (errorName === "AccessDeniedException") {
@@ -34349,7 +34040,7 @@ Run ${pc48.cyan("wraps sms register")} to check registration status.
34349
34040
  );
34350
34041
  console.log(
34351
34042
  `
34352
- Run ${pc48.cyan("wraps sms upgrade")} to update IAM policies.
34043
+ Run ${pc47.cyan("wraps sms upgrade")} to update IAM policies.
34353
34044
  `
34354
34045
  );
34355
34046
  } else {
@@ -34363,7 +34054,7 @@ Run ${pc48.cyan("wraps sms upgrade")} to update IAM policies.
34363
34054
  init_esm_shims();
34364
34055
  import * as clack45 from "@clack/prompts";
34365
34056
  import * as pulumi29 from "@pulumi/pulumi";
34366
- import pc49 from "picocolors";
34057
+ import pc48 from "picocolors";
34367
34058
  init_events();
34368
34059
  init_aws();
34369
34060
  init_errors();
@@ -34376,7 +34067,7 @@ async function smsUpgrade(options) {
34376
34067
  const startTime = Date.now();
34377
34068
  let upgradeAction = "";
34378
34069
  if (!isJsonMode()) {
34379
- clack45.intro(pc49.bold("Wraps SMS Upgrade - Enhance Your SMS Infrastructure"));
34070
+ clack45.intro(pc48.bold("Wraps SMS Upgrade - Enhance Your SMS Infrastructure"));
34380
34071
  }
34381
34072
  const progress = new DeploymentProgress();
34382
34073
  const wasAutoInstalled = await progress.execute(
@@ -34390,7 +34081,7 @@ async function smsUpgrade(options) {
34390
34081
  "Validating AWS credentials",
34391
34082
  async () => validateAWSCredentials()
34392
34083
  );
34393
- progress.info(`Connected to AWS account: ${pc49.cyan(identity.accountId)}`);
34084
+ progress.info(`Connected to AWS account: ${pc48.cyan(identity.accountId)}`);
34394
34085
  let region = options.region;
34395
34086
  if (!region) {
34396
34087
  const defaultRegion = await getAWSRegion();
@@ -34399,34 +34090,34 @@ async function smsUpgrade(options) {
34399
34090
  const metadata = await loadConnectionMetadata(identity.accountId, region);
34400
34091
  if (!metadata) {
34401
34092
  clack45.log.error(
34402
- `No Wraps connection found for account ${pc49.cyan(identity.accountId)} in region ${pc49.cyan(region)}`
34093
+ `No Wraps connection found for account ${pc48.cyan(identity.accountId)} in region ${pc48.cyan(region)}`
34403
34094
  );
34404
34095
  clack45.log.info(
34405
- `Use ${pc49.cyan("wraps sms init")} to create new infrastructure.`
34096
+ `Use ${pc48.cyan("wraps sms init")} to create new infrastructure.`
34406
34097
  );
34407
34098
  process.exit(1);
34408
34099
  }
34409
34100
  if (!metadata.services.sms) {
34410
34101
  clack45.log.error("No SMS infrastructure found");
34411
34102
  clack45.log.info(
34412
- `Use ${pc49.cyan("wraps sms init")} to deploy SMS infrastructure.`
34103
+ `Use ${pc48.cyan("wraps sms init")} to deploy SMS infrastructure.`
34413
34104
  );
34414
34105
  process.exit(1);
34415
34106
  }
34416
34107
  progress.info(`Found existing connection created: ${metadata.timestamp}`);
34417
34108
  console.log(`
34418
- ${pc49.bold("Current Configuration:")}
34109
+ ${pc48.bold("Current Configuration:")}
34419
34110
  `);
34420
34111
  if (metadata.services.sms.preset) {
34421
- console.log(` Preset: ${pc49.cyan(metadata.services.sms.preset)}`);
34112
+ console.log(` Preset: ${pc48.cyan(metadata.services.sms.preset)}`);
34422
34113
  } else {
34423
- console.log(` Preset: ${pc49.cyan("custom")}`);
34114
+ console.log(` Preset: ${pc48.cyan("custom")}`);
34424
34115
  }
34425
34116
  const config2 = metadata.services.sms.config;
34426
34117
  if (!config2) {
34427
34118
  clack45.log.error("No SMS configuration found in metadata");
34428
34119
  clack45.log.info(
34429
- `Use ${pc49.cyan("wraps sms init")} to create new infrastructure.`
34120
+ `Use ${pc48.cyan("wraps sms init")} to create new infrastructure.`
34430
34121
  );
34431
34122
  process.exit(1);
34432
34123
  }
@@ -34438,45 +34129,45 @@ ${pc49.bold("Current Configuration:")}
34438
34129
  "short-code": "Short code ($995+/mo, 100+ MPS)"
34439
34130
  };
34440
34131
  console.log(
34441
- ` Phone Type: ${pc49.cyan(phoneTypeLabels2[config2.phoneNumberType] || config2.phoneNumberType)}`
34132
+ ` Phone Type: ${pc48.cyan(phoneTypeLabels2[config2.phoneNumberType] || config2.phoneNumberType)}`
34442
34133
  );
34443
34134
  }
34444
34135
  if (config2.tracking?.enabled) {
34445
- console.log(` ${pc49.green("\u2713")} Delivery Tracking`);
34136
+ console.log(` ${pc48.green("\u2713")} Delivery Tracking`);
34446
34137
  if (config2.tracking.linkTracking) {
34447
- console.log(` ${pc49.dim("\u2514\u2500")} Link click tracking enabled`);
34138
+ console.log(` ${pc48.dim("\u2514\u2500")} Link click tracking enabled`);
34448
34139
  }
34449
34140
  }
34450
34141
  if (config2.eventTracking?.enabled) {
34451
- console.log(` ${pc49.green("\u2713")} Event Tracking (SNS)`);
34142
+ console.log(` ${pc48.green("\u2713")} Event Tracking (SNS)`);
34452
34143
  if (config2.eventTracking.dynamoDBHistory) {
34453
34144
  console.log(
34454
- ` ${pc49.dim("\u2514\u2500")} Message History: ${pc49.cyan(config2.eventTracking.archiveRetention || "90days")}`
34145
+ ` ${pc48.dim("\u2514\u2500")} Message History: ${pc48.cyan(config2.eventTracking.archiveRetention || "90days")}`
34455
34146
  );
34456
34147
  }
34457
34148
  }
34458
34149
  if (config2.messageArchiving?.enabled) {
34459
34150
  console.log(
34460
- ` ${pc49.green("\u2713")} Message Archiving (${config2.messageArchiving.retention})`
34151
+ ` ${pc48.green("\u2713")} Message Archiving (${config2.messageArchiving.retention})`
34461
34152
  );
34462
34153
  }
34463
34154
  if (config2.optOutManagement) {
34464
- console.log(` ${pc49.green("\u2713")} Opt-out Management`);
34155
+ console.log(` ${pc48.green("\u2713")} Opt-out Management`);
34465
34156
  }
34466
34157
  if (config2.protectConfiguration?.enabled) {
34467
34158
  const countries = config2.protectConfiguration.allowedCountries?.join(", ") || "US";
34468
- console.log(` ${pc49.green("\u2713")} Fraud Protection`);
34469
- console.log(` ${pc49.dim("\u2514\u2500")} Allowed countries: ${pc49.cyan(countries)}`);
34159
+ console.log(` ${pc48.green("\u2713")} Fraud Protection`);
34160
+ console.log(` ${pc48.dim("\u2514\u2500")} Allowed countries: ${pc48.cyan(countries)}`);
34470
34161
  if (config2.protectConfiguration.aitFiltering) {
34471
- console.log(` ${pc49.dim("\u2514\u2500")} AIT filtering: ${pc49.cyan("enabled")}`);
34162
+ console.log(` ${pc48.dim("\u2514\u2500")} AIT filtering: ${pc48.cyan("enabled")}`);
34472
34163
  }
34473
34164
  } else {
34474
- console.log(` ${pc49.dim("\u25CB")} Fraud Protection (not configured)`);
34165
+ console.log(` ${pc48.dim("\u25CB")} Fraud Protection (not configured)`);
34475
34166
  }
34476
34167
  const currentCostData = calculateSMSCosts(config2, 1e4);
34477
34168
  console.log(
34478
34169
  `
34479
- Estimated Cost: ${pc49.cyan(`~${formatCost3(currentCostData.total.monthly)}/mo`)}`
34170
+ Estimated Cost: ${pc48.cyan(`~${formatCost3(currentCostData.total.monthly)}/mo`)}`
34480
34171
  );
34481
34172
  console.log("");
34482
34173
  const phoneTypeLabels = {
@@ -34583,22 +34274,22 @@ ${pc49.bold("Current Configuration:")}
34583
34274
  if (selectedType === "toll-free") {
34584
34275
  console.log(
34585
34276
  `
34586
- ${pc49.yellow("\u26A0")} ${pc49.bold("Toll-free Registration Required")}
34277
+ ${pc48.yellow("\u26A0")} ${pc48.bold("Toll-free Registration Required")}
34587
34278
  `
34588
34279
  );
34589
34280
  console.log(
34590
- pc49.dim("Toll-free numbers require carrier registration before")
34281
+ pc48.dim("Toll-free numbers require carrier registration before")
34591
34282
  );
34592
34283
  console.log(
34593
- pc49.dim("they can send messages at scale. After deployment:\n")
34284
+ pc48.dim("they can send messages at scale. After deployment:\n")
34594
34285
  );
34595
34286
  console.log(
34596
- ` 1. Run ${pc49.cyan("wraps sms register")} to start registration`
34287
+ ` 1. Run ${pc48.cyan("wraps sms register")} to start registration`
34597
34288
  );
34598
34289
  console.log(" 2. Submit your business use case information");
34599
34290
  console.log(" 3. Wait for carrier verification (1-5 business days)");
34600
34291
  console.log(
34601
- pc49.dim("\nUntil verified, sending is limited to low volume.\n")
34292
+ pc48.dim("\nUntil verified, sending is limited to low volume.\n")
34602
34293
  );
34603
34294
  const confirmTollFree = await clack45.confirm({
34604
34295
  message: "Continue with toll-free number request?",
@@ -34612,10 +34303,10 @@ ${pc49.yellow("\u26A0")} ${pc49.bold("Toll-free Registration Required")}
34612
34303
  if (selectedType === "10dlc") {
34613
34304
  console.log(
34614
34305
  `
34615
- ${pc49.yellow("\u26A0")} ${pc49.bold("10DLC Campaign Registration Required")}
34306
+ ${pc48.yellow("\u26A0")} ${pc48.bold("10DLC Campaign Registration Required")}
34616
34307
  `
34617
34308
  );
34618
- console.log(pc49.dim("10DLC requires brand and campaign registration:"));
34309
+ console.log(pc48.dim("10DLC requires brand and campaign registration:"));
34619
34310
  console.log(" \u2022 Brand registration: one-time $4 fee");
34620
34311
  console.log(" \u2022 Campaign registration: $15/mo per campaign");
34621
34312
  console.log(" \u2022 Verification takes 1-7 business days");
@@ -34848,12 +34539,12 @@ ${pc49.yellow("\u26A0")} ${pc49.bold("10DLC Campaign Registration Required")}
34848
34539
  const enableLinkTracking = !config2.tracking?.linkTracking;
34849
34540
  if (enableLinkTracking) {
34850
34541
  clack45.log.info(
34851
- pc49.dim(
34542
+ pc48.dim(
34852
34543
  "Link tracking will track clicks on URLs in your SMS messages."
34853
34544
  )
34854
34545
  );
34855
34546
  clack45.log.info(
34856
- pc49.dim("URLs will be rewritten to go through a tracking endpoint.")
34547
+ pc48.dim("URLs will be rewritten to go through a tracking endpoint.")
34857
34548
  );
34858
34549
  }
34859
34550
  const confirmed = await clack45.confirm({
@@ -35066,18 +34757,18 @@ ${pc49.yellow("\u26A0")} ${pc49.bold("10DLC Campaign Registration Required")}
35066
34757
  const newCostData = calculateSMSCosts(updatedConfig, 1e4);
35067
34758
  const costDiff = newCostData.total.monthly - currentCostData.total.monthly;
35068
34759
  console.log(`
35069
- ${pc49.bold("Cost Impact:")}`);
34760
+ ${pc48.bold("Cost Impact:")}`);
35070
34761
  console.log(
35071
- ` Current: ${pc49.cyan(`${formatCost3(currentCostData.total.monthly)}/mo`)}`
34762
+ ` Current: ${pc48.cyan(`${formatCost3(currentCostData.total.monthly)}/mo`)}`
35072
34763
  );
35073
34764
  console.log(
35074
- ` New: ${pc49.cyan(`${formatCost3(newCostData.total.monthly)}/mo`)}`
34765
+ ` New: ${pc48.cyan(`${formatCost3(newCostData.total.monthly)}/mo`)}`
35075
34766
  );
35076
34767
  if (costDiff > 0) {
35077
- console.log(` Change: ${pc49.yellow(`+${formatCost3(costDiff)}/mo`)}`);
34768
+ console.log(` Change: ${pc48.yellow(`+${formatCost3(costDiff)}/mo`)}`);
35078
34769
  } else if (costDiff < 0) {
35079
34770
  console.log(
35080
- ` Change: ${pc49.green(`-${formatCost3(Math.abs(costDiff))}/mo`)}`
34771
+ ` Change: ${pc48.green(`-${formatCost3(Math.abs(costDiff))}/mo`)}`
35081
34772
  );
35082
34773
  }
35083
34774
  console.log("");
@@ -35229,43 +34920,43 @@ ${pc49.bold("Cost Impact:")}`);
35229
34920
  }
35230
34921
  progress.info("Connection metadata updated");
35231
34922
  console.log("\n");
35232
- clack45.log.success(pc49.green(pc49.bold("SMS infrastructure upgraded!")));
34923
+ clack45.log.success(pc48.green(pc48.bold("SMS infrastructure upgraded!")));
35233
34924
  console.log("\n");
35234
34925
  clack45.note(
35235
34926
  [
35236
- `${pc49.bold("Phone Number:")} ${pc49.cyan(outputs.phoneNumber || "Provisioning...")}`,
35237
- `${pc49.bold("Phone Type:")} ${pc49.cyan(updatedConfig.phoneNumberType || "simulator")}`,
35238
- `${pc49.bold("Config Set:")} ${pc49.cyan(outputs.configSetName || "wraps-sms-config")}`,
35239
- `${pc49.bold("Region:")} ${pc49.cyan(outputs.region)}`,
35240
- outputs.tableName ? `${pc49.bold("History Table:")} ${pc49.cyan(outputs.tableName)}` : "",
34927
+ `${pc48.bold("Phone Number:")} ${pc48.cyan(outputs.phoneNumber || "Provisioning...")}`,
34928
+ `${pc48.bold("Phone Type:")} ${pc48.cyan(updatedConfig.phoneNumberType || "simulator")}`,
34929
+ `${pc48.bold("Config Set:")} ${pc48.cyan(outputs.configSetName || "wraps-sms-config")}`,
34930
+ `${pc48.bold("Region:")} ${pc48.cyan(outputs.region)}`,
34931
+ outputs.tableName ? `${pc48.bold("History Table:")} ${pc48.cyan(outputs.tableName)}` : "",
35241
34932
  "",
35242
- pc49.dim("IAM Role:"),
35243
- pc49.dim(` ${outputs.roleArn}`)
34933
+ pc48.dim("IAM Role:"),
34934
+ pc48.dim(` ${outputs.roleArn}`)
35244
34935
  ].filter(Boolean).join("\n"),
35245
34936
  "SMS Infrastructure"
35246
34937
  );
35247
34938
  console.log(`
35248
- ${pc49.green("\u2713")} ${pc49.bold("Upgrade complete!")}
34939
+ ${pc48.green("\u2713")} ${pc48.bold("Upgrade complete!")}
35249
34940
  `);
35250
34941
  if (upgradeAction === "phone-number") {
35251
34942
  console.log(
35252
- `Upgraded to ${pc49.cyan(updatedConfig.phoneNumberType)} number (${pc49.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
34943
+ `Upgraded to ${pc48.cyan(updatedConfig.phoneNumberType)} number (${pc48.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
35253
34944
  `
35254
34945
  );
35255
34946
  if (updatedConfig.phoneNumberType === "toll-free") {
35256
- console.log(`${pc49.bold("Next Steps:")}`);
34947
+ console.log(`${pc48.bold("Next Steps:")}`);
35257
34948
  console.log(
35258
- ` 1. Run ${pc49.cyan("wraps sms register")} to start toll-free registration`
34949
+ ` 1. Run ${pc48.cyan("wraps sms register")} to start toll-free registration`
35259
34950
  );
35260
34951
  console.log(" 2. Submit your business information and use case");
35261
34952
  console.log(" 3. Wait for carrier verification (1-5 business days)");
35262
34953
  console.log("");
35263
34954
  console.log(
35264
- pc49.dim("Until verified, your number can only send limited messages.")
34955
+ pc48.dim("Until verified, your number can only send limited messages.")
35265
34956
  );
35266
34957
  console.log("");
35267
34958
  } else if (updatedConfig.phoneNumberType === "10dlc") {
35268
- console.log(`${pc49.bold("Next Steps:")}`);
34959
+ console.log(`${pc48.bold("Next Steps:")}`);
35269
34960
  console.log(" 1. Register your brand in the AWS Console");
35270
34961
  console.log(" 2. Create a 10DLC campaign for your use case");
35271
34962
  console.log(" 3. Wait for campaign approval (1-7 business days)");
@@ -35273,16 +34964,16 @@ ${pc49.green("\u2713")} ${pc49.bold("Upgrade complete!")}
35273
34964
  }
35274
34965
  } else if (upgradeAction === "preset" && newPreset) {
35275
34966
  console.log(
35276
- `Upgraded to ${pc49.cyan(newPreset)} preset (${pc49.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
34967
+ `Upgraded to ${pc48.cyan(newPreset)} preset (${pc48.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
35277
34968
  `
35278
34969
  );
35279
34970
  } else {
35280
34971
  console.log(
35281
- `Updated configuration (${pc49.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
34972
+ `Updated configuration (${pc48.green(`${formatCost3(newCostData.total.monthly)}/mo`)})
35282
34973
  `
35283
34974
  );
35284
34975
  }
35285
- console.log(pc49.dim(getSMSCostSummary(updatedConfig, 1e4)));
34976
+ console.log(pc48.dim(getSMSCostSummary(updatedConfig, 1e4)));
35286
34977
  const enabledFeatures = [];
35287
34978
  if (updatedConfig.tracking?.enabled) {
35288
34979
  enabledFeatures.push("tracking");
@@ -35306,7 +34997,7 @@ ${pc49.green("\u2713")} ${pc49.bold("Upgrade complete!")}
35306
34997
  action: typeof upgradeAction === "string" ? upgradeAction : void 0,
35307
34998
  duration_ms: Date.now() - startTime
35308
34999
  });
35309
- clack45.outro(pc49.green("Upgrade complete!"));
35000
+ clack45.outro(pc48.green("Upgrade complete!"));
35310
35001
  }
35311
35002
 
35312
35003
  // src/commands/sms/verify-number.ts
@@ -35326,12 +35017,12 @@ import {
35326
35017
  VerifyDestinationNumberCommand
35327
35018
  } from "@aws-sdk/client-pinpoint-sms-voice-v2";
35328
35019
  import * as clack46 from "@clack/prompts";
35329
- import pc50 from "picocolors";
35020
+ import pc49 from "picocolors";
35330
35021
  async function smsVerifyNumber(options) {
35331
35022
  const startTime = Date.now();
35332
35023
  const progress = new DeploymentProgress();
35333
35024
  if (!isJsonMode()) {
35334
- clack46.intro(pc50.bold("Wraps SMS - Verify Destination Number"));
35025
+ clack46.intro(pc49.bold("Wraps SMS - Verify Destination Number"));
35335
35026
  }
35336
35027
  const identity = await progress.execute(
35337
35028
  "Validating AWS credentials",
@@ -35344,7 +35035,7 @@ async function smsVerifyNumber(options) {
35344
35035
  clack46.log.error("No SMS infrastructure found");
35345
35036
  console.log(
35346
35037
  `
35347
- Run ${pc50.cyan("wraps sms init")} to deploy SMS infrastructure.
35038
+ Run ${pc49.cyan("wraps sms init")} to deploy SMS infrastructure.
35348
35039
  `
35349
35040
  );
35350
35041
  process.exit(1);
@@ -35361,16 +35052,16 @@ Run ${pc50.cyan("wraps sms init")} to deploy SMS infrastructure.
35361
35052
  clack46.log.info("No verified destination numbers found");
35362
35053
  console.log(
35363
35054
  `
35364
- Run ${pc50.cyan("wraps sms verify-number")} to verify a number.
35055
+ Run ${pc49.cyan("wraps sms verify-number")} to verify a number.
35365
35056
  `
35366
35057
  );
35367
35058
  } else {
35368
35059
  console.log("\n");
35369
- clack46.log.info(pc50.bold("Verified Destination Numbers:"));
35060
+ clack46.log.info(pc49.bold("Verified Destination Numbers:"));
35370
35061
  console.log("");
35371
35062
  for (const num of response.VerifiedDestinationNumbers) {
35372
- const status2 = num.Status === "VERIFIED" ? pc50.green("\u2713 Verified") : pc50.yellow("\u29D6 Pending");
35373
- console.log(` ${pc50.cyan(num.DestinationPhoneNumber)} - ${status2}`);
35063
+ const status2 = num.Status === "VERIFIED" ? pc49.green("\u2713 Verified") : pc49.yellow("\u29D6 Pending");
35064
+ console.log(` ${pc49.cyan(num.DestinationPhoneNumber)} - ${status2}`);
35374
35065
  }
35375
35066
  console.log("");
35376
35067
  }
@@ -35388,7 +35079,7 @@ Run ${pc50.cyan("wraps sms verify-number")} to verify a number.
35388
35079
  });
35389
35080
  return;
35390
35081
  }
35391
- clack46.outro(pc50.green("Done!"));
35082
+ clack46.outro(pc49.green("Done!"));
35392
35083
  return;
35393
35084
  } catch (error) {
35394
35085
  progress.stop();
@@ -35407,7 +35098,7 @@ Run ${pc50.cyan("wraps sms verify-number")} to verify a number.
35407
35098
  clack46.log.error("Phone number is required for deletion");
35408
35099
  console.log(
35409
35100
  `
35410
- Usage: ${pc50.cyan("wraps sms verify-number --delete --phone-number +14155551234")}
35101
+ Usage: ${pc49.cyan("wraps sms verify-number --delete --phone-number +14155551234")}
35411
35102
  `
35412
35103
  );
35413
35104
  process.exit(1);
@@ -35432,7 +35123,7 @@ Usage: ${pc50.cyan("wraps sms verify-number --delete --phone-number +14155551234
35432
35123
  );
35433
35124
  });
35434
35125
  progress.stop();
35435
- clack46.log.success(`Removed ${pc50.cyan(phoneNumber2)} from verified list`);
35126
+ clack46.log.success(`Removed ${pc49.cyan(phoneNumber2)} from verified list`);
35436
35127
  trackCommand("sms:verify-number:delete", {
35437
35128
  success: true,
35438
35129
  duration_ms: Date.now() - startTime
@@ -35444,7 +35135,7 @@ Usage: ${pc50.cyan("wraps sms verify-number --delete --phone-number +14155551234
35444
35135
  });
35445
35136
  return;
35446
35137
  }
35447
- clack46.outro(pc50.green("Done!"));
35138
+ clack46.outro(pc49.green("Done!"));
35448
35139
  return;
35449
35140
  } catch (error) {
35450
35141
  progress.stop();
@@ -35516,11 +35207,11 @@ Usage: ${pc50.cyan("wraps sms verify-number --delete --phone-number +14155551234
35516
35207
  progress.stop();
35517
35208
  console.log("\n");
35518
35209
  clack46.log.success(
35519
- pc50.green(`Phone number ${pc50.cyan(phoneNumber)} verified!`)
35210
+ pc49.green(`Phone number ${pc49.cyan(phoneNumber)} verified!`)
35520
35211
  );
35521
35212
  console.log("");
35522
35213
  console.log(
35523
- `You can now send test messages to this number with ${pc50.cyan("wraps sms test")}`
35214
+ `You can now send test messages to this number with ${pc49.cyan("wraps sms test")}`
35524
35215
  );
35525
35216
  trackCommand("sms:verify-number:confirm", {
35526
35217
  success: true,
@@ -35533,7 +35224,7 @@ Usage: ${pc50.cyan("wraps sms verify-number --delete --phone-number +14155551234
35533
35224
  });
35534
35225
  return;
35535
35226
  }
35536
- clack46.outro(pc50.green("Verification complete!"));
35227
+ clack46.outro(pc49.green("Verification complete!"));
35537
35228
  return;
35538
35229
  } catch (error) {
35539
35230
  progress.stop();
@@ -35542,7 +35233,7 @@ Usage: ${pc50.cyan("wraps sms verify-number --delete --phone-number +14155551234
35542
35233
  clack46.log.error("Invalid verification code. Please try again.");
35543
35234
  console.log(
35544
35235
  `
35545
- Run ${pc50.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`)} to get a new code.
35236
+ Run ${pc49.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`)} to get a new code.
35546
35237
  `
35547
35238
  );
35548
35239
  } else {
@@ -35578,11 +35269,11 @@ Run ${pc50.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
35578
35269
  );
35579
35270
  });
35580
35271
  progress.stop();
35581
- clack46.log.success(`Verification code resent to ${pc50.cyan(phoneNumber)}`);
35272
+ clack46.log.success(`Verification code resent to ${pc49.cyan(phoneNumber)}`);
35582
35273
  console.log("");
35583
35274
  console.log(
35584
35275
  `Once you receive the code, run:
35585
- ${pc50.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`
35276
+ ${pc49.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`
35586
35277
  );
35587
35278
  trackCommand("sms:verify-number:resend", {
35588
35279
  success: true,
@@ -35595,7 +35286,7 @@ Run ${pc50.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
35595
35286
  });
35596
35287
  return;
35597
35288
  }
35598
- clack46.outro(pc50.green("Code sent!"));
35289
+ clack46.outro(pc49.green("Code sent!"));
35599
35290
  return;
35600
35291
  } catch (error) {
35601
35292
  progress.stop();
@@ -35624,9 +35315,9 @@ Run ${pc50.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
35624
35315
  return;
35625
35316
  }
35626
35317
  clack46.log.info(
35627
- `Number ${pc50.cyan(phoneNumber)} is already verified and ready to use!`
35318
+ `Number ${pc49.cyan(phoneNumber)} is already verified and ready to use!`
35628
35319
  );
35629
- clack46.outro(pc50.green("Done!"));
35320
+ clack46.outro(pc49.green("Done!"));
35630
35321
  return;
35631
35322
  }
35632
35323
  if (existingNumber?.Status === "PENDING") {
@@ -35651,14 +35342,14 @@ Run ${pc50.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
35651
35342
  return;
35652
35343
  }
35653
35344
  clack46.log.info(
35654
- `Verification already in progress. New code sent to ${pc50.cyan(phoneNumber)}`
35345
+ `Verification already in progress. New code sent to ${pc49.cyan(phoneNumber)}`
35655
35346
  );
35656
35347
  console.log("");
35657
35348
  console.log(
35658
35349
  `Once you receive the code, run:
35659
- ${pc50.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`
35350
+ ${pc49.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`
35660
35351
  );
35661
- clack46.outro(pc50.green("Code sent!"));
35352
+ clack46.outro(pc49.green("Code sent!"));
35662
35353
  return;
35663
35354
  }
35664
35355
  const createResponse = await progress.execute(
@@ -35680,7 +35371,7 @@ Run ${pc50.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
35680
35371
  progress.stop();
35681
35372
  console.log("\n");
35682
35373
  clack46.log.success(
35683
- `Verification code sent to ${pc50.cyan(phoneNumber)} via SMS`
35374
+ `Verification code sent to ${pc49.cyan(phoneNumber)} via SMS`
35684
35375
  );
35685
35376
  console.log("");
35686
35377
  clack46.note(
@@ -35688,9 +35379,9 @@ Run ${pc50.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
35688
35379
  "1. Check your phone for the verification code",
35689
35380
  "",
35690
35381
  "2. Complete verification with:",
35691
- ` ${pc50.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`,
35382
+ ` ${pc49.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --code YOUR_CODE`)}`,
35692
35383
  "",
35693
- pc50.dim("The code expires in 24 hours")
35384
+ pc49.dim("The code expires in 24 hours")
35694
35385
  ].join("\n"),
35695
35386
  "Next Steps"
35696
35387
  );
@@ -35706,7 +35397,7 @@ Run ${pc50.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
35706
35397
  });
35707
35398
  return;
35708
35399
  }
35709
- clack46.outro(pc50.green("Verification started!"));
35400
+ clack46.outro(pc49.green("Verification started!"));
35710
35401
  } catch (error) {
35711
35402
  progress.stop();
35712
35403
  const errorMessage = error instanceof Error ? error.message : String(error);
@@ -35714,7 +35405,7 @@ Run ${pc50.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
35714
35405
  clack46.log.error("This number is already being verified");
35715
35406
  console.log(
35716
35407
  `
35717
- Run ${pc50.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`)} to get a new code.
35408
+ Run ${pc49.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`)} to get a new code.
35718
35409
  `
35719
35410
  );
35720
35411
  } else {
@@ -35731,18 +35422,18 @@ Run ${pc50.cyan(`wraps sms verify-number --phone-number ${phoneNumber} --resend`
35731
35422
  init_esm_shims();
35732
35423
  init_events();
35733
35424
  import * as clack47 from "@clack/prompts";
35734
- import pc51 from "picocolors";
35425
+ import pc50 from "picocolors";
35735
35426
  async function support() {
35736
35427
  trackCommand("support", { success: true });
35737
- clack47.intro(pc51.bold("Get Help with Wraps"));
35428
+ clack47.intro(pc50.bold("Get Help with Wraps"));
35738
35429
  console.log();
35739
- console.log(` ${pc51.bold("Email:")} ${pc51.cyan("hey@wraps.sh")}`);
35430
+ console.log(` ${pc50.bold("Email:")} ${pc50.cyan("hey@wraps.sh")}`);
35740
35431
  console.log(
35741
- ` ${pc51.bold("GitHub:")} ${pc51.cyan("https://github.com/wraps-dev/wraps/issues")}`
35432
+ ` ${pc50.bold("GitHub:")} ${pc50.cyan("https://github.com/wraps-dev/wraps/issues")}`
35742
35433
  );
35743
- console.log(` ${pc51.bold("Docs:")} ${pc51.cyan("https://wraps.dev/docs")}`);
35434
+ console.log(` ${pc50.bold("Docs:")} ${pc50.cyan("https://wraps.dev/docs")}`);
35744
35435
  console.log();
35745
- console.log(pc51.dim(" Response time: Usually within 24 hours"));
35436
+ console.log(pc50.dim(" Response time: Usually within 24 hours"));
35746
35437
  console.log();
35747
35438
  }
35748
35439
 
@@ -35750,7 +35441,7 @@ async function support() {
35750
35441
  init_esm_shims();
35751
35442
  init_client();
35752
35443
  import * as clack48 from "@clack/prompts";
35753
- import pc52 from "picocolors";
35444
+ import pc51 from "picocolors";
35754
35445
  async function telemetryEnable() {
35755
35446
  const client = getTelemetryClient();
35756
35447
  const override = client.enable();
@@ -35758,70 +35449,70 @@ async function telemetryEnable() {
35758
35449
  clack48.log.warn(
35759
35450
  "Telemetry enabled in config, but overridden by environment"
35760
35451
  );
35761
- console.log(` Reason: ${pc52.yellow(override)}`);
35762
- console.log(` Config: ${pc52.dim(client.getConfigPath())}`);
35452
+ console.log(` Reason: ${pc51.yellow(override)}`);
35453
+ console.log(` Config: ${pc51.dim(client.getConfigPath())}`);
35763
35454
  console.log();
35764
35455
  } else {
35765
- clack48.log.success(pc52.green("Telemetry enabled"));
35766
- console.log(` Config: ${pc52.dim(client.getConfigPath())}`);
35456
+ clack48.log.success(pc51.green("Telemetry enabled"));
35457
+ console.log(` Config: ${pc51.dim(client.getConfigPath())}`);
35767
35458
  console.log(`
35768
- ${pc52.dim("Thank you for helping improve Wraps!")}
35459
+ ${pc51.dim("Thank you for helping improve Wraps!")}
35769
35460
  `);
35770
35461
  }
35771
35462
  }
35772
35463
  async function telemetryDisable() {
35773
35464
  const client = getTelemetryClient();
35774
35465
  client.disable();
35775
- clack48.log.success(pc52.green("Telemetry disabled"));
35776
- console.log(` Config: ${pc52.dim(client.getConfigPath())}`);
35466
+ clack48.log.success(pc51.green("Telemetry disabled"));
35467
+ console.log(` Config: ${pc51.dim(client.getConfigPath())}`);
35777
35468
  console.log(
35778
35469
  `
35779
- ${pc52.dim("You can re-enable with:")} wraps telemetry enable
35470
+ ${pc51.dim("You can re-enable with:")} wraps telemetry enable
35780
35471
  `
35781
35472
  );
35782
35473
  }
35783
35474
  async function telemetryStatus() {
35784
35475
  const client = getTelemetryClient();
35785
- clack48.intro(pc52.bold("Telemetry Status"));
35476
+ clack48.intro(pc51.bold("Telemetry Status"));
35786
35477
  const override = client.getEnvOverride();
35787
- const status2 = client.isEnabled() ? pc52.green("Enabled") : pc52.red("Disabled");
35478
+ const status2 = client.isEnabled() ? pc51.green("Enabled") : pc51.red("Disabled");
35788
35479
  console.log();
35789
- console.log(` ${pc52.bold("Status:")} ${status2}`);
35480
+ console.log(` ${pc51.bold("Status:")} ${status2}`);
35790
35481
  if (!client.isEnabled() && override) {
35791
- console.log(` ${pc52.bold("Reason:")} ${pc52.yellow(override)}`);
35482
+ console.log(` ${pc51.bold("Reason:")} ${pc51.yellow(override)}`);
35792
35483
  }
35793
- console.log(` ${pc52.bold("Config file:")} ${pc52.dim(client.getConfigPath())}`);
35484
+ console.log(` ${pc51.bold("Config file:")} ${pc51.dim(client.getConfigPath())}`);
35794
35485
  if (client.isEnabled()) {
35795
35486
  console.log();
35796
- console.log(pc52.bold(" How to opt-out:"));
35797
- console.log(` ${pc52.cyan("wraps telemetry disable")}`);
35487
+ console.log(pc51.bold(" How to opt-out:"));
35488
+ console.log(` ${pc51.cyan("wraps telemetry disable")}`);
35798
35489
  console.log(
35799
- ` ${pc52.dim("Or set:")} ${pc52.cyan("WRAPS_TELEMETRY_DISABLED=1")}`
35490
+ ` ${pc51.dim("Or set:")} ${pc51.cyan("WRAPS_TELEMETRY_DISABLED=1")}`
35800
35491
  );
35801
- console.log(` ${pc52.dim("Or set:")} ${pc52.cyan("DO_NOT_TRACK=1")}`);
35492
+ console.log(` ${pc51.dim("Or set:")} ${pc51.cyan("DO_NOT_TRACK=1")}`);
35802
35493
  } else {
35803
35494
  console.log();
35804
- console.log(pc52.bold(" How to opt-in:"));
35805
- console.log(` ${pc52.cyan("wraps telemetry enable")}`);
35495
+ console.log(pc51.bold(" How to opt-in:"));
35496
+ console.log(` ${pc51.cyan("wraps telemetry enable")}`);
35806
35497
  }
35807
35498
  console.log();
35808
- console.log(pc52.bold(" Debug mode:"));
35499
+ console.log(pc51.bold(" Debug mode:"));
35809
35500
  console.log(
35810
- ` ${pc52.dim("See what would be sent:")} ${pc52.cyan("WRAPS_TELEMETRY_DEBUG=1 wraps <command>")}`
35501
+ ` ${pc51.dim("See what would be sent:")} ${pc51.cyan("WRAPS_TELEMETRY_DEBUG=1 wraps <command>")}`
35811
35502
  );
35812
35503
  console.log();
35813
35504
  console.log(
35814
- ` ${pc52.dim("Learn more:")} ${pc52.cyan("https://wraps.dev/docs/telemetry")}`
35505
+ ` ${pc51.dim("Learn more:")} ${pc51.cyan("https://wraps.dev/docs/telemetry")}`
35815
35506
  );
35816
35507
  console.log();
35817
35508
  }
35818
35509
 
35819
35510
  // src/commands/workflow/init.ts
35820
35511
  init_esm_shims();
35821
- import { existsSync as existsSync18, mkdirSync as mkdirSync3, writeFileSync as writeFileSync2 } from "fs";
35822
- import { join as join19 } from "path";
35512
+ import { existsSync as existsSync17, mkdirSync as mkdirSync2, writeFileSync } from "fs";
35513
+ import { join as join18 } from "path";
35823
35514
  import * as clack49 from "@clack/prompts";
35824
- import pc53 from "picocolors";
35515
+ import pc52 from "picocolors";
35825
35516
  var EXAMPLE_CASCADE_WORKFLOW = `import {
35826
35517
  defineWorkflow,
35827
35518
  sendEmail,
@@ -35916,15 +35607,15 @@ export default defineConfig({
35916
35607
  });
35917
35608
  `;
35918
35609
  async function workflowInit(options = {}) {
35919
- clack49.intro(pc53.bgCyan(pc53.black(" wraps workflow init ")));
35920
- const wrapsDir = join19(process.cwd(), "wraps");
35921
- const workflowsDir = join19(wrapsDir, "workflows");
35922
- const configPath = join19(wrapsDir, "wraps.config.ts");
35923
- if (existsSync18(workflowsDir)) {
35610
+ clack49.intro(pc52.bgCyan(pc52.black(" wraps workflow init ")));
35611
+ const wrapsDir = join18(process.cwd(), "wraps");
35612
+ const workflowsDir = join18(wrapsDir, "workflows");
35613
+ const configPath = join18(wrapsDir, "wraps.config.ts");
35614
+ if (existsSync17(workflowsDir)) {
35924
35615
  clack49.log.info(
35925
- `Workflows directory already exists at ${pc53.cyan("wraps/workflows/")}`
35616
+ `Workflows directory already exists at ${pc52.cyan("wraps/workflows/")}`
35926
35617
  );
35927
- const files = existsSync18(join19(workflowsDir, "cart-recovery.ts")) || existsSync18(join19(workflowsDir, "welcome-sequence.ts"));
35618
+ const files = existsSync17(join18(workflowsDir, "cart-recovery.ts")) || existsSync17(join18(workflowsDir, "welcome-sequence.ts"));
35928
35619
  if (files && !options.yes) {
35929
35620
  const shouldContinue = await clack49.confirm({
35930
35621
  message: "Example files may already exist. Overwrite them?",
@@ -35932,7 +35623,7 @@ async function workflowInit(options = {}) {
35932
35623
  });
35933
35624
  if (clack49.isCancel(shouldContinue) || !shouldContinue) {
35934
35625
  clack49.log.info("Skipping file creation.");
35935
- showNextSteps3();
35626
+ showNextSteps2();
35936
35627
  clack49.outro("Done!");
35937
35628
  return;
35938
35629
  }
@@ -35941,50 +35632,50 @@ async function workflowInit(options = {}) {
35941
35632
  try {
35942
35633
  const s = clack49.spinner();
35943
35634
  s.start("Creating workflows directory...");
35944
- mkdirSync3(workflowsDir, { recursive: true });
35635
+ mkdirSync2(workflowsDir, { recursive: true });
35945
35636
  s.stop("Created wraps/workflows/");
35946
35637
  s.start("Scaffolding example workflows...");
35947
- writeFileSync2(
35948
- join19(workflowsDir, "cart-recovery.ts"),
35638
+ writeFileSync(
35639
+ join18(workflowsDir, "cart-recovery.ts"),
35949
35640
  EXAMPLE_CASCADE_WORKFLOW,
35950
35641
  "utf-8"
35951
35642
  );
35952
- writeFileSync2(
35953
- join19(workflowsDir, "welcome-sequence.ts"),
35643
+ writeFileSync(
35644
+ join18(workflowsDir, "welcome-sequence.ts"),
35954
35645
  EXAMPLE_WELCOME_WORKFLOW,
35955
35646
  "utf-8"
35956
35647
  );
35957
35648
  s.stop("Created 2 example workflows");
35958
- if (!existsSync18(configPath)) {
35959
- writeFileSync2(configPath, EXAMPLE_CONFIG, "utf-8");
35960
- clack49.log.info(`Created ${pc53.cyan("wraps/wraps.config.ts")}`);
35649
+ if (!existsSync17(configPath)) {
35650
+ writeFileSync(configPath, EXAMPLE_CONFIG, "utf-8");
35651
+ clack49.log.info(`Created ${pc52.cyan("wraps/wraps.config.ts")}`);
35961
35652
  }
35962
35653
  clack49.log.success(
35963
- `${pc53.bold("Workflows scaffolded!")} Created:
35964
- ${pc53.cyan("wraps/wraps.config.ts")} \u2014 Project config
35965
- ${pc53.cyan("wraps/workflows/cart-recovery.ts")} \u2014 Cross-channel cascade example
35966
- ${pc53.cyan("wraps/workflows/welcome-sequence.ts")} \u2014 Welcome series example`
35654
+ `${pc52.bold("Workflows scaffolded!")} Created:
35655
+ ${pc52.cyan("wraps/wraps.config.ts")} \u2014 Project config
35656
+ ${pc52.cyan("wraps/workflows/cart-recovery.ts")} \u2014 Cross-channel cascade example
35657
+ ${pc52.cyan("wraps/workflows/welcome-sequence.ts")} \u2014 Welcome series example`
35967
35658
  );
35968
- showNextSteps3();
35969
- clack49.outro(pc53.green("Happy orchestrating!"));
35659
+ showNextSteps2();
35660
+ clack49.outro(pc52.green("Happy orchestrating!"));
35970
35661
  } catch (error) {
35971
35662
  clack49.log.error(
35972
35663
  `Failed to scaffold workflows: ${error instanceof Error ? error.message : String(error)}`
35973
35664
  );
35974
- clack49.outro(pc53.red("Scaffolding failed."));
35665
+ clack49.outro(pc52.red("Scaffolding failed."));
35975
35666
  process.exitCode = 1;
35976
35667
  }
35977
35668
  }
35978
- function showNextSteps3() {
35669
+ function showNextSteps2() {
35979
35670
  clack49.log.info(
35980
- `${pc53.bold("Next steps:")}
35671
+ `${pc52.bold("Next steps:")}
35981
35672
 
35982
- 1. Edit ${pc53.cyan("wraps/wraps.config.ts")} with your org slug and domain
35983
- 2. Edit your workflows in ${pc53.cyan("wraps/workflows/")}
35984
- 3. Validate: ${pc53.cyan("wraps email workflows validate")}
35985
- 4. Push: ${pc53.cyan("wraps email workflows push")}
35673
+ 1. Edit ${pc52.cyan("wraps/wraps.config.ts")} with your org slug and domain
35674
+ 2. Edit your workflows in ${pc52.cyan("wraps/workflows/")}
35675
+ 3. Validate: ${pc52.cyan("wraps email workflows validate")}
35676
+ 4. Push: ${pc52.cyan("wraps email workflows push")}
35986
35677
 
35987
- ${pc53.dim("Docs:")} ${pc53.underline("https://wraps.dev/docs/guides/orchestration")}`
35678
+ ${pc52.dim("Docs:")} ${pc52.underline("https://wraps.dev/docs/guides/orchestration")}`
35988
35679
  );
35989
35680
  }
35990
35681
 
@@ -36058,7 +35749,7 @@ if (nodeMajorVersion < 20) {
36058
35749
  var __filename2 = fileURLToPath5(import.meta.url);
36059
35750
  var __dirname3 = dirname3(__filename2);
36060
35751
  var packageJson = JSON.parse(
36061
- readFileSync3(join20(__dirname3, "../package.json"), "utf-8")
35752
+ readFileSync3(join19(__dirname3, "../package.json"), "utf-8")
36062
35753
  );
36063
35754
  var VERSION = packageJson.version;
36064
35755
  setupTabCompletion();
@@ -36067,190 +35758,187 @@ function showVersion() {
36067
35758
  process.exit(0);
36068
35759
  }
36069
35760
  function showHelp() {
36070
- clack50.intro(pc54.bold(`WRAPS CLI v${VERSION}`));
35761
+ clack50.intro(pc53.bold(`WRAPS CLI v${VERSION}`));
36071
35762
  console.log("Deploy AWS infrastructure to your account\n");
36072
35763
  console.log("Usage: wraps [service] <command> [options]\n");
36073
35764
  console.log("Services:");
36074
- console.log(` ${pc54.cyan("email")} Email infrastructure (AWS SES)`);
35765
+ console.log(` ${pc53.cyan("email")} Email infrastructure (AWS SES)`);
36075
35766
  console.log(
36076
- ` ${pc54.cyan("sms")} SMS infrastructure (AWS End User Messaging)`
35767
+ ` ${pc53.cyan("sms")} SMS infrastructure (AWS End User Messaging)`
36077
35768
  );
36078
35769
  console.log(
36079
- ` ${pc54.cyan("cdn")} CDN infrastructure (AWS S3 + CloudFront)
35770
+ ` ${pc53.cyan("cdn")} CDN infrastructure (AWS S3 + CloudFront)
36080
35771
  `
36081
35772
  );
36082
35773
  console.log("Email Commands:");
36083
35774
  console.log(
36084
- ` ${pc54.cyan("email init")} Deploy new email infrastructure`
35775
+ ` ${pc53.cyan("email init")} Deploy new email infrastructure`
36085
35776
  );
36086
35777
  console.log(
36087
- ` ${pc54.cyan("email check")} Check email deliverability for a domain`
35778
+ ` ${pc53.cyan("email check")} Check email deliverability for a domain`
36088
35779
  );
36089
35780
  console.log(
36090
- ` ${pc54.cyan("email connect")} Connect to existing AWS SES`
35781
+ ` ${pc53.cyan("email connect")} Connect to existing AWS SES`
36091
35782
  );
36092
35783
  console.log(
36093
- ` ${pc54.cyan("email status")} Show email infrastructure details`
35784
+ ` ${pc53.cyan("email status")} Show email infrastructure details`
36094
35785
  );
36095
- console.log(` ${pc54.cyan("email test")} Send a test email`);
36096
- console.log(` ${pc54.cyan("email verify")} Verify domain DNS records`);
35786
+ console.log(` ${pc53.cyan("email test")} Send a test email`);
35787
+ console.log(` ${pc53.cyan("email verify")} Verify domain DNS records`);
36097
35788
  console.log(
36098
- ` ${pc54.cyan("email sync")} Apply CLI updates to infrastructure`
35789
+ ` ${pc53.cyan("email sync")} Apply CLI updates to infrastructure`
36099
35790
  );
36100
- console.log(` ${pc54.cyan("email upgrade")} Add features`);
35791
+ console.log(` ${pc53.cyan("email upgrade")} Add features`);
36101
35792
  console.log(
36102
- ` ${pc54.cyan("email restore")} Restore original configuration`
35793
+ ` ${pc53.cyan("email restore")} Restore original configuration`
36103
35794
  );
36104
35795
  console.log(
36105
- ` ${pc54.cyan("email destroy")} Remove email infrastructure`
35796
+ ` ${pc53.cyan("email destroy")} Remove email infrastructure`
36106
35797
  );
36107
- console.log(` ${pc54.cyan("email domains add")} Add a domain to SES`);
36108
- console.log(` ${pc54.cyan("email domains list")} List all domains`);
36109
- console.log(` ${pc54.cyan("email domains remove")} Remove a domain`);
35798
+ console.log(` ${pc53.cyan("email domains add")} Add a domain to SES`);
35799
+ console.log(` ${pc53.cyan("email domains list")} List all domains`);
35800
+ console.log(` ${pc53.cyan("email domains remove")} Remove a domain`);
36110
35801
  console.log(
36111
- ` ${pc54.cyan("email inbound init")} Enable inbound email receiving`
35802
+ ` ${pc53.cyan("email inbound init")} Enable inbound email receiving`
36112
35803
  );
36113
- console.log(` ${pc54.cyan("email inbound status")} Show inbound email status`);
35804
+ console.log(` ${pc53.cyan("email inbound status")} Show inbound email status`);
36114
35805
  console.log(
36115
- ` ${pc54.cyan("email inbound verify")} Verify inbound DNS records`
35806
+ ` ${pc53.cyan("email inbound verify")} Verify inbound DNS records`
36116
35807
  );
36117
35808
  console.log(
36118
- ` ${pc54.cyan("email inbound test")} Send test email and verify receipt`
35809
+ ` ${pc53.cyan("email inbound test")} Send test email and verify receipt`
36119
35810
  );
36120
35811
  console.log(
36121
- ` ${pc54.cyan("email inbound destroy")} Remove inbound email infrastructure
35812
+ ` ${pc53.cyan("email inbound destroy")} Remove inbound email infrastructure
36122
35813
  `
36123
35814
  );
36124
35815
  console.log("Template Commands:");
36125
35816
  console.log(
36126
- ` ${pc54.cyan("email templates init")} Initialize templates-as-code`
35817
+ ` ${pc53.cyan("email templates init")} Initialize templates-as-code`
36127
35818
  );
36128
35819
  console.log(
36129
- ` ${pc54.cyan("email templates push")} Push templates to SES + dashboard`
35820
+ ` ${pc53.cyan("email templates push")} Push templates to SES + dashboard`
36130
35821
  );
36131
35822
  console.log(
36132
- ` ${pc54.cyan("email templates preview")} Preview templates in browser`
35823
+ ` ${pc53.cyan("email templates preview")} Preview templates in browser`
36133
35824
  );
36134
35825
  console.log(
36135
- ` ${pc54.cyan("push")} ${pc54.dim("(alias for email templates push)")}
35826
+ ` ${pc53.cyan("push")} ${pc53.dim("(alias for email templates push)")}
36136
35827
  `
36137
35828
  );
36138
35829
  console.log("Workflow Commands:");
36139
35830
  console.log(
36140
- ` ${pc54.cyan("email workflows init")} Initialize workflows-as-code`
36141
- );
36142
- console.log(
36143
- ` ${pc54.cyan("email workflows validate")} Validate workflow files`
35831
+ ` ${pc53.cyan("email workflows init")} Initialize workflows-as-code`
36144
35832
  );
36145
35833
  console.log(
36146
- ` ${pc54.cyan("email workflows push")} Push workflows to dashboard`
35834
+ ` ${pc53.cyan("email workflows validate")} Validate workflow files`
36147
35835
  );
36148
35836
  console.log(
36149
- ` ${pc54.cyan("email workflows generate")} Generate workflow from template
35837
+ ` ${pc53.cyan("email workflows push")} Push workflows to dashboard
36150
35838
  `
36151
35839
  );
36152
35840
  console.log("SMS Commands:");
36153
- console.log(` ${pc54.cyan("sms init")} Deploy SMS infrastructure`);
35841
+ console.log(` ${pc53.cyan("sms init")} Deploy SMS infrastructure`);
36154
35842
  console.log(
36155
- ` ${pc54.cyan("sms status")} Show SMS infrastructure details`
35843
+ ` ${pc53.cyan("sms status")} Show SMS infrastructure details`
36156
35844
  );
36157
- console.log(` ${pc54.cyan("sms test")} Send a test SMS message`);
35845
+ console.log(` ${pc53.cyan("sms test")} Send a test SMS message`);
36158
35846
  console.log(
36159
- ` ${pc54.cyan("sms verify-number")} Verify a destination phone number`
35847
+ ` ${pc53.cyan("sms verify-number")} Verify a destination phone number`
36160
35848
  );
36161
35849
  console.log(
36162
- ` ${pc54.cyan("sms sync")} Sync infrastructure (update Lambda, etc.)`
35850
+ ` ${pc53.cyan("sms sync")} Sync infrastructure (update Lambda, etc.)`
36163
35851
  );
36164
- console.log(` ${pc54.cyan("sms upgrade")} Upgrade SMS features`);
36165
- console.log(` ${pc54.cyan("sms register")} Register toll-free number`);
35852
+ console.log(` ${pc53.cyan("sms upgrade")} Upgrade SMS features`);
35853
+ console.log(` ${pc53.cyan("sms register")} Register toll-free number`);
36166
35854
  console.log(
36167
- ` ${pc54.cyan("sms destroy")} Remove SMS infrastructure
35855
+ ` ${pc53.cyan("sms destroy")} Remove SMS infrastructure
36168
35856
  `
36169
35857
  );
36170
35858
  console.log("CDN Commands:");
36171
35859
  console.log(
36172
- ` ${pc54.cyan("cdn init")} Deploy CDN infrastructure (S3 + CloudFront)`
35860
+ ` ${pc53.cyan("cdn init")} Deploy CDN infrastructure (S3 + CloudFront)`
36173
35861
  );
36174
35862
  console.log(
36175
- ` ${pc54.cyan("cdn status")} Show CDN infrastructure details`
35863
+ ` ${pc53.cyan("cdn status")} Show CDN infrastructure details`
36176
35864
  );
36177
35865
  console.log(
36178
- ` ${pc54.cyan("cdn verify")} Check DNS and certificate status`
35866
+ ` ${pc53.cyan("cdn verify")} Check DNS and certificate status`
36179
35867
  );
36180
35868
  console.log(
36181
- ` ${pc54.cyan("cdn upgrade")} Add custom domain after cert validation`
35869
+ ` ${pc53.cyan("cdn upgrade")} Add custom domain after cert validation`
36182
35870
  );
36183
35871
  console.log(
36184
- ` ${pc54.cyan("cdn sync")} Sync infrastructure with current config`
35872
+ ` ${pc53.cyan("cdn sync")} Sync infrastructure with current config`
36185
35873
  );
36186
35874
  console.log(
36187
- ` ${pc54.cyan("cdn destroy")} Remove CDN infrastructure
35875
+ ` ${pc53.cyan("cdn destroy")} Remove CDN infrastructure
36188
35876
  `
36189
35877
  );
36190
35878
  console.log("Local Development:");
36191
35879
  console.log(
36192
- ` ${pc54.cyan("console")} Start local web console
35880
+ ` ${pc53.cyan("console")} Start local web console
36193
35881
  `
36194
35882
  );
36195
35883
  console.log("Platform:");
36196
35884
  console.log(
36197
- ` ${pc54.cyan("platform")} Show platform info and pricing`
35885
+ ` ${pc53.cyan("platform")} Show platform info and pricing`
36198
35886
  );
36199
35887
  console.log(
36200
- ` ${pc54.cyan("platform connect")} Connect to Wraps Platform (events + IAM)`
35888
+ ` ${pc53.cyan("platform connect")} Connect to Wraps Platform (events + IAM)`
36201
35889
  );
36202
35890
  console.log(
36203
- ` ${pc54.cyan("platform update-role")} Update platform IAM permissions
35891
+ ` ${pc53.cyan("platform update-role")} Update platform IAM permissions
36204
35892
  `
36205
35893
  );
36206
35894
  console.log("Auth:");
36207
35895
  console.log(
36208
- ` ${pc54.cyan("auth login")} Sign in to wraps.dev (device flow)`
35896
+ ` ${pc53.cyan("auth login")} Sign in to wraps.dev (device flow)`
36209
35897
  );
36210
- console.log(` ${pc54.cyan("auth status")} Show current auth state`);
35898
+ console.log(` ${pc53.cyan("auth status")} Show current auth state`);
36211
35899
  console.log(
36212
- ` ${pc54.cyan("auth logout")} Sign out and remove stored token
35900
+ ` ${pc53.cyan("auth logout")} Sign out and remove stored token
36213
35901
  `
36214
35902
  );
36215
35903
  console.log("AWS Setup:");
36216
35904
  console.log(
36217
- ` ${pc54.cyan("aws setup")} Interactive AWS setup wizard`
35905
+ ` ${pc53.cyan("aws setup")} Interactive AWS setup wizard`
36218
35906
  );
36219
35907
  console.log(
36220
- ` ${pc54.cyan("aws doctor")} Diagnose AWS configuration issues
35908
+ ` ${pc53.cyan("aws doctor")} Diagnose AWS configuration issues
36221
35909
  `
36222
35910
  );
36223
35911
  console.log("Global Commands:");
36224
- console.log(` ${pc54.cyan("status")} Show overview of all services`);
36225
- console.log(` ${pc54.cyan("destroy")} Remove deployed infrastructure`);
36226
- console.log(` ${pc54.cyan("permissions")} Show required AWS IAM permissions`);
36227
- console.log(` ${pc54.cyan("completion")} Generate shell completion script`);
35912
+ console.log(` ${pc53.cyan("status")} Show overview of all services`);
35913
+ console.log(` ${pc53.cyan("destroy")} Remove deployed infrastructure`);
35914
+ console.log(` ${pc53.cyan("permissions")} Show required AWS IAM permissions`);
35915
+ console.log(` ${pc53.cyan("completion")} Generate shell completion script`);
36228
35916
  console.log(
36229
- ` ${pc54.cyan("telemetry")} Manage anonymous telemetry settings`
35917
+ ` ${pc53.cyan("telemetry")} Manage anonymous telemetry settings`
36230
35918
  );
36231
- console.log(` ${pc54.cyan("news")} Show recent Wraps updates`);
35919
+ console.log(` ${pc53.cyan("news")} Show recent Wraps updates`);
36232
35920
  console.log(
36233
- ` ${pc54.cyan("support")} Get help and support contact info
35921
+ ` ${pc53.cyan("support")} Get help and support contact info
36234
35922
  `
36235
35923
  );
36236
35924
  console.log("Options:");
36237
35925
  console.log(
36238
- ` ${pc54.dim("-p, --provider")} Hosting provider (vercel, aws, railway, other)`
36239
- );
36240
- console.log(` ${pc54.dim("-r, --region")} AWS region`);
36241
- console.log(` ${pc54.dim("-d, --domain")} Domain name`);
36242
- console.log(` ${pc54.dim("--account")} AWS account ID or alias`);
36243
- console.log(` ${pc54.dim("--preset")} Configuration preset`);
36244
- console.log(` ${pc54.dim("--token")} API key or token for auth`);
36245
- console.log(` ${pc54.dim("-y, --yes")} Skip confirmation prompts`);
36246
- console.log(` ${pc54.dim("-f, --force")} Force destructive operations`);
35926
+ ` ${pc53.dim("-p, --provider")} Hosting provider (vercel, aws, railway, other)`
35927
+ );
35928
+ console.log(` ${pc53.dim("-r, --region")} AWS region`);
35929
+ console.log(` ${pc53.dim("-d, --domain")} Domain name`);
35930
+ console.log(` ${pc53.dim("--account")} AWS account ID or alias`);
35931
+ console.log(` ${pc53.dim("--preset")} Configuration preset`);
35932
+ console.log(` ${pc53.dim("--token")} API key or token for auth`);
35933
+ console.log(` ${pc53.dim("-y, --yes")} Skip confirmation prompts`);
35934
+ console.log(` ${pc53.dim("-f, --force")} Force destructive operations`);
36247
35935
  console.log(
36248
- ` ${pc54.dim("--preview")} Preview changes without deploying`
35936
+ ` ${pc53.dim("--preview")} Preview changes without deploying`
36249
35937
  );
36250
- console.log(` ${pc54.dim("-v, --version")} Show version number
35938
+ console.log(` ${pc53.dim("-v, --version")} Show version number
36251
35939
  `);
36252
35940
  console.log(
36253
- `Run ${pc54.cyan("wraps <service> <command> --help")} for more information.
35941
+ `Run ${pc53.cyan("wraps <service> <command> --help")} for more information.
36254
35942
  `
36255
35943
  );
36256
35944
  }
@@ -36431,9 +36119,9 @@ args.options([
36431
36119
  defaultValue: false
36432
36120
  },
36433
36121
  {
36434
- name: "name",
36435
- description: "Output file slug for generated workflow",
36436
- defaultValue: void 0
36122
+ name: "draft",
36123
+ description: "Push workflow as draft without enabling it",
36124
+ defaultValue: false
36437
36125
  },
36438
36126
  {
36439
36127
  name: "noExample",
@@ -36460,25 +36148,25 @@ if (!primaryCommand) {
36460
36148
  const telemetry = getTelemetryClient();
36461
36149
  if (telemetry.shouldShowNotification()) {
36462
36150
  console.log();
36463
- clack50.log.info(pc54.bold("Anonymous Telemetry"));
36151
+ clack50.log.info(pc53.bold("Anonymous Telemetry"));
36464
36152
  console.log(
36465
- ` Wraps collects ${pc54.cyan("anonymous usage data")} to improve the CLI.`
36153
+ ` Wraps collects ${pc53.cyan("anonymous usage data")} to improve the CLI.`
36466
36154
  );
36467
36155
  console.log(
36468
- ` We ${pc54.bold("never")} collect: domains, AWS credentials, email content, or PII.`
36156
+ ` We ${pc53.bold("never")} collect: domains, AWS credentials, email content, or PII.`
36469
36157
  );
36470
36158
  console.log(
36471
- ` We ${pc54.bold("only")} collect: command names, success/failure, CLI version, OS.`
36159
+ ` We ${pc53.bold("only")} collect: command names, success/failure, CLI version, OS.`
36472
36160
  );
36473
36161
  console.log();
36474
- console.log(` Opt-out anytime: ${pc54.cyan("wraps telemetry disable")}`);
36475
- console.log(` Or set: ${pc54.cyan("WRAPS_TELEMETRY_DISABLED=1")}`);
36476
- console.log(` Learn more: ${pc54.cyan("https://wraps.dev/docs")}`);
36162
+ console.log(` Opt-out anytime: ${pc53.cyan("wraps telemetry disable")}`);
36163
+ console.log(` Or set: ${pc53.cyan("WRAPS_TELEMETRY_DISABLED=1")}`);
36164
+ console.log(` Learn more: ${pc53.cyan("https://wraps.dev/docs")}`);
36477
36165
  console.log();
36478
36166
  telemetry.markNotificationShown();
36479
36167
  }
36480
36168
  trackCommand("interactive:menu", { success: true, duration_ms: 0 });
36481
- clack50.intro(pc54.bold(`WRAPS CLI v${VERSION}`));
36169
+ clack50.intro(pc53.bold(`WRAPS CLI v${VERSION}`));
36482
36170
  console.log(" Deploy AWS infrastructure to your account.\n");
36483
36171
  const action = await clack50.select({
36484
36172
  message: "What would you like to do?",
@@ -36615,20 +36303,20 @@ async function run() {
36615
36303
  const telemetry = getTelemetryClient();
36616
36304
  if (telemetry.shouldShowNotification()) {
36617
36305
  console.log();
36618
- clack50.log.info(pc54.bold("Anonymous Telemetry"));
36306
+ clack50.log.info(pc53.bold("Anonymous Telemetry"));
36619
36307
  console.log(
36620
- ` Wraps collects ${pc54.cyan("anonymous usage data")} to improve the CLI.`
36308
+ ` Wraps collects ${pc53.cyan("anonymous usage data")} to improve the CLI.`
36621
36309
  );
36622
36310
  console.log(
36623
- ` We ${pc54.bold("never")} collect: domains, AWS credentials, email content, or PII.`
36311
+ ` We ${pc53.bold("never")} collect: domains, AWS credentials, email content, or PII.`
36624
36312
  );
36625
36313
  console.log(
36626
- ` We ${pc54.bold("only")} collect: command names, success/failure, CLI version, OS.`
36314
+ ` We ${pc53.bold("only")} collect: command names, success/failure, CLI version, OS.`
36627
36315
  );
36628
36316
  console.log();
36629
- console.log(` Opt-out anytime: ${pc54.cyan("wraps telemetry disable")}`);
36630
- console.log(` Or set: ${pc54.cyan("WRAPS_TELEMETRY_DISABLED=1")}`);
36631
- console.log(` Learn more: ${pc54.cyan("https://wraps.dev/docs")}`);
36317
+ console.log(` Opt-out anytime: ${pc53.cyan("wraps telemetry disable")}`);
36318
+ console.log(` Or set: ${pc53.cyan("WRAPS_TELEMETRY_DISABLED=1")}`);
36319
+ console.log(` Learn more: ${pc53.cyan("https://wraps.dev/docs")}`);
36632
36320
  console.log();
36633
36321
  telemetry.markNotificationShown();
36634
36322
  }
@@ -36713,7 +36401,7 @@ async function run() {
36713
36401
  clack50.log.error("--domain flag is required");
36714
36402
  console.log(
36715
36403
  `
36716
- Usage: ${pc54.cyan("wraps email verify --domain yourapp.com")}
36404
+ Usage: ${pc53.cyan("wraps email verify --domain yourapp.com")}
36717
36405
  `
36718
36406
  );
36719
36407
  throw new Error("Missing required flag: --domain");
@@ -36769,7 +36457,7 @@ Usage: ${pc54.cyan("wraps email verify --domain yourapp.com")}
36769
36457
  );
36770
36458
  console.log(
36771
36459
  `
36772
- Available commands: ${pc54.cyan("init")}, ${pc54.cyan("destroy")}, ${pc54.cyan("status")}, ${pc54.cyan("verify")}, ${pc54.cyan("test")}
36460
+ Available commands: ${pc53.cyan("init")}, ${pc53.cyan("destroy")}, ${pc53.cyan("status")}, ${pc53.cyan("verify")}, ${pc53.cyan("test")}
36773
36461
  `
36774
36462
  );
36775
36463
  throw new Error(
@@ -36797,7 +36485,7 @@ Available commands: ${pc54.cyan("init")}, ${pc54.cyan("destroy")}, ${pc54.cyan("
36797
36485
  clack50.log.error("--domain flag is required");
36798
36486
  console.log(
36799
36487
  `
36800
- Usage: ${pc54.cyan("wraps email domains verify --domain yourapp.com")}
36488
+ Usage: ${pc53.cyan("wraps email domains verify --domain yourapp.com")}
36801
36489
  `
36802
36490
  );
36803
36491
  throw new Error("Missing required flag: --domain");
@@ -36810,7 +36498,7 @@ Usage: ${pc54.cyan("wraps email domains verify --domain yourapp.com")}
36810
36498
  clack50.log.error("--domain flag is required");
36811
36499
  console.log(
36812
36500
  `
36813
- Usage: ${pc54.cyan("wraps email domains get-dkim --domain yourapp.com")}
36501
+ Usage: ${pc53.cyan("wraps email domains get-dkim --domain yourapp.com")}
36814
36502
  `
36815
36503
  );
36816
36504
  throw new Error("Missing required flag: --domain");
@@ -36823,7 +36511,7 @@ Usage: ${pc54.cyan("wraps email domains get-dkim --domain yourapp.com")}
36823
36511
  clack50.log.error("--domain flag is required");
36824
36512
  console.log(
36825
36513
  `
36826
- Usage: ${pc54.cyan("wraps email domains remove --domain yourapp.com --force")}
36514
+ Usage: ${pc53.cyan("wraps email domains remove --domain yourapp.com --force")}
36827
36515
  `
36828
36516
  );
36829
36517
  throw new Error("Missing required flag: --domain");
@@ -36840,7 +36528,7 @@ Usage: ${pc54.cyan("wraps email domains remove --domain yourapp.com --force")}
36840
36528
  );
36841
36529
  console.log(
36842
36530
  `
36843
- Available commands: ${pc54.cyan("add")}, ${pc54.cyan("list")}, ${pc54.cyan("verify")}, ${pc54.cyan("get-dkim")}, ${pc54.cyan("remove")}
36531
+ Available commands: ${pc53.cyan("add")}, ${pc53.cyan("list")}, ${pc53.cyan("verify")}, ${pc53.cyan("get-dkim")}, ${pc53.cyan("remove")}
36844
36532
  `
36845
36533
  );
36846
36534
  throw new Error(
@@ -36885,7 +36573,7 @@ Available commands: ${pc54.cyan("add")}, ${pc54.cyan("list")}, ${pc54.cyan("veri
36885
36573
  );
36886
36574
  console.log(
36887
36575
  `
36888
- Available commands: ${pc54.cyan("init")}, ${pc54.cyan("push")}, ${pc54.cyan("preview")}
36576
+ Available commands: ${pc53.cyan("init")}, ${pc53.cyan("push")}, ${pc53.cyan("preview")}
36889
36577
  `
36890
36578
  );
36891
36579
  throw new Error(
@@ -36916,27 +36604,20 @@ Available commands: ${pc54.cyan("init")}, ${pc54.cyan("push")}, ${pc54.cyan("pre
36916
36604
  await workflowsPush({
36917
36605
  workflow: flags.workflow,
36918
36606
  dryRun: flags.dryRun,
36607
+ draft: flags.draft,
36919
36608
  force: flags.force,
36920
36609
  yes: flags.yes,
36921
36610
  json: flags.json,
36922
36611
  token: flags.token
36923
36612
  });
36924
36613
  break;
36925
- case "generate":
36926
- await workflowsGenerate({
36927
- template: flags.template,
36928
- name: flags.name,
36929
- force: flags.force,
36930
- json: flags.json
36931
- });
36932
- break;
36933
36614
  default:
36934
36615
  clack50.log.error(
36935
36616
  `Unknown workflows command: ${workflowsSubCommand || "(none)"}`
36936
36617
  );
36937
36618
  console.log(
36938
36619
  `
36939
- Available commands: ${pc54.cyan("init")}, ${pc54.cyan("validate")}, ${pc54.cyan("push")}, ${pc54.cyan("generate")}
36620
+ Available commands: ${pc53.cyan("init")}, ${pc53.cyan("validate")}, ${pc53.cyan("push")}
36940
36621
  `
36941
36622
  );
36942
36623
  throw new Error(
@@ -36957,7 +36638,7 @@ Available commands: ${pc54.cyan("init")}, ${pc54.cyan("validate")}, ${pc54.cyan(
36957
36638
  clack50.log.error(`Unknown email command: ${subCommand}`);
36958
36639
  console.log(
36959
36640
  `
36960
- Run ${pc54.cyan("wraps --help")} for available commands.
36641
+ Run ${pc53.cyan("wraps --help")} for available commands.
36961
36642
  `
36962
36643
  );
36963
36644
  throw new Error(`Unknown email command: ${subCommand}`);
@@ -37035,7 +36716,7 @@ Run ${pc54.cyan("wraps --help")} for available commands.
37035
36716
  clack50.log.error(`Unknown sms command: ${subCommand}`);
37036
36717
  console.log(
37037
36718
  `
37038
- Run ${pc54.cyan("wraps --help")} for available commands.
36719
+ Run ${pc53.cyan("wraps --help")} for available commands.
37039
36720
  `
37040
36721
  );
37041
36722
  throw new Error(`Unknown sms command: ${subCommand}`);
@@ -37099,7 +36780,7 @@ Run ${pc54.cyan("wraps --help")} for available commands.
37099
36780
  clack50.log.error(`Unknown cdn command: ${subCommand}`);
37100
36781
  console.log(
37101
36782
  `
37102
- Run ${pc54.cyan("wraps --help")} for available commands.
36783
+ Run ${pc53.cyan("wraps --help")} for available commands.
37103
36784
  `
37104
36785
  );
37105
36786
  throw new Error(`Unknown cdn command: ${subCommand}`);
@@ -37125,9 +36806,9 @@ Run ${pc54.cyan("wraps --help")} for available commands.
37125
36806
  `Unknown workflow command: ${subCommand || "(none)"}`
37126
36807
  );
37127
36808
  console.log(`
37128
- Available commands: ${pc54.cyan("init")}
36809
+ Available commands: ${pc53.cyan("init")}
37129
36810
  `);
37130
- console.log(`Run ${pc54.cyan("wraps --help")} for more information.
36811
+ console.log(`Run ${pc53.cyan("wraps --help")} for more information.
37131
36812
  `);
37132
36813
  throw new Error(
37133
36814
  `Unknown workflow command: ${subCommand || "(none)"}`
@@ -37172,11 +36853,11 @@ Available commands: ${pc54.cyan("init")}
37172
36853
  clack50.log.error(`Unknown platform command: ${subCommand}`);
37173
36854
  console.log(
37174
36855
  `
37175
- Available commands: ${pc54.cyan("connect")}, ${pc54.cyan("update-role")}
36856
+ Available commands: ${pc53.cyan("connect")}, ${pc53.cyan("update-role")}
37176
36857
  `
37177
36858
  );
37178
36859
  console.log(
37179
- `Run ${pc54.cyan("wraps platform")} for more information.
36860
+ `Run ${pc53.cyan("wraps platform")} for more information.
37180
36861
  `
37181
36862
  );
37182
36863
  throw new Error(`Unknown platform command: ${subCommand}`);
@@ -37204,7 +36885,7 @@ Available commands: ${pc54.cyan("connect")}, ${pc54.cyan("update-role")}
37204
36885
  clack50.log.error(`Unknown auth command: ${subCommand || "(none)"}`);
37205
36886
  console.log(
37206
36887
  `
37207
- Available commands: ${pc54.cyan("login")}, ${pc54.cyan("status")}, ${pc54.cyan("logout")}
36888
+ Available commands: ${pc53.cyan("login")}, ${pc53.cyan("status")}, ${pc53.cyan("logout")}
37208
36889
  `
37209
36890
  );
37210
36891
  throw new Error(`Unknown auth command: ${subCommand || "(none)"}`);
@@ -37225,10 +36906,10 @@ Available commands: ${pc54.cyan("login")}, ${pc54.cyan("status")}, ${pc54.cyan("
37225
36906
  clack50.log.error(`Unknown aws command: ${subCommand}`);
37226
36907
  console.log(
37227
36908
  `
37228
- Available commands: ${pc54.cyan("setup")}, ${pc54.cyan("doctor")}
36909
+ Available commands: ${pc53.cyan("setup")}, ${pc53.cyan("doctor")}
37229
36910
  `
37230
36911
  );
37231
- console.log(`Run ${pc54.cyan("wraps --help")} for more information.
36912
+ console.log(`Run ${pc53.cyan("wraps --help")} for more information.
37232
36913
  `);
37233
36914
  throw new Error(`Unknown aws command: ${subCommand}`);
37234
36915
  }
@@ -37304,7 +36985,7 @@ Available commands: ${pc54.cyan("setup")}, ${pc54.cyan("doctor")}
37304
36985
  clack50.log.error(`Unknown telemetry command: ${subCommand}`);
37305
36986
  console.log(
37306
36987
  `
37307
- Available commands: ${pc54.cyan("enable")}, ${pc54.cyan("disable")}, ${pc54.cyan("status")}
36988
+ Available commands: ${pc53.cyan("enable")}, ${pc53.cyan("disable")}, ${pc53.cyan("status")}
37308
36989
  `
37309
36990
  );
37310
36991
  throw new Error(`Unknown telemetry command: ${subCommand}`);
@@ -37331,7 +37012,7 @@ Please specify a command for ${primaryCommand} service.
37331
37012
  clack50.log.error(`Unknown command: ${primaryCommand}`);
37332
37013
  console.log(
37333
37014
  `
37334
- Run ${pc54.cyan("wraps --help")} for available commands.
37015
+ Run ${pc53.cyan("wraps --help")} for available commands.
37335
37016
  `
37336
37017
  );
37337
37018
  throw new Error(`Unknown command: ${primaryCommand}`);