@wraps.dev/cli 2.30.3 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/README.md +13 -14
  2. package/dist/cli.js +16266 -17099
  3. package/dist/cli.js.map +1 -1
  4. package/dist/console/assets/index-Cv-QsoKP.css +1 -0
  5. package/dist/console/assets/index-D-ml23Id.js +127 -0
  6. package/dist/console/assets/{index-C6gZtoa3.js → index-OqgjYuh3.js} +1 -1
  7. package/dist/console/assets/{optimizer.worker-DZcD7Kza.js → optimizer.worker-Cjnw_FT2.js} +1 -1
  8. package/dist/console/assets/{webp_enc_simd-D5IXDjAy.js → webp_enc_simd-0PCv9qCn.js} +2 -2
  9. package/dist/console/index.html +2 -2
  10. package/dist/lambda/agent-enforcer/.bundled +1 -1
  11. package/dist/lambda/agent-enforcer/index.js +16 -3
  12. package/dist/lambda/event-processor/.bundled +1 -1
  13. package/dist/lambda/event-processor/index.js +16 -3
  14. package/dist/lambda/inbound-processor/.bundled +1 -1
  15. package/dist/lambda/inbound-processor/index.js +66 -53
  16. package/dist/lambda/sms-event-processor/.bundled +1 -1
  17. package/dist/lambda/sms-event-processor/index.js +16 -3
  18. package/package.json +7 -7
  19. package/dist/api-lambda.zip +0 -0
  20. package/dist/console/assets/index-BP4FpEpn.css +0 -1
  21. package/dist/console/assets/index-P0x5JCC4.js +0 -127
  22. package/dist/selfhost-migrations/0000_absent_rogue.sql +0 -203
  23. package/dist/selfhost-migrations/0001_polite_maverick.sql +0 -17
  24. package/dist/selfhost-migrations/0002_perpetual_scorpion.sql +0 -1
  25. package/dist/selfhost-migrations/0003_wealthy_absorbing_man.sql +0 -1
  26. package/dist/selfhost-migrations/0004_opposite_blur.sql +0 -1
  27. package/dist/selfhost-migrations/0005_clear_terror.sql +0 -4
  28. package/dist/selfhost-migrations/0006_soft_black_widow.sql +0 -20
  29. package/dist/selfhost-migrations/0007_dazzling_saracen.sql +0 -124
  30. package/dist/selfhost-migrations/0008_broad_hannibal_king.sql +0 -33
  31. package/dist/selfhost-migrations/0009_bouncy_mystique.sql +0 -73
  32. package/dist/selfhost-migrations/0010_cheerful_valeria_richards.sql +0 -18
  33. package/dist/selfhost-migrations/0011_absent_thunderbolts.sql +0 -2
  34. package/dist/selfhost-migrations/0012_demonic_donald_blake.sql +0 -1
  35. package/dist/selfhost-migrations/0013_nifty_preak.sql +0 -143
  36. package/dist/selfhost-migrations/0014_hesitant_beast.sql +0 -2
  37. package/dist/selfhost-migrations/0015_blue_giant_girl.sql +0 -1
  38. package/dist/selfhost-migrations/0016_cooing_overlord.sql +0 -1
  39. package/dist/selfhost-migrations/0017_tranquil_ender_wiggin.sql +0 -11
  40. package/dist/selfhost-migrations/0018_talented_groot.sql +0 -8
  41. package/dist/selfhost-migrations/0019_ambitious_devos.sql +0 -3
  42. package/dist/selfhost-migrations/0020_misty_master_mold.sql +0 -95
  43. package/dist/selfhost-migrations/0021_regular_harrier.sql +0 -14
  44. package/dist/selfhost-migrations/0022_sour_blizzard.sql +0 -10
  45. package/dist/selfhost-migrations/0023_flawless_psynapse.sql +0 -1
  46. package/dist/selfhost-migrations/0024_premium_blindfold.sql +0 -1
  47. package/dist/selfhost-migrations/0025_unusual_santa_claus.sql +0 -1
  48. package/dist/selfhost-migrations/0026_volatile_pandemic.sql +0 -2
  49. package/dist/selfhost-migrations/0027_workable_logan.sql +0 -4
  50. package/dist/selfhost-migrations/0028_familiar_prodigy.sql +0 -1
  51. package/dist/selfhost-migrations/0029_cute_maddog.sql +0 -13
  52. package/dist/selfhost-migrations/0030_adorable_scarecrow.sql +0 -1
  53. package/dist/selfhost-migrations/0031_material_slapstick.sql +0 -10
  54. package/dist/selfhost-migrations/0032_hot_dust.sql +0 -11
  55. package/dist/selfhost-migrations/0033_slow_deathbird.sql +0 -1
  56. package/dist/selfhost-migrations/0034_lush_rafael_vega.sql +0 -12
  57. package/dist/selfhost-migrations/0035_normal_red_hulk.sql +0 -8
  58. package/dist/selfhost-migrations/0036_marvelous_ezekiel.sql +0 -1
  59. package/dist/selfhost-migrations/0037_swift_talisman.sql +0 -8
  60. package/dist/selfhost-migrations/0038_first_mandroid.sql +0 -1
  61. package/dist/selfhost-migrations/0039_fixed_stryfe.sql +0 -1
  62. package/dist/selfhost-migrations/0040_add_channel_check_constraints.sql +0 -2
  63. package/dist/selfhost-migrations/0041_black_spencer_smythe.sql +0 -1
  64. package/dist/selfhost-migrations/0042_plain_marvel_zombies.sql +0 -2
  65. package/dist/selfhost-migrations/0043_curved_champions.sql +0 -1
  66. package/dist/selfhost-migrations/0044_clean_iceman.sql +0 -1
  67. package/dist/selfhost-migrations/0045_condemned_steel_serpent.sql +0 -1
  68. package/dist/selfhost-migrations/0046_steep_ultimo.sql +0 -2
  69. package/dist/selfhost-migrations/0047_empty_sleepwalker.sql +0 -2
  70. package/dist/selfhost-migrations/0048_cheerful_multiple_man.sql +0 -1
  71. package/dist/selfhost-migrations/0049_nostalgic_loki.sql +0 -3
  72. package/dist/selfhost-migrations/0050_add_engagement_metadata.sql +0 -4
  73. package/dist/selfhost-migrations/0051_odd_marrow.sql +0 -2
  74. package/dist/selfhost-migrations/0052_redundant_siren.sql +0 -5
  75. package/dist/selfhost-migrations/0053_soft_carnage.sql +0 -31
  76. package/dist/selfhost-migrations/0054_blushing_vin_gonzales.sql +0 -1
  77. package/dist/selfhost-migrations/0055_broadcast_resume_columns.sql +0 -12
  78. package/dist/selfhost-migrations/0056_broadcast_resume_dedup_cleanup.sql +0 -31
  79. package/dist/selfhost-migrations/0057_audit_log_actoremail_jsonb.sql +0 -5
  80. package/dist/selfhost-migrations/0058_email_log_sent_at_idx.sql +0 -1
  81. package/dist/selfhost-migrations/0059_message_send_claimed_at.sql +0 -1
  82. package/dist/selfhost-migrations/0060_harsh_nehzno.sql +0 -1
  83. package/dist/selfhost-migrations/0061_flashy_spirit.sql +0 -1
  84. package/dist/selfhost-migrations/0062_next_timeslip.sql +0 -2
  85. package/dist/selfhost-migrations/0063_greedy_legion.sql +0 -17
  86. package/dist/selfhost-migrations/0064_wise_brood.sql +0 -42
  87. package/dist/selfhost-migrations/0065_public_the_fallen.sql +0 -2
  88. package/dist/selfhost-migrations/0066_odd_yellow_claw.sql +0 -3
  89. package/dist/selfhost-migrations/0067_empty_ultimo.sql +0 -1
  90. package/dist/selfhost-migrations/0068_abandoned_mephisto.sql +0 -1
  91. package/dist/selfhost-migrations/0069_abnormal_zuras.sql +0 -1
  92. package/dist/selfhost-migrations/CLAUDE.md +0 -49
  93. package/dist/selfhost-migrations/meta/0000_snapshot.json +0 -1311
  94. package/dist/selfhost-migrations/meta/0001_snapshot.json +0 -1454
  95. package/dist/selfhost-migrations/meta/0002_snapshot.json +0 -1460
  96. package/dist/selfhost-migrations/meta/0003_snapshot.json +0 -1467
  97. package/dist/selfhost-migrations/meta/0004_snapshot.json +0 -1473
  98. package/dist/selfhost-migrations/meta/0005_snapshot.json +0 -1499
  99. package/dist/selfhost-migrations/meta/0006_snapshot.json +0 -1617
  100. package/dist/selfhost-migrations/meta/0007_snapshot.json +0 -2581
  101. package/dist/selfhost-migrations/meta/0008_snapshot.json +0 -2861
  102. package/dist/selfhost-migrations/meta/0009_snapshot.json +0 -3447
  103. package/dist/selfhost-migrations/meta/0010_snapshot.json +0 -3586
  104. package/dist/selfhost-migrations/meta/0011_snapshot.json +0 -3600
  105. package/dist/selfhost-migrations/meta/0012_snapshot.json +0 -3607
  106. package/dist/selfhost-migrations/meta/0013_snapshot.json +0 -4697
  107. package/dist/selfhost-migrations/meta/0014_snapshot.json +0 -4704
  108. package/dist/selfhost-migrations/meta/0015_snapshot.json +0 -4697
  109. package/dist/selfhost-migrations/meta/0016_snapshot.json +0 -4703
  110. package/dist/selfhost-migrations/meta/0017_snapshot.json +0 -4769
  111. package/dist/selfhost-migrations/meta/0018_snapshot.json +0 -4821
  112. package/dist/selfhost-migrations/meta/0019_snapshot.json +0 -4840
  113. package/dist/selfhost-migrations/meta/0020_snapshot.json +0 -5602
  114. package/dist/selfhost-migrations/meta/0021_snapshot.json +0 -5729
  115. package/dist/selfhost-migrations/meta/0022_snapshot.json +0 -5792
  116. package/dist/selfhost-migrations/meta/0023_snapshot.json +0 -5799
  117. package/dist/selfhost-migrations/meta/0024_snapshot.json +0 -5821
  118. package/dist/selfhost-migrations/meta/0025_snapshot.json +0 -5831
  119. package/dist/selfhost-migrations/meta/0026_snapshot.json +0 -5844
  120. package/dist/selfhost-migrations/meta/0027_snapshot.json +0 -5864
  121. package/dist/selfhost-migrations/meta/0028_snapshot.json +0 -5871
  122. package/dist/selfhost-migrations/meta/0029_snapshot.json +0 -5984
  123. package/dist/selfhost-migrations/meta/0030_snapshot.json +0 -5990
  124. package/dist/selfhost-migrations/meta/0031_snapshot.json +0 -5950
  125. package/dist/selfhost-migrations/meta/0032_snapshot.json +0 -6042
  126. package/dist/selfhost-migrations/meta/0033_snapshot.json +0 -6057
  127. package/dist/selfhost-migrations/meta/0034_snapshot.json +0 -6130
  128. package/dist/selfhost-migrations/meta/0035_snapshot.json +0 -6195
  129. package/dist/selfhost-migrations/meta/0036_snapshot.json +0 -6201
  130. package/dist/selfhost-migrations/meta/0037_snapshot.json +0 -6265
  131. package/dist/selfhost-migrations/meta/0038_snapshot.json +0 -6271
  132. package/dist/selfhost-migrations/meta/0039_snapshot.json +0 -6278
  133. package/dist/selfhost-migrations/meta/0041_snapshot.json +0 -6284
  134. package/dist/selfhost-migrations/meta/0042_snapshot.json +0 -6297
  135. package/dist/selfhost-migrations/meta/0043_snapshot.json +0 -6297
  136. package/dist/selfhost-migrations/meta/0044_snapshot.json +0 -6297
  137. package/dist/selfhost-migrations/meta/0045_snapshot.json +0 -6303
  138. package/dist/selfhost-migrations/meta/0046_snapshot.json +0 -6315
  139. package/dist/selfhost-migrations/meta/0047_snapshot.json +0 -6330
  140. package/dist/selfhost-migrations/meta/0048_snapshot.json +0 -6336
  141. package/dist/selfhost-migrations/meta/0049_snapshot.json +0 -6366
  142. package/dist/selfhost-migrations/meta/0050_snapshot.json +0 -6390
  143. package/dist/selfhost-migrations/meta/0051_snapshot.json +0 -6403
  144. package/dist/selfhost-migrations/meta/0052_snapshot.json +0 -6470
  145. package/dist/selfhost-migrations/meta/0053_snapshot.json +0 -6470
  146. package/dist/selfhost-migrations/meta/0054_snapshot.json +0 -6646
  147. package/dist/selfhost-migrations/meta/0055_snapshot.json +0 -6713
  148. package/dist/selfhost-migrations/meta/0056_snapshot.json +0 -6713
  149. package/dist/selfhost-migrations/meta/0057_snapshot.json +0 -6731
  150. package/dist/selfhost-migrations/meta/0059_snapshot.json +0 -6764
  151. package/dist/selfhost-migrations/meta/0060_snapshot.json +0 -7125
  152. package/dist/selfhost-migrations/meta/0061_snapshot.json +0 -7131
  153. package/dist/selfhost-migrations/meta/0062_snapshot.json +0 -7143
  154. package/dist/selfhost-migrations/meta/0063_snapshot.json +0 -7282
  155. package/dist/selfhost-migrations/meta/0064_snapshot.json +0 -7626
  156. package/dist/selfhost-migrations/meta/0065_snapshot.json +0 -7662
  157. package/dist/selfhost-migrations/meta/0066_snapshot.json +0 -7682
  158. package/dist/selfhost-migrations/meta/0067_snapshot.json +0 -7688
  159. package/dist/selfhost-migrations/meta/0068_snapshot.json +0 -7694
  160. package/dist/selfhost-migrations/meta/0069_snapshot.json +0 -7700
  161. package/dist/selfhost-migrations/meta/_journal.json +0 -496
package/README.md CHANGED
@@ -363,22 +363,19 @@ wraps cdn init --provider vercel --region us-east-1 --domain cdn.myapp.com
363
363
  Run the Wraps control plane in your own AWS account instead of app.wraps.dev.
364
364
  Requires an enterprise license key.
365
365
 
366
+ Deploy it with `pnpm selfhost:deploy` from a fork — see the
367
+ [self-hosted guide](https://wraps.dev/docs/guides/self-hosted). These commands
368
+ operate on a deployment that already exists:
369
+
366
370
  | Command | Description |
367
371
  |---------|-------------|
368
- | `wraps selfhost deploy` | Deploy an API-only control plane to your AWS account |
369
- | `wraps selfhost upgrade` | Rebuild and redeploy the self-hosted API |
370
372
  | `wraps selfhost status` | Show self-hosted deployment details |
371
373
  | `wraps selfhost env` | Print env vars for hosting `apps/web` against your control plane |
372
374
  | `wraps selfhost login` | Sign in to your self-hosted instance (not wraps.dev) |
373
375
  | `wraps selfhost logout` | Sign out of your self-hosted instance |
374
376
  | `wraps selfhost connect` | Connect your AWS account to your self-hosted instance |
375
377
  | `wraps selfhost update-role` | Refresh your self-hosted console role's permissions |
376
- | `wraps selfhost destroy` | Tear down the self-hosted control plane |
377
-
378
- `wraps selfhost deploy` gives you the API only — you host the dashboard
379
- yourself. For the full platform (API, dashboard, and workers) deployed via SST
380
- from a fork, see the [self-hosted guide](https://wraps.dev/docs/guides/self-hosted).
381
- The two variants cannot coexist in one AWS account.
378
+ | `wraps selfhost logs` | Stream logs from your self-hosted API, dashboard, and workers |
382
379
 
383
380
  `selfhost connect` and `selfhost update-role` write
384
381
  `wraps-selfhost-console-access-role`, which trusts your own AWS account. Their
@@ -434,13 +431,12 @@ The CLI offers four presets that control which AWS resources are created:
434
431
  - Everything in Starter
435
432
  - EventBridge → SQS → Lambda pipeline
436
433
  - DynamoDB table with 90-day TTL
437
- - Tracks: SEND, DELIVERY, OPEN, CLICK, BOUNCE, COMPLAINT
434
+ - Tracks all 10 registered SES event types: SEND, DELIVERY, OPEN, CLICK, BOUNCE, COMPLAINT, REJECT, RENDERING_FAILURE, DELIVERY_DELAY, SUBSCRIPTION
438
435
 
439
436
  ### Enterprise (~$50-100/mo)
440
437
  - Everything in Production
441
438
  - Dedicated IP address ($24.95/mo from AWS)
442
- - 1-year DynamoDB TTL
443
- - All 10 SES event types (adds REJECT, RENDERING_FAILURE, DELIVERY_DELAY, SUBSCRIPTION)
439
+ - 1-year DynamoDB TTL (Production's is 90 days; event-type coverage is the same as Production)
444
440
 
445
441
  ### Custom
446
442
  Select individual features. Useful if you want event storage without a dedicated IP, or specific event types only.
@@ -690,8 +686,6 @@ packages/cli/
690
686
  │ │ ├── smtp-credentials.ts
691
687
  │ │ └── alerting.ts # CloudWatch alerting
692
688
  │ ├── console/ # Web dashboard (React)
693
- │ ├── lambda/ # Lambda function source
694
- │ │ └── event-processor/ # SQS → DynamoDB processor
695
689
  │ ├── utils/ # Utilities
696
690
  │ │ ├── shared/ # Shared utilities
697
691
  │ │ │ ├── aws.ts # AWS SDK helpers
@@ -710,12 +704,17 @@ packages/cli/
710
704
  │ ├── shared.ts # Shared types
711
705
  │ ├── email.ts # Email-specific types
712
706
  │ └── sms.ts # SMS-specific types
713
- ├── lambda/ # Lambda source (bundled to dist)
714
707
  └── dist/ # Build output
715
708
  ├── console/ # Built dashboard
716
709
  └── lambda/ # Lambda source for deployment
717
710
  ```
718
711
 
712
+ Lambda function source (`event-processor`, `sms-event-processor`, `inbound-processor`,
713
+ `agent-enforcer`) lives in the sibling `packages/core/lambda/` package, not in this one.
714
+ `scripts/build-lambda.ts` copies the built output into `dist/lambda/` above during
715
+ `pnpm build`; `infrastructure/resources/lambda.ts` reads from there (or from `packages/core/lambda/`
716
+ directly in local dev — see `getLambdaCode()`).
717
+
719
718
  ## AWS Permissions
720
719
 
721
720
  Wraps needs specific IAM permissions to deploy and manage infrastructure in your AWS account. Use the `wraps permissions` command to see exactly what's required.