@mailmodo/cli 0.0.43 → 0.0.44-beta.pr46.72
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/domain/index.js +1 -1
- package/dist/lib/messages.d.ts +1 -0
- package/dist/lib/messages.js +3 -0
- package/dist/lib/yaml-config.d.ts +2 -1
- package/dist/lib/yaml-config.js +6 -4
- package/oclif.manifest.json +120 -120
- package/package.json +1 -1
|
@@ -97,7 +97,7 @@ export default class Domain extends BaseCommand {
|
|
|
97
97
|
this.log(`\n ${INFO.DNS_RECORDS_FAILED}`);
|
|
98
98
|
if (!dkim) {
|
|
99
99
|
this.log(`\n DKIM common mistakes:`);
|
|
100
|
-
this.log(` - Using
|
|
100
|
+
this.log(` - Using CNAME instead of TXT record type`);
|
|
101
101
|
this.log(` - Including the full domain in the Host field`);
|
|
102
102
|
this.log(` - Cloudflare: proxy must be OFF (grey cloud, not orange)`);
|
|
103
103
|
}
|
package/dist/lib/messages.d.ts
CHANGED
|
@@ -34,4 +34,5 @@ export declare const INFO: {
|
|
|
34
34
|
readonly DOMAIN_PENDING_VERIFICATION: `Your domain is not verified yet. Please verify it first. Run ${string} to check the status.`;
|
|
35
35
|
readonly SEQUENCES_NOT_DEPLOYED: `Sequences saved but ${string}.`;
|
|
36
36
|
};
|
|
37
|
+
export declare function yamlParseError(detail: string): string;
|
|
37
38
|
export declare function recordLabel(index: number): string;
|
package/dist/lib/messages.js
CHANGED
|
@@ -34,6 +34,9 @@ export const INFO = {
|
|
|
34
34
|
DOMAIN_PENDING_VERIFICATION: `Your domain is not verified yet. Please verify it first. Run ${chalk.cyan('mailmodo domain --verify')} to check the status.`,
|
|
35
35
|
SEQUENCES_NOT_DEPLOYED: `Sequences saved but ${chalk.yellow('NOT deployed')}.`,
|
|
36
36
|
};
|
|
37
|
+
export function yamlParseError(detail) {
|
|
38
|
+
return `mailmodo.yaml has invalid YAML syntax:\n${detail}`;
|
|
39
|
+
}
|
|
37
40
|
export function recordLabel(index) {
|
|
38
41
|
const labels = ['DKIM', 'DMARC', 'Return Path'];
|
|
39
42
|
return labels[index] || `Record ${index + 1}`;
|
|
@@ -40,7 +40,8 @@ export interface MailmodoYaml {
|
|
|
40
40
|
*
|
|
41
41
|
* @param {string} [cwd] - Directory containing mailmodo.yaml. Defaults to process.cwd().
|
|
42
42
|
* @returns {Promise<MailmodoYaml | null>} The parsed configuration with project
|
|
43
|
-
* settings and email array, or null if the file doesn't exist
|
|
43
|
+
* settings and email array, or null if the file doesn't exist. Throws a
|
|
44
|
+
* formatted Error with the line number if the file contains invalid YAML syntax.
|
|
44
45
|
*/
|
|
45
46
|
export declare function loadYaml(cwd?: string): Promise<MailmodoYaml | null>;
|
|
46
47
|
/**
|
package/dist/lib/yaml-config.js
CHANGED
|
@@ -3,24 +3,26 @@ import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { dump, load } from 'js-yaml';
|
|
5
5
|
import { TEMPLATES_DIR, YAML_FILE } from './constants.js';
|
|
6
|
+
import { yamlParseError } from './messages.js';
|
|
6
7
|
/**
|
|
7
8
|
* Loads and parses the mailmodo.yaml configuration file from the specified
|
|
8
9
|
* directory (or current working directory).
|
|
9
10
|
*
|
|
10
11
|
* @param {string} [cwd] - Directory containing mailmodo.yaml. Defaults to process.cwd().
|
|
11
12
|
* @returns {Promise<MailmodoYaml | null>} The parsed configuration with project
|
|
12
|
-
* settings and email array, or null if the file doesn't exist
|
|
13
|
+
* settings and email array, or null if the file doesn't exist. Throws a
|
|
14
|
+
* formatted Error with the line number if the file contains invalid YAML syntax.
|
|
13
15
|
*/
|
|
14
16
|
export async function loadYaml(cwd) {
|
|
15
17
|
const filePath = join(cwd || process.cwd(), YAML_FILE);
|
|
16
18
|
if (!existsSync(filePath))
|
|
17
19
|
return null;
|
|
20
|
+
const content = await readFile(filePath, 'utf8');
|
|
18
21
|
try {
|
|
19
|
-
const content = await readFile(filePath, 'utf8');
|
|
20
22
|
return load(content);
|
|
21
23
|
}
|
|
22
|
-
catch {
|
|
23
|
-
|
|
24
|
+
catch (error) {
|
|
25
|
+
throw new Error(yamlParseError(error.message));
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
/**
|
package/oclif.manifest.json
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
-
"
|
|
3
|
+
"contacts": {
|
|
4
4
|
"aliases": [],
|
|
5
5
|
"args": {},
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Manage contacts — search, export, or delete",
|
|
7
7
|
"examples": [
|
|
8
|
-
"<%= config.bin %>
|
|
9
|
-
"<%= config.bin %>
|
|
10
|
-
"<%= config.bin %>
|
|
11
|
-
"<%= config.bin %>
|
|
12
|
-
"<%= config.bin %> billing --purchase 3",
|
|
13
|
-
"<%= config.bin %> billing --checkout"
|
|
8
|
+
"<%= config.bin %> contacts",
|
|
9
|
+
"<%= config.bin %> contacts --search sarah@example.com",
|
|
10
|
+
"<%= config.bin %> contacts --export # GDPR CSV → contacts.csv",
|
|
11
|
+
"<%= config.bin %> contacts --delete sarah@example.com"
|
|
14
12
|
],
|
|
15
13
|
"flags": {
|
|
16
14
|
"json": {
|
|
@@ -26,43 +24,30 @@
|
|
|
26
24
|
"allowNo": false,
|
|
27
25
|
"type": "boolean"
|
|
28
26
|
},
|
|
29
|
-
"
|
|
30
|
-
"description": "
|
|
31
|
-
"name": "
|
|
32
|
-
"hasDynamicHelp": false,
|
|
33
|
-
"multiple": false,
|
|
34
|
-
"type": "option"
|
|
35
|
-
},
|
|
36
|
-
"cap": {
|
|
37
|
-
"description": "Set monthly sending cap in blocks",
|
|
38
|
-
"name": "cap",
|
|
27
|
+
"delete": {
|
|
28
|
+
"description": "GDPR hard delete a contact by email",
|
|
29
|
+
"name": "delete",
|
|
39
30
|
"hasDynamicHelp": false,
|
|
40
31
|
"multiple": false,
|
|
41
32
|
"type": "option"
|
|
42
33
|
},
|
|
43
|
-
"
|
|
44
|
-
"description": "
|
|
45
|
-
"name": "
|
|
34
|
+
"export": {
|
|
35
|
+
"description": "Export all contacts as GDPR-compliant CSV (writes contacts.csv in the current directory)",
|
|
36
|
+
"name": "export",
|
|
46
37
|
"allowNo": false,
|
|
47
38
|
"type": "boolean"
|
|
48
39
|
},
|
|
49
|
-
"
|
|
50
|
-
"description": "
|
|
51
|
-
"name": "
|
|
40
|
+
"search": {
|
|
41
|
+
"description": "Search for a contact by email",
|
|
42
|
+
"name": "search",
|
|
52
43
|
"hasDynamicHelp": false,
|
|
53
44
|
"multiple": false,
|
|
54
45
|
"type": "option"
|
|
55
|
-
},
|
|
56
|
-
"status": {
|
|
57
|
-
"description": "Show billing status only",
|
|
58
|
-
"name": "status",
|
|
59
|
-
"allowNo": false,
|
|
60
|
-
"type": "boolean"
|
|
61
46
|
}
|
|
62
47
|
},
|
|
63
48
|
"hasDynamicHelp": false,
|
|
64
49
|
"hiddenAliases": [],
|
|
65
|
-
"id": "
|
|
50
|
+
"id": "contacts",
|
|
66
51
|
"pluginAlias": "@mailmodo/cli",
|
|
67
52
|
"pluginName": "@mailmodo/cli",
|
|
68
53
|
"pluginType": "core",
|
|
@@ -72,19 +57,21 @@
|
|
|
72
57
|
"relativePath": [
|
|
73
58
|
"dist",
|
|
74
59
|
"commands",
|
|
75
|
-
"
|
|
60
|
+
"contacts",
|
|
76
61
|
"index.js"
|
|
77
62
|
]
|
|
78
63
|
},
|
|
79
|
-
"
|
|
64
|
+
"billing": {
|
|
80
65
|
"aliases": [],
|
|
81
66
|
"args": {},
|
|
82
|
-
"description": "
|
|
67
|
+
"description": "View billing status, purchase blocks, set cap, or add a payment method",
|
|
83
68
|
"examples": [
|
|
84
|
-
"<%= config.bin %>
|
|
85
|
-
"<%= config.bin %>
|
|
86
|
-
"<%= config.bin %>
|
|
87
|
-
"<%= config.bin %>
|
|
69
|
+
"<%= config.bin %> billing",
|
|
70
|
+
"<%= config.bin %> billing --status",
|
|
71
|
+
"<%= config.bin %> billing --cap 5",
|
|
72
|
+
"<%= config.bin %> billing --cap 5 --auto-charge-block-count 2",
|
|
73
|
+
"<%= config.bin %> billing --purchase 3",
|
|
74
|
+
"<%= config.bin %> billing --checkout"
|
|
88
75
|
],
|
|
89
76
|
"flags": {
|
|
90
77
|
"json": {
|
|
@@ -100,30 +87,43 @@
|
|
|
100
87
|
"allowNo": false,
|
|
101
88
|
"type": "boolean"
|
|
102
89
|
},
|
|
103
|
-
"
|
|
104
|
-
"description": "
|
|
105
|
-
"name": "
|
|
90
|
+
"auto-charge-block-count": {
|
|
91
|
+
"description": "Blocks to auto-purchase when the quota runs low (use with --cap)",
|
|
92
|
+
"name": "auto-charge-block-count",
|
|
106
93
|
"hasDynamicHelp": false,
|
|
107
94
|
"multiple": false,
|
|
108
95
|
"type": "option"
|
|
109
96
|
},
|
|
110
|
-
"
|
|
111
|
-
"description": "
|
|
112
|
-
"name": "
|
|
97
|
+
"cap": {
|
|
98
|
+
"description": "Set monthly sending cap in blocks",
|
|
99
|
+
"name": "cap",
|
|
100
|
+
"hasDynamicHelp": false,
|
|
101
|
+
"multiple": false,
|
|
102
|
+
"type": "option"
|
|
103
|
+
},
|
|
104
|
+
"checkout": {
|
|
105
|
+
"description": "Open Stripe checkout to add or update a payment method",
|
|
106
|
+
"name": "checkout",
|
|
113
107
|
"allowNo": false,
|
|
114
108
|
"type": "boolean"
|
|
115
109
|
},
|
|
116
|
-
"
|
|
117
|
-
"description": "
|
|
118
|
-
"name": "
|
|
110
|
+
"purchase": {
|
|
111
|
+
"description": "Manually purchase this many 10,000-email blocks",
|
|
112
|
+
"name": "purchase",
|
|
119
113
|
"hasDynamicHelp": false,
|
|
120
114
|
"multiple": false,
|
|
121
115
|
"type": "option"
|
|
116
|
+
},
|
|
117
|
+
"status": {
|
|
118
|
+
"description": "Show billing status only",
|
|
119
|
+
"name": "status",
|
|
120
|
+
"allowNo": false,
|
|
121
|
+
"type": "boolean"
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
124
|
"hasDynamicHelp": false,
|
|
125
125
|
"hiddenAliases": [],
|
|
126
|
-
"id": "
|
|
126
|
+
"id": "billing",
|
|
127
127
|
"pluginAlias": "@mailmodo/cli",
|
|
128
128
|
"pluginName": "@mailmodo/cli",
|
|
129
129
|
"pluginType": "core",
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"relativePath": [
|
|
134
134
|
"dist",
|
|
135
135
|
"commands",
|
|
136
|
-
"
|
|
136
|
+
"billing",
|
|
137
137
|
"index.js"
|
|
138
138
|
]
|
|
139
139
|
},
|
|
@@ -280,6 +280,45 @@
|
|
|
280
280
|
"index.js"
|
|
281
281
|
]
|
|
282
282
|
},
|
|
283
|
+
"emails": {
|
|
284
|
+
"aliases": [],
|
|
285
|
+
"args": {},
|
|
286
|
+
"description": "List and view configured email sequences",
|
|
287
|
+
"examples": [
|
|
288
|
+
"<%= config.bin %> emails",
|
|
289
|
+
"<%= config.bin %> emails --json"
|
|
290
|
+
],
|
|
291
|
+
"flags": {
|
|
292
|
+
"json": {
|
|
293
|
+
"description": "Output as JSON",
|
|
294
|
+
"name": "json",
|
|
295
|
+
"allowNo": false,
|
|
296
|
+
"type": "boolean"
|
|
297
|
+
},
|
|
298
|
+
"yes": {
|
|
299
|
+
"char": "y",
|
|
300
|
+
"description": "Skip confirmation prompts",
|
|
301
|
+
"name": "yes",
|
|
302
|
+
"allowNo": false,
|
|
303
|
+
"type": "boolean"
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"hasDynamicHelp": false,
|
|
307
|
+
"hiddenAliases": [],
|
|
308
|
+
"id": "emails",
|
|
309
|
+
"pluginAlias": "@mailmodo/cli",
|
|
310
|
+
"pluginName": "@mailmodo/cli",
|
|
311
|
+
"pluginType": "core",
|
|
312
|
+
"strict": true,
|
|
313
|
+
"enableJsonFlag": false,
|
|
314
|
+
"isESM": true,
|
|
315
|
+
"relativePath": [
|
|
316
|
+
"dist",
|
|
317
|
+
"commands",
|
|
318
|
+
"emails",
|
|
319
|
+
"index.js"
|
|
320
|
+
]
|
|
321
|
+
},
|
|
283
322
|
"init": {
|
|
284
323
|
"aliases": [],
|
|
285
324
|
"args": {},
|
|
@@ -326,13 +365,13 @@
|
|
|
326
365
|
"index.js"
|
|
327
366
|
]
|
|
328
367
|
},
|
|
329
|
-
"
|
|
368
|
+
"login": {
|
|
330
369
|
"aliases": [],
|
|
331
370
|
"args": {},
|
|
332
|
-
"description": "
|
|
371
|
+
"description": "Authenticate with Mailmodo using your API key",
|
|
333
372
|
"examples": [
|
|
334
|
-
"<%= config.bin %>
|
|
335
|
-
"<%= config.bin %>
|
|
373
|
+
"<%= config.bin %> login",
|
|
374
|
+
"MAILMODO_API_KEY=YOUR_API_KEY <%= config.bin %> login"
|
|
336
375
|
],
|
|
337
376
|
"flags": {
|
|
338
377
|
"json": {
|
|
@@ -351,7 +390,7 @@
|
|
|
351
390
|
},
|
|
352
391
|
"hasDynamicHelp": false,
|
|
353
392
|
"hiddenAliases": [],
|
|
354
|
-
"id": "
|
|
393
|
+
"id": "login",
|
|
355
394
|
"pluginAlias": "@mailmodo/cli",
|
|
356
395
|
"pluginName": "@mailmodo/cli",
|
|
357
396
|
"pluginType": "core",
|
|
@@ -361,17 +400,16 @@
|
|
|
361
400
|
"relativePath": [
|
|
362
401
|
"dist",
|
|
363
402
|
"commands",
|
|
364
|
-
"
|
|
403
|
+
"login",
|
|
365
404
|
"index.js"
|
|
366
405
|
]
|
|
367
406
|
},
|
|
368
|
-
"
|
|
407
|
+
"logout": {
|
|
369
408
|
"aliases": [],
|
|
370
409
|
"args": {},
|
|
371
|
-
"description": "
|
|
410
|
+
"description": "Sign out by removing saved credentials from this machine",
|
|
372
411
|
"examples": [
|
|
373
|
-
"<%= config.bin %>
|
|
374
|
-
"MAILMODO_API_KEY=YOUR_API_KEY <%= config.bin %> login"
|
|
412
|
+
"<%= config.bin %> logout"
|
|
375
413
|
],
|
|
376
414
|
"flags": {
|
|
377
415
|
"json": {
|
|
@@ -390,7 +428,7 @@
|
|
|
390
428
|
},
|
|
391
429
|
"hasDynamicHelp": false,
|
|
392
430
|
"hiddenAliases": [],
|
|
393
|
-
"id": "
|
|
431
|
+
"id": "logout",
|
|
394
432
|
"pluginAlias": "@mailmodo/cli",
|
|
395
433
|
"pluginName": "@mailmodo/cli",
|
|
396
434
|
"pluginType": "core",
|
|
@@ -400,7 +438,7 @@
|
|
|
400
438
|
"relativePath": [
|
|
401
439
|
"dist",
|
|
402
440
|
"commands",
|
|
403
|
-
"
|
|
441
|
+
"logout",
|
|
404
442
|
"index.js"
|
|
405
443
|
]
|
|
406
444
|
},
|
|
@@ -474,44 +512,6 @@
|
|
|
474
512
|
"index.js"
|
|
475
513
|
]
|
|
476
514
|
},
|
|
477
|
-
"logout": {
|
|
478
|
-
"aliases": [],
|
|
479
|
-
"args": {},
|
|
480
|
-
"description": "Sign out by removing saved credentials from this machine",
|
|
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
515
|
"preview": {
|
|
516
516
|
"aliases": [],
|
|
517
517
|
"args": {
|
|
@@ -570,14 +570,13 @@
|
|
|
570
570
|
"index.js"
|
|
571
571
|
]
|
|
572
572
|
},
|
|
573
|
-
"
|
|
573
|
+
"status": {
|
|
574
574
|
"aliases": [],
|
|
575
575
|
"args": {},
|
|
576
|
-
"description": "View and
|
|
576
|
+
"description": "View email performance metrics and quota usage",
|
|
577
577
|
"examples": [
|
|
578
|
-
"<%= config.bin %>
|
|
579
|
-
"<%= config.bin %>
|
|
580
|
-
"<%= config.bin %> settings --json"
|
|
578
|
+
"<%= config.bin %> status",
|
|
579
|
+
"<%= config.bin %> status --json"
|
|
581
580
|
],
|
|
582
581
|
"flags": {
|
|
583
582
|
"json": {
|
|
@@ -592,18 +591,11 @@
|
|
|
592
591
|
"name": "yes",
|
|
593
592
|
"allowNo": false,
|
|
594
593
|
"type": "boolean"
|
|
595
|
-
},
|
|
596
|
-
"set": {
|
|
597
|
-
"description": "Set a setting (format: key=value)",
|
|
598
|
-
"name": "set",
|
|
599
|
-
"hasDynamicHelp": false,
|
|
600
|
-
"multiple": false,
|
|
601
|
-
"type": "option"
|
|
602
594
|
}
|
|
603
595
|
},
|
|
604
596
|
"hasDynamicHelp": false,
|
|
605
597
|
"hiddenAliases": [],
|
|
606
|
-
"id": "
|
|
598
|
+
"id": "status",
|
|
607
599
|
"pluginAlias": "@mailmodo/cli",
|
|
608
600
|
"pluginName": "@mailmodo/cli",
|
|
609
601
|
"pluginType": "core",
|
|
@@ -613,17 +605,18 @@
|
|
|
613
605
|
"relativePath": [
|
|
614
606
|
"dist",
|
|
615
607
|
"commands",
|
|
616
|
-
"
|
|
608
|
+
"status",
|
|
617
609
|
"index.js"
|
|
618
610
|
]
|
|
619
611
|
},
|
|
620
|
-
"
|
|
612
|
+
"settings": {
|
|
621
613
|
"aliases": [],
|
|
622
614
|
"args": {},
|
|
623
|
-
"description": "View
|
|
615
|
+
"description": "View and update project settings",
|
|
624
616
|
"examples": [
|
|
625
|
-
"<%= config.bin %>
|
|
626
|
-
"<%= config.bin %>
|
|
617
|
+
"<%= config.bin %> settings",
|
|
618
|
+
"<%= config.bin %> settings --set brand_color=#0F3460",
|
|
619
|
+
"<%= config.bin %> settings --json"
|
|
627
620
|
],
|
|
628
621
|
"flags": {
|
|
629
622
|
"json": {
|
|
@@ -638,11 +631,18 @@
|
|
|
638
631
|
"name": "yes",
|
|
639
632
|
"allowNo": false,
|
|
640
633
|
"type": "boolean"
|
|
634
|
+
},
|
|
635
|
+
"set": {
|
|
636
|
+
"description": "Set a setting (format: key=value)",
|
|
637
|
+
"name": "set",
|
|
638
|
+
"hasDynamicHelp": false,
|
|
639
|
+
"multiple": false,
|
|
640
|
+
"type": "option"
|
|
641
641
|
}
|
|
642
642
|
},
|
|
643
643
|
"hasDynamicHelp": false,
|
|
644
644
|
"hiddenAliases": [],
|
|
645
|
-
"id": "
|
|
645
|
+
"id": "settings",
|
|
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
|
+
"settings",
|
|
656
656
|
"index.js"
|
|
657
657
|
]
|
|
658
658
|
}
|
|
659
659
|
},
|
|
660
|
-
"version": "0.0.
|
|
660
|
+
"version": "0.0.44-beta.pr46.72"
|
|
661
661
|
}
|