@mailmodo/cli 0.0.27 → 0.0.28-beta.pr29.47
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/commands/deploy/index.js +1 -3
- package/dist/commands/domain/index.js +23 -4
- package/oclif.manifest.json +105 -105
- package/package.json +1 -1
|
@@ -73,9 +73,7 @@ export default class Deploy extends BaseCommand {
|
|
|
73
73
|
return {
|
|
74
74
|
condition: email.condition || null,
|
|
75
75
|
ctaText: email.ctaText || '',
|
|
76
|
-
delay:
|
|
77
|
-
? Number.parseInt(email.delay, 10) || 0
|
|
78
|
-
: email.delay,
|
|
76
|
+
delay: email.delay,
|
|
79
77
|
goal: email.goal || '',
|
|
80
78
|
id: email.id,
|
|
81
79
|
isReminder: false,
|
|
@@ -45,18 +45,27 @@ export default class Domain extends BaseCommand {
|
|
|
45
45
|
this.log(`\n ${'─'.repeat(53)}`);
|
|
46
46
|
this.log(` ${chalk.bold('DOMAIN SETUP')}`);
|
|
47
47
|
this.log(` ${'─'.repeat(53)}\n`);
|
|
48
|
-
const { domain, senderEmail, address } = await this.collectDomainInputs(flags.yes, yamlConfig);
|
|
49
|
-
const
|
|
48
|
+
const { domain, senderEmail, fromName, replyTo, address } = await this.collectDomainInputs(flags.yes, yamlConfig);
|
|
49
|
+
const apiPayload = {
|
|
50
50
|
address,
|
|
51
51
|
domain,
|
|
52
52
|
fromEmail: senderEmail,
|
|
53
|
-
}
|
|
53
|
+
};
|
|
54
|
+
if (fromName)
|
|
55
|
+
apiPayload.fromName = fromName;
|
|
56
|
+
if (replyTo)
|
|
57
|
+
apiPayload.replyTo = replyTo;
|
|
58
|
+
const response = await this.withApiSpinner({ json: flags.json, text: ' Configuring domain...' }, () => this.apiClient.post(API_ENDPOINTS.DOMAIN, apiPayload));
|
|
54
59
|
if (!response.ok) {
|
|
55
60
|
this.handleApiError(response);
|
|
56
61
|
}
|
|
57
62
|
yamlConfig.project.domain = domain;
|
|
58
63
|
yamlConfig.project.fromEmail = senderEmail;
|
|
59
64
|
yamlConfig.project.address = address;
|
|
65
|
+
if (fromName)
|
|
66
|
+
yamlConfig.project.fromName = fromName;
|
|
67
|
+
if (replyTo)
|
|
68
|
+
yamlConfig.project.replyTo = replyTo;
|
|
60
69
|
await saveYaml(yamlConfig);
|
|
61
70
|
await saveConfig({ ...config, domain });
|
|
62
71
|
const records = response.data?.dnsRecords || [];
|
|
@@ -161,6 +170,8 @@ export default class Domain extends BaseCommand {
|
|
|
161
170
|
return {
|
|
162
171
|
address: yamlConfig.project?.address || '',
|
|
163
172
|
domain,
|
|
173
|
+
fromName: yamlConfig.project?.fromName || '',
|
|
174
|
+
replyTo: yamlConfig.project?.replyTo || '',
|
|
164
175
|
senderEmail: yamlConfig.project?.fromEmail || '',
|
|
165
176
|
};
|
|
166
177
|
}
|
|
@@ -174,12 +185,20 @@ export default class Domain extends BaseCommand {
|
|
|
174
185
|
message: 'Sender email address:',
|
|
175
186
|
validate: (v) => (v?.includes('@') ? true : 'Please enter a valid email'),
|
|
176
187
|
});
|
|
188
|
+
const fromName = await input({
|
|
189
|
+
default: yamlConfig.project?.fromName || '',
|
|
190
|
+
message: 'Display name (optional, shown as sender name):',
|
|
191
|
+
});
|
|
192
|
+
const replyTo = await input({
|
|
193
|
+
default: yamlConfig.project?.replyTo || '',
|
|
194
|
+
message: 'Reply-to address (optional, press Enter to use sender email):',
|
|
195
|
+
});
|
|
177
196
|
const address = await input({
|
|
178
197
|
default: yamlConfig.project?.address,
|
|
179
198
|
message: 'Business address (required by law):',
|
|
180
199
|
validate: (v) => (v?.trim() ? true : 'Address is required'),
|
|
181
200
|
});
|
|
182
|
-
return { address, domain, senderEmail };
|
|
201
|
+
return { address, domain, fromName, replyTo, senderEmail };
|
|
183
202
|
}
|
|
184
203
|
recordLabel(index) {
|
|
185
204
|
const labels = ['DKIM', 'DMARC', 'Return Path'];
|
package/oclif.manifest.json
CHANGED
|
@@ -76,13 +76,15 @@
|
|
|
76
76
|
"index.js"
|
|
77
77
|
]
|
|
78
78
|
},
|
|
79
|
-
"
|
|
79
|
+
"contacts": {
|
|
80
80
|
"aliases": [],
|
|
81
81
|
"args": {},
|
|
82
|
-
"description": "
|
|
82
|
+
"description": "Manage contacts — search, export, or delete",
|
|
83
83
|
"examples": [
|
|
84
|
-
"<%= config.bin %>
|
|
85
|
-
"<%= config.bin %>
|
|
84
|
+
"<%= config.bin %> contacts",
|
|
85
|
+
"<%= config.bin %> contacts --search sarah@example.com",
|
|
86
|
+
"<%= config.bin %> contacts --export # GDPR CSV → contacts.csv",
|
|
87
|
+
"<%= config.bin %> contacts --delete sarah@example.com"
|
|
86
88
|
],
|
|
87
89
|
"flags": {
|
|
88
90
|
"json": {
|
|
@@ -97,11 +99,31 @@
|
|
|
97
99
|
"name": "yes",
|
|
98
100
|
"allowNo": false,
|
|
99
101
|
"type": "boolean"
|
|
102
|
+
},
|
|
103
|
+
"delete": {
|
|
104
|
+
"description": "GDPR hard delete a contact by email",
|
|
105
|
+
"name": "delete",
|
|
106
|
+
"hasDynamicHelp": false,
|
|
107
|
+
"multiple": false,
|
|
108
|
+
"type": "option"
|
|
109
|
+
},
|
|
110
|
+
"export": {
|
|
111
|
+
"description": "Export all contacts as GDPR-compliant CSV (writes contacts.csv in the current directory)",
|
|
112
|
+
"name": "export",
|
|
113
|
+
"allowNo": false,
|
|
114
|
+
"type": "boolean"
|
|
115
|
+
},
|
|
116
|
+
"search": {
|
|
117
|
+
"description": "Search for a contact by email",
|
|
118
|
+
"name": "search",
|
|
119
|
+
"hasDynamicHelp": false,
|
|
120
|
+
"multiple": false,
|
|
121
|
+
"type": "option"
|
|
100
122
|
}
|
|
101
123
|
},
|
|
102
124
|
"hasDynamicHelp": false,
|
|
103
125
|
"hiddenAliases": [],
|
|
104
|
-
"id": "
|
|
126
|
+
"id": "contacts",
|
|
105
127
|
"pluginAlias": "@mailmodo/cli",
|
|
106
128
|
"pluginName": "@mailmodo/cli",
|
|
107
129
|
"pluginType": "core",
|
|
@@ -111,19 +133,17 @@
|
|
|
111
133
|
"relativePath": [
|
|
112
134
|
"dist",
|
|
113
135
|
"commands",
|
|
114
|
-
"
|
|
136
|
+
"contacts",
|
|
115
137
|
"index.js"
|
|
116
138
|
]
|
|
117
139
|
},
|
|
118
|
-
"
|
|
140
|
+
"deploy": {
|
|
119
141
|
"aliases": [],
|
|
120
142
|
"args": {},
|
|
121
|
-
"description": "
|
|
143
|
+
"description": "Deploy email sequences and verify sending domain",
|
|
122
144
|
"examples": [
|
|
123
|
-
"<%= config.bin %>
|
|
124
|
-
"<%= config.bin %>
|
|
125
|
-
"<%= config.bin %> contacts --export # GDPR CSV → contacts.csv",
|
|
126
|
-
"<%= config.bin %> contacts --delete sarah@example.com"
|
|
145
|
+
"<%= config.bin %> deploy",
|
|
146
|
+
"<%= config.bin %> deploy --yes"
|
|
127
147
|
],
|
|
128
148
|
"flags": {
|
|
129
149
|
"json": {
|
|
@@ -138,31 +158,11 @@
|
|
|
138
158
|
"name": "yes",
|
|
139
159
|
"allowNo": false,
|
|
140
160
|
"type": "boolean"
|
|
141
|
-
},
|
|
142
|
-
"delete": {
|
|
143
|
-
"description": "GDPR hard delete a contact by email",
|
|
144
|
-
"name": "delete",
|
|
145
|
-
"hasDynamicHelp": false,
|
|
146
|
-
"multiple": false,
|
|
147
|
-
"type": "option"
|
|
148
|
-
},
|
|
149
|
-
"export": {
|
|
150
|
-
"description": "Export all contacts as GDPR-compliant CSV (writes contacts.csv in the current directory)",
|
|
151
|
-
"name": "export",
|
|
152
|
-
"allowNo": false,
|
|
153
|
-
"type": "boolean"
|
|
154
|
-
},
|
|
155
|
-
"search": {
|
|
156
|
-
"description": "Search for a contact by email",
|
|
157
|
-
"name": "search",
|
|
158
|
-
"hasDynamicHelp": false,
|
|
159
|
-
"multiple": false,
|
|
160
|
-
"type": "option"
|
|
161
161
|
}
|
|
162
162
|
},
|
|
163
163
|
"hasDynamicHelp": false,
|
|
164
164
|
"hiddenAliases": [],
|
|
165
|
-
"id": "
|
|
165
|
+
"id": "deploy",
|
|
166
166
|
"pluginAlias": "@mailmodo/cli",
|
|
167
167
|
"pluginName": "@mailmodo/cli",
|
|
168
168
|
"pluginType": "core",
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
"relativePath": [
|
|
173
173
|
"dist",
|
|
174
174
|
"commands",
|
|
175
|
-
"
|
|
175
|
+
"deploy",
|
|
176
176
|
"index.js"
|
|
177
177
|
]
|
|
178
178
|
},
|
|
@@ -404,6 +404,44 @@
|
|
|
404
404
|
"index.js"
|
|
405
405
|
]
|
|
406
406
|
},
|
|
407
|
+
"logout": {
|
|
408
|
+
"aliases": [],
|
|
409
|
+
"args": {},
|
|
410
|
+
"description": "Sign out by removing saved credentials from this machine",
|
|
411
|
+
"examples": [
|
|
412
|
+
"<%= config.bin %> logout"
|
|
413
|
+
],
|
|
414
|
+
"flags": {
|
|
415
|
+
"json": {
|
|
416
|
+
"description": "Output as JSON",
|
|
417
|
+
"name": "json",
|
|
418
|
+
"allowNo": false,
|
|
419
|
+
"type": "boolean"
|
|
420
|
+
},
|
|
421
|
+
"yes": {
|
|
422
|
+
"char": "y",
|
|
423
|
+
"description": "Skip confirmation prompts",
|
|
424
|
+
"name": "yes",
|
|
425
|
+
"allowNo": false,
|
|
426
|
+
"type": "boolean"
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
"hasDynamicHelp": false,
|
|
430
|
+
"hiddenAliases": [],
|
|
431
|
+
"id": "logout",
|
|
432
|
+
"pluginAlias": "@mailmodo/cli",
|
|
433
|
+
"pluginName": "@mailmodo/cli",
|
|
434
|
+
"pluginType": "core",
|
|
435
|
+
"strict": true,
|
|
436
|
+
"enableJsonFlag": false,
|
|
437
|
+
"isESM": true,
|
|
438
|
+
"relativePath": [
|
|
439
|
+
"dist",
|
|
440
|
+
"commands",
|
|
441
|
+
"logout",
|
|
442
|
+
"index.js"
|
|
443
|
+
]
|
|
444
|
+
},
|
|
407
445
|
"logs": {
|
|
408
446
|
"aliases": [],
|
|
409
447
|
"args": {},
|
|
@@ -474,57 +512,14 @@
|
|
|
474
512
|
"index.js"
|
|
475
513
|
]
|
|
476
514
|
},
|
|
477
|
-
"
|
|
515
|
+
"settings": {
|
|
478
516
|
"aliases": [],
|
|
479
517
|
"args": {},
|
|
480
|
-
"description": "
|
|
481
|
-
"examples": [
|
|
482
|
-
"<%= config.bin %> logout"
|
|
483
|
-
],
|
|
484
|
-
"flags": {
|
|
485
|
-
"json": {
|
|
486
|
-
"description": "Output as JSON",
|
|
487
|
-
"name": "json",
|
|
488
|
-
"allowNo": false,
|
|
489
|
-
"type": "boolean"
|
|
490
|
-
},
|
|
491
|
-
"yes": {
|
|
492
|
-
"char": "y",
|
|
493
|
-
"description": "Skip confirmation prompts",
|
|
494
|
-
"name": "yes",
|
|
495
|
-
"allowNo": false,
|
|
496
|
-
"type": "boolean"
|
|
497
|
-
}
|
|
498
|
-
},
|
|
499
|
-
"hasDynamicHelp": false,
|
|
500
|
-
"hiddenAliases": [],
|
|
501
|
-
"id": "logout",
|
|
502
|
-
"pluginAlias": "@mailmodo/cli",
|
|
503
|
-
"pluginName": "@mailmodo/cli",
|
|
504
|
-
"pluginType": "core",
|
|
505
|
-
"strict": true,
|
|
506
|
-
"enableJsonFlag": false,
|
|
507
|
-
"isESM": true,
|
|
508
|
-
"relativePath": [
|
|
509
|
-
"dist",
|
|
510
|
-
"commands",
|
|
511
|
-
"logout",
|
|
512
|
-
"index.js"
|
|
513
|
-
]
|
|
514
|
-
},
|
|
515
|
-
"preview": {
|
|
516
|
-
"aliases": [],
|
|
517
|
-
"args": {
|
|
518
|
-
"id": {
|
|
519
|
-
"description": "Email template ID to preview",
|
|
520
|
-
"name": "id"
|
|
521
|
-
}
|
|
522
|
-
},
|
|
523
|
-
"description": "Preview an email in browser, as text, or send a test",
|
|
518
|
+
"description": "View and update project settings",
|
|
524
519
|
"examples": [
|
|
525
|
-
"<%= config.bin %>
|
|
526
|
-
"<%= config.bin %>
|
|
527
|
-
"<%= config.bin %>
|
|
520
|
+
"<%= config.bin %> settings",
|
|
521
|
+
"<%= config.bin %> settings --set brand_color=#0F3460",
|
|
522
|
+
"<%= config.bin %> settings --json"
|
|
528
523
|
],
|
|
529
524
|
"flags": {
|
|
530
525
|
"json": {
|
|
@@ -540,23 +535,17 @@
|
|
|
540
535
|
"allowNo": false,
|
|
541
536
|
"type": "boolean"
|
|
542
537
|
},
|
|
543
|
-
"
|
|
544
|
-
"description": "
|
|
545
|
-
"name": "
|
|
538
|
+
"set": {
|
|
539
|
+
"description": "Set a setting (format: key=value)",
|
|
540
|
+
"name": "set",
|
|
546
541
|
"hasDynamicHelp": false,
|
|
547
542
|
"multiple": false,
|
|
548
543
|
"type": "option"
|
|
549
|
-
},
|
|
550
|
-
"text": {
|
|
551
|
-
"description": "Output plain text version (for AI agents)",
|
|
552
|
-
"name": "text",
|
|
553
|
-
"allowNo": false,
|
|
554
|
-
"type": "boolean"
|
|
555
544
|
}
|
|
556
545
|
},
|
|
557
546
|
"hasDynamicHelp": false,
|
|
558
547
|
"hiddenAliases": [],
|
|
559
|
-
"id": "
|
|
548
|
+
"id": "settings",
|
|
560
549
|
"pluginAlias": "@mailmodo/cli",
|
|
561
550
|
"pluginName": "@mailmodo/cli",
|
|
562
551
|
"pluginType": "core",
|
|
@@ -566,7 +555,7 @@
|
|
|
566
555
|
"relativePath": [
|
|
567
556
|
"dist",
|
|
568
557
|
"commands",
|
|
569
|
-
"
|
|
558
|
+
"settings",
|
|
570
559
|
"index.js"
|
|
571
560
|
]
|
|
572
561
|
},
|
|
@@ -609,14 +598,19 @@
|
|
|
609
598
|
"index.js"
|
|
610
599
|
]
|
|
611
600
|
},
|
|
612
|
-
"
|
|
601
|
+
"preview": {
|
|
613
602
|
"aliases": [],
|
|
614
|
-
"args": {
|
|
615
|
-
|
|
603
|
+
"args": {
|
|
604
|
+
"id": {
|
|
605
|
+
"description": "Email template ID to preview",
|
|
606
|
+
"name": "id"
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
"description": "Preview an email in browser, as text, or send a test",
|
|
616
610
|
"examples": [
|
|
617
|
-
"<%= config.bin %>
|
|
618
|
-
"<%= config.bin %>
|
|
619
|
-
"<%= config.bin %>
|
|
611
|
+
"<%= config.bin %> preview welcome",
|
|
612
|
+
"<%= config.bin %> preview welcome --text",
|
|
613
|
+
"<%= config.bin %> preview welcome --send me@example.com"
|
|
620
614
|
],
|
|
621
615
|
"flags": {
|
|
622
616
|
"json": {
|
|
@@ -632,17 +626,23 @@
|
|
|
632
626
|
"allowNo": false,
|
|
633
627
|
"type": "boolean"
|
|
634
628
|
},
|
|
635
|
-
"
|
|
636
|
-
"description": "
|
|
637
|
-
"name": "
|
|
629
|
+
"send": {
|
|
630
|
+
"description": "Send test email to this address",
|
|
631
|
+
"name": "send",
|
|
638
632
|
"hasDynamicHelp": false,
|
|
639
633
|
"multiple": false,
|
|
640
634
|
"type": "option"
|
|
635
|
+
},
|
|
636
|
+
"text": {
|
|
637
|
+
"description": "Output plain text version (for AI agents)",
|
|
638
|
+
"name": "text",
|
|
639
|
+
"allowNo": false,
|
|
640
|
+
"type": "boolean"
|
|
641
641
|
}
|
|
642
642
|
},
|
|
643
643
|
"hasDynamicHelp": false,
|
|
644
644
|
"hiddenAliases": [],
|
|
645
|
-
"id": "
|
|
645
|
+
"id": "preview",
|
|
646
646
|
"pluginAlias": "@mailmodo/cli",
|
|
647
647
|
"pluginName": "@mailmodo/cli",
|
|
648
648
|
"pluginType": "core",
|
|
@@ -652,10 +652,10 @@
|
|
|
652
652
|
"relativePath": [
|
|
653
653
|
"dist",
|
|
654
654
|
"commands",
|
|
655
|
-
"
|
|
655
|
+
"preview",
|
|
656
656
|
"index.js"
|
|
657
657
|
]
|
|
658
658
|
}
|
|
659
659
|
},
|
|
660
|
-
"version": "0.0.
|
|
660
|
+
"version": "0.0.28-beta.pr29.47"
|
|
661
661
|
}
|