@wraps.dev/cli 0.3.3 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +263 -69
- package/dist/cli.js +3475 -3150
- package/dist/cli.js.map +1 -1
- package/dist/console/assets/index-Drfdkl-3.js +361 -0
- package/dist/console/index.html +1 -1
- package/dist/lambda/event-processor/.bundled +1 -1
- package/dist/lambda/event-processor/index.mjs +1 -1
- package/package.json +5 -4
- package/dist/console/assets/index-BmOMPb6r.js +0 -381
package/README.md
CHANGED
|
@@ -44,10 +44,10 @@ npx @wraps.dev/cli init
|
|
|
44
44
|
|
|
45
45
|
## Quick Start
|
|
46
46
|
|
|
47
|
-
### 1. Deploy New Infrastructure
|
|
47
|
+
### 1. Deploy New Email Infrastructure
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
|
-
wraps init
|
|
50
|
+
wraps email init
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
This will:
|
|
@@ -91,15 +91,17 @@ wraps status
|
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
Shows:
|
|
94
|
-
- Active features and configuration
|
|
95
|
-
- AWS region
|
|
94
|
+
- Active features and configuration across all services
|
|
95
|
+
- AWS region and account
|
|
96
96
|
- Verified domains
|
|
97
97
|
- Deployed resources
|
|
98
|
-
- Links to
|
|
98
|
+
- Links to dashboard
|
|
99
99
|
|
|
100
100
|
## Commands
|
|
101
101
|
|
|
102
|
-
###
|
|
102
|
+
### Email Commands
|
|
103
|
+
|
|
104
|
+
#### `wraps email init`
|
|
103
105
|
|
|
104
106
|
Deploy new email infrastructure to your AWS account.
|
|
105
107
|
|
|
@@ -107,89 +109,216 @@ Deploy new email infrastructure to your AWS account.
|
|
|
107
109
|
- `-p, --provider <provider>` - Hosting provider (vercel, aws, railway, other)
|
|
108
110
|
- `-r, --region <region>` - AWS region (default: us-east-1)
|
|
109
111
|
- `-d, --domain <domain>` - Domain to verify (optional)
|
|
112
|
+
- `--preset <preset>` - Configuration preset (starter, production, enterprise, custom)
|
|
113
|
+
- `-y, --yes` - Skip confirmation prompts
|
|
110
114
|
|
|
111
115
|
**Examples:**
|
|
112
116
|
|
|
113
117
|
```bash
|
|
114
118
|
# Interactive mode (recommended)
|
|
115
|
-
wraps init
|
|
119
|
+
wraps email init
|
|
116
120
|
|
|
117
121
|
# With flags
|
|
118
|
-
wraps init --provider vercel --region us-east-1 --domain myapp.com
|
|
122
|
+
wraps email init --provider vercel --region us-east-1 --domain myapp.com --preset production
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
#### `wraps email connect`
|
|
126
|
+
|
|
127
|
+
Connect to existing AWS SES infrastructure and add Wraps features.
|
|
128
|
+
|
|
129
|
+
**Example:**
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
wraps email connect
|
|
119
133
|
```
|
|
120
134
|
|
|
121
|
-
|
|
135
|
+
#### `wraps email domains`
|
|
122
136
|
|
|
123
|
-
|
|
137
|
+
Manage SES domains (add, list, verify, get DKIM tokens, remove).
|
|
138
|
+
|
|
139
|
+
##### `wraps email domains add`
|
|
140
|
+
|
|
141
|
+
Add a new domain to SES with DKIM signing.
|
|
124
142
|
|
|
125
143
|
**Options:**
|
|
126
|
-
-
|
|
144
|
+
- `-d, --domain <domain>` - Domain to add
|
|
127
145
|
|
|
128
146
|
**Example:**
|
|
129
147
|
|
|
130
148
|
```bash
|
|
131
|
-
wraps
|
|
149
|
+
wraps email domains add --domain myapp.com
|
|
132
150
|
```
|
|
133
151
|
|
|
134
|
-
|
|
152
|
+
##### `wraps email domains list`
|
|
135
153
|
|
|
136
|
-
|
|
154
|
+
List all SES domains with verification status.
|
|
155
|
+
|
|
156
|
+
**Example:**
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
wraps email domains list
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
##### `wraps email domains get-dkim`
|
|
163
|
+
|
|
164
|
+
Get DKIM tokens for a domain (for DNS configuration).
|
|
137
165
|
|
|
138
166
|
**Options:**
|
|
139
|
-
-
|
|
167
|
+
- `-d, --domain <domain>` - Domain to get DKIM tokens for
|
|
140
168
|
|
|
141
169
|
**Example:**
|
|
142
170
|
|
|
143
171
|
```bash
|
|
144
|
-
wraps
|
|
172
|
+
wraps email domains get-dkim --domain myapp.com
|
|
145
173
|
```
|
|
146
174
|
|
|
147
|
-
|
|
175
|
+
##### `wraps email domains verify`
|
|
148
176
|
|
|
149
|
-
|
|
177
|
+
Verify domain DNS records (DKIM, SPF, DMARC, MX).
|
|
178
|
+
|
|
179
|
+
**Options:**
|
|
180
|
+
- `-d, --domain <domain>` - Domain to verify
|
|
150
181
|
|
|
151
182
|
**Example:**
|
|
152
183
|
|
|
153
184
|
```bash
|
|
154
|
-
wraps
|
|
185
|
+
wraps email domains verify --domain myapp.com
|
|
155
186
|
```
|
|
156
187
|
|
|
157
|
-
|
|
188
|
+
##### `wraps email domains remove`
|
|
189
|
+
|
|
190
|
+
Remove a domain from SES.
|
|
191
|
+
|
|
192
|
+
**Options:**
|
|
193
|
+
- `-d, --domain <domain>` - Domain to remove
|
|
194
|
+
- `-f, --force` - Skip confirmation prompt
|
|
195
|
+
|
|
196
|
+
**Example:**
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
wraps email domains remove --domain myapp.com
|
|
200
|
+
wraps email domains remove --domain myapp.com --force # Skip confirmation
|
|
201
|
+
```
|
|
158
202
|
|
|
159
|
-
|
|
203
|
+
#### `wraps email upgrade`
|
|
160
204
|
|
|
161
|
-
|
|
205
|
+
Add features to existing infrastructure incrementally without redeployment.
|
|
162
206
|
|
|
163
207
|
**Options:**
|
|
164
|
-
- `-
|
|
208
|
+
- `-r, --region <region>` - AWS region (uses saved connection if not specified)
|
|
209
|
+
- `-y, --yes` - Skip confirmation prompts
|
|
165
210
|
|
|
166
211
|
**Example:**
|
|
167
212
|
|
|
168
213
|
```bash
|
|
169
|
-
wraps
|
|
214
|
+
wraps email upgrade
|
|
170
215
|
```
|
|
171
216
|
|
|
172
|
-
|
|
217
|
+
Interactive wizard allows you to add:
|
|
218
|
+
|
|
219
|
+
**Configuration Presets:**
|
|
220
|
+
- Upgrade to a higher preset (Starter → Production → Enterprise)
|
|
221
|
+
- Each preset includes additional features with transparent cost estimates
|
|
222
|
+
|
|
223
|
+
**Domain Configuration:**
|
|
224
|
+
- **MAIL FROM Domain** - Custom MAIL FROM domain for better DMARC alignment
|
|
225
|
+
- Default: `mail.{yourdomain.com}`
|
|
226
|
+
- Requires MX and SPF DNS records
|
|
227
|
+
- Improves email deliverability and sender reputation
|
|
228
|
+
|
|
229
|
+
- **Custom Tracking Domain** - Branded tracking domain for opens/clicks
|
|
230
|
+
- Use your own domain instead of AWS default (`r.{region}.awstrack.me`)
|
|
231
|
+
- Requires single CNAME DNS record
|
|
232
|
+
- Improves email appearance and trust
|
|
233
|
+
- **Note:** Currently uses HTTP (not HTTPS). CloudFront + SSL support coming in v1.1.0
|
|
234
|
+
|
|
235
|
+
**Event Tracking:**
|
|
236
|
+
- Customize tracked SES event types (SEND, DELIVERY, OPEN, CLICK, BOUNCE, COMPLAINT, etc.)
|
|
237
|
+
- Select specific events to reduce processing costs
|
|
238
|
+
- Full control over what gets stored in DynamoDB
|
|
239
|
+
|
|
240
|
+
**Email History:**
|
|
241
|
+
- Change retention period (7 days, 30 days, 90 days, 1 year)
|
|
242
|
+
- Adjust based on compliance requirements
|
|
243
|
+
- Transparent DynamoDB storage cost updates
|
|
244
|
+
|
|
245
|
+
**Advanced Features:**
|
|
246
|
+
- **Dedicated IP Address** - Reserved IP for high-volume sending
|
|
247
|
+
- Improves sender reputation control
|
|
248
|
+
- Required for 50,000+ emails/day
|
|
249
|
+
- Additional AWS charges apply (~$24.95/month)
|
|
250
|
+
|
|
251
|
+
#### `wraps email restore`
|
|
173
252
|
|
|
174
|
-
|
|
253
|
+
Restore infrastructure from saved metadata.
|
|
254
|
+
|
|
255
|
+
**Options:**
|
|
256
|
+
- `-r, --region <region>` - AWS region to restore from
|
|
257
|
+
- `-f, --force` - Force restore without confirmation (destructive)
|
|
258
|
+
|
|
259
|
+
**Example:**
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
wraps email restore
|
|
263
|
+
wraps email restore --region us-west-2 --force # Skip confirmation
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Global Commands
|
|
267
|
+
|
|
268
|
+
These commands work across all services (email, SMS when available):
|
|
269
|
+
|
|
270
|
+
#### `wraps status`
|
|
271
|
+
|
|
272
|
+
Show infrastructure status across all services.
|
|
273
|
+
|
|
274
|
+
**Options:**
|
|
275
|
+
- `--account <account>` - Filter by AWS account ID or alias
|
|
276
|
+
|
|
277
|
+
**Example:**
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
wraps status
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Shows:
|
|
284
|
+
- Active services and their configurations
|
|
285
|
+
- AWS region and account
|
|
286
|
+
- Verified domains
|
|
287
|
+
- Deployed resources
|
|
288
|
+
- Links to dashboard
|
|
289
|
+
|
|
290
|
+
#### `wraps dashboard`
|
|
291
|
+
|
|
292
|
+
Launch local web dashboard for monitoring all services.
|
|
293
|
+
|
|
294
|
+
**Options:**
|
|
295
|
+
- `--port <port>` - Port to run dashboard on (default: 5555)
|
|
296
|
+
- `--no-open` - Don't automatically open browser
|
|
175
297
|
|
|
176
298
|
**Example:**
|
|
177
299
|
|
|
178
300
|
```bash
|
|
179
|
-
wraps
|
|
301
|
+
wraps dashboard
|
|
302
|
+
wraps dashboard --port 3000 --no-open
|
|
180
303
|
```
|
|
181
304
|
|
|
182
|
-
|
|
305
|
+
Opens at `http://localhost:5555` with real-time tracking for email activity, delivery rates, bounces, complaints, and more.
|
|
306
|
+
|
|
307
|
+
#### `wraps destroy`
|
|
183
308
|
|
|
184
|
-
Remove all deployed
|
|
309
|
+
Remove all deployed infrastructure across all services.
|
|
310
|
+
|
|
311
|
+
**Options:**
|
|
312
|
+
- `-f, --force` - Force destroy without confirmation (destructive)
|
|
185
313
|
|
|
186
314
|
**Example:**
|
|
187
315
|
|
|
188
316
|
```bash
|
|
189
317
|
wraps destroy
|
|
318
|
+
wraps destroy --force # Skip confirmation
|
|
190
319
|
```
|
|
191
320
|
|
|
192
|
-
|
|
321
|
+
#### `wraps completion`
|
|
193
322
|
|
|
194
323
|
Generate shell completion script.
|
|
195
324
|
|
|
@@ -199,6 +328,19 @@ Generate shell completion script.
|
|
|
199
328
|
wraps completion
|
|
200
329
|
```
|
|
201
330
|
|
|
331
|
+
### Legacy Commands (Deprecated)
|
|
332
|
+
|
|
333
|
+
For backwards compatibility, these commands still work but show deprecation warnings:
|
|
334
|
+
|
|
335
|
+
```bash
|
|
336
|
+
wraps init # → Use 'wraps email init'
|
|
337
|
+
wraps connect # → Use 'wraps email connect'
|
|
338
|
+
wraps verify # → Use 'wraps email domains verify'
|
|
339
|
+
wraps upgrade # → Use 'wraps email upgrade'
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
**Note:** `status`, `dashboard`, and `destroy` are now global commands that work across all services.
|
|
343
|
+
|
|
202
344
|
## Configuration Presets
|
|
203
345
|
|
|
204
346
|
Wraps offers feature-based configuration presets with transparent cost estimates:
|
|
@@ -300,18 +442,24 @@ pnpm typecheck
|
|
|
300
442
|
```
|
|
301
443
|
packages/cli/
|
|
302
444
|
├── src/
|
|
303
|
-
│ ├── cli.ts # Entry point
|
|
445
|
+
│ ├── cli.ts # Entry point (multi-service router)
|
|
304
446
|
│ ├── commands/ # CLI commands
|
|
305
|
-
│ │ ├──
|
|
306
|
-
│ │ ├──
|
|
307
|
-
│ │ ├──
|
|
308
|
-
│ │ ├──
|
|
309
|
-
│ │ ├──
|
|
310
|
-
│ │ ├──
|
|
311
|
-
│ │
|
|
447
|
+
│ │ ├── email/ # Email service commands
|
|
448
|
+
│ │ │ ├── init.ts # Deploy email infrastructure
|
|
449
|
+
│ │ │ ├── connect.ts # Connect existing SES
|
|
450
|
+
│ │ │ ├── console.ts # Email dashboard
|
|
451
|
+
│ │ │ ├── status.ts # Show email setup
|
|
452
|
+
│ │ │ ├── verify.ts # DNS verification
|
|
453
|
+
│ │ │ ├── upgrade.ts # Add email features
|
|
454
|
+
│ │ │ ├── restore.ts # Restore from metadata
|
|
455
|
+
│ │ │ └── destroy.ts # Remove email infrastructure
|
|
456
|
+
│ │ ├── sms/ # SMS service commands (coming soon)
|
|
457
|
+
│ │ ├── init.ts # Legacy command (deprecated)
|
|
458
|
+
│ │ ├── status.ts # Legacy command (deprecated)
|
|
459
|
+
│ │ └── ... # Other legacy commands
|
|
312
460
|
│ ├── infrastructure/ # Pulumi stacks
|
|
313
|
-
│ │ ├── email-stack.ts #
|
|
314
|
-
│ │ ├── vercel-oidc.ts # Vercel OIDC setup
|
|
461
|
+
│ │ ├── email-stack.ts # Email infrastructure stack
|
|
462
|
+
│ │ ├── vercel-oidc.ts # Vercel OIDC provider setup
|
|
315
463
|
│ │ └── resources/ # Resource definitions
|
|
316
464
|
│ │ ├── iam.ts # IAM roles and policies
|
|
317
465
|
│ │ ├── ses.ts # SES configuration
|
|
@@ -323,14 +471,23 @@ packages/cli/
|
|
|
323
471
|
│ ├── lambda/ # Lambda function source
|
|
324
472
|
│ │ └── event-processor/ # SQS → DynamoDB processor
|
|
325
473
|
│ ├── utils/ # Utilities
|
|
326
|
-
│ │ ├──
|
|
327
|
-
│ │ ├──
|
|
328
|
-
│ │ ├──
|
|
329
|
-
│ │ ├──
|
|
330
|
-
│ │ ├── errors.ts
|
|
331
|
-
│ │
|
|
474
|
+
│ │ ├── shared/ # Shared utilities
|
|
475
|
+
│ │ │ ├── aws.ts # AWS SDK helpers
|
|
476
|
+
│ │ │ ├── prompts.ts # Interactive prompts
|
|
477
|
+
│ │ │ ├── metadata.ts # Multi-service metadata
|
|
478
|
+
│ │ │ ├── errors.ts # Error handling
|
|
479
|
+
│ │ │ ├── output.ts # Console formatting
|
|
480
|
+
│ │ │ ├── fs.ts # File system helpers
|
|
481
|
+
│ │ │ └── pulumi.ts # Pulumi utilities
|
|
482
|
+
│ │ └── email/ # Email-specific utilities
|
|
483
|
+
│ │ ├── costs.ts # Cost calculations
|
|
484
|
+
│ │ ├── presets.ts # Config presets
|
|
485
|
+
│ │ └── route53.ts # DNS helpers
|
|
332
486
|
│ └── types/
|
|
333
|
-
│
|
|
487
|
+
│ ├── index.ts # Type exports with backwards compat
|
|
488
|
+
│ ├── shared.ts # Shared types
|
|
489
|
+
│ ├── email.ts # Email-specific types
|
|
490
|
+
│ └── sms.ts # SMS-specific types
|
|
334
491
|
├── lambda/ # Lambda source (bundled to dist)
|
|
335
492
|
└── dist/ # Build output
|
|
336
493
|
├── console/ # Built dashboard
|
|
@@ -371,37 +528,74 @@ wraps init
|
|
|
371
528
|
|
|
372
529
|
## What's Included
|
|
373
530
|
|
|
374
|
-
###
|
|
375
|
-
- [x] `wraps
|
|
376
|
-
- [x] `wraps
|
|
377
|
-
- [x] `wraps
|
|
378
|
-
- [x] `wraps status` - Infrastructure status
|
|
379
|
-
- [x] `wraps verify` - DNS verification
|
|
380
|
-
- [x] `wraps upgrade` - Add features
|
|
381
|
-
- [x] `wraps destroy` - Clean removal
|
|
531
|
+
### Global Commands ✅
|
|
532
|
+
- [x] `wraps status` - Show infrastructure status (all services)
|
|
533
|
+
- [x] `wraps dashboard` - Local web dashboard (all services)
|
|
534
|
+
- [x] `wraps destroy` - Remove all infrastructure (all services)
|
|
382
535
|
- [x] `wraps completion` - Shell completion
|
|
383
536
|
|
|
537
|
+
### Email Commands ✅
|
|
538
|
+
- [x] `wraps email init` - Deploy new infrastructure
|
|
539
|
+
- [x] `wraps email connect` - Connect existing SES
|
|
540
|
+
- [x] `wraps email domains` - Domain management
|
|
541
|
+
- [x] `wraps email domains add` - Add domain to SES
|
|
542
|
+
- [x] `wraps email domains list` - List all domains
|
|
543
|
+
- [x] `wraps email domains get-dkim` - Get DKIM tokens
|
|
544
|
+
- [x] `wraps email domains verify` - Verify DNS records
|
|
545
|
+
- [x] `wraps email domains remove` - Remove domain
|
|
546
|
+
- [x] `wraps email upgrade` - Incrementally add features:
|
|
547
|
+
- Configuration preset upgrades (Starter → Production → Enterprise)
|
|
548
|
+
- MAIL FROM domain for DMARC alignment
|
|
549
|
+
- Custom tracking domain for branded links
|
|
550
|
+
- Event type customization
|
|
551
|
+
- Email history retention periods
|
|
552
|
+
- Dedicated IP addresses
|
|
553
|
+
- [x] `wraps email restore` - Restore from metadata
|
|
554
|
+
|
|
555
|
+
### SMS Commands 🚧 (Coming Soon)
|
|
556
|
+
- [ ] `wraps sms init` - Deploy SMS infrastructure
|
|
557
|
+
|
|
384
558
|
### Features ✅
|
|
385
|
-
- [x] Feature-based configuration presets
|
|
386
|
-
- [x] Transparent cost estimation
|
|
387
|
-
- [x]
|
|
388
|
-
- [x]
|
|
559
|
+
- [x] Feature-based configuration presets (Starter, Production, Enterprise, Custom)
|
|
560
|
+
- [x] Transparent cost estimation with monthly projections
|
|
561
|
+
- [x] MAIL FROM domain configuration for DMARC alignment
|
|
562
|
+
- [x] Custom tracking domain for branded email links
|
|
563
|
+
- [x] Customizable event type tracking (10 SES event types)
|
|
564
|
+
- [x] Flexible email history retention (7 days to 1 year)
|
|
565
|
+
- [x] Dedicated IP address support for high-volume senders
|
|
566
|
+
- [x] Lambda function bundling with esbuild
|
|
567
|
+
- [x] Vercel OIDC integration (no AWS credentials needed)
|
|
389
568
|
- [x] Real-time event tracking (EventBridge → SQS → Lambda → DynamoDB)
|
|
390
|
-
- [x]
|
|
391
|
-
- [x] Bounce/complaint handling
|
|
392
|
-
- [x] Non-destructive deployments
|
|
393
|
-
- [x] Beautiful interactive prompts
|
|
394
|
-
- [x] Comprehensive error handling
|
|
569
|
+
- [x] Comprehensive domain management (add, list, verify, remove)
|
|
570
|
+
- [x] Bounce/complaint handling with suppression lists
|
|
571
|
+
- [x] Non-destructive deployments (never modifies existing resources)
|
|
572
|
+
- [x] Beautiful interactive prompts (@clack/prompts)
|
|
573
|
+
- [x] Comprehensive error handling with helpful suggestions
|
|
574
|
+
- [x] Multi-service architecture ready (email, SMS coming soon)
|
|
395
575
|
|
|
396
576
|
### Coming Soon
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
- [ ]
|
|
400
|
-
- [ ]
|
|
577
|
+
|
|
578
|
+
#### v1.1.0 - Q1 2025
|
|
579
|
+
- [ ] **HTTPS Custom Tracking Domains**
|
|
580
|
+
- [ ] Automatic CloudFront distribution creation
|
|
581
|
+
- [ ] ACM certificate provisioning and validation
|
|
582
|
+
- [ ] HTTPS enforcement for tracking links
|
|
583
|
+
- [ ] Seamless upgrade path from HTTP tracking domains
|
|
584
|
+
|
|
585
|
+
#### Future Releases
|
|
586
|
+
- [ ] **SMS Service** (`wraps sms`)
|
|
587
|
+
- [ ] AWS End User Messaging integration
|
|
588
|
+
- [ ] Multi-channel communication support
|
|
589
|
+
|
|
590
|
+
- [ ] **Hosted App**
|
|
591
|
+
- [ ] Advanced analytics dashboard
|
|
592
|
+
- [ ] Email templates
|
|
593
|
+
- [ ] Bulk sending tools
|
|
594
|
+
- [ ] Tenant management
|
|
401
595
|
|
|
402
596
|
## License
|
|
403
597
|
|
|
404
|
-
|
|
598
|
+
AGPLv3
|
|
405
599
|
|
|
406
600
|
## Support
|
|
407
601
|
|