@mailmodo/cli 0.0.44-beta.pr46.72 → 0.0.44
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/lib/messages.d.ts +0 -1
- package/dist/lib/messages.js +0 -3
- package/dist/lib/yaml-config.d.ts +1 -2
- package/dist/lib/yaml-config.js +4 -6
- package/oclif.manifest.json +97 -97
- package/package.json +1 -1
package/dist/lib/messages.d.ts
CHANGED
|
@@ -34,5 +34,4 @@ 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;
|
|
38
37
|
export declare function recordLabel(index: number): string;
|
package/dist/lib/messages.js
CHANGED
|
@@ -34,9 +34,6 @@ 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
|
-
}
|
|
40
37
|
export function recordLabel(index) {
|
|
41
38
|
const labels = ['DKIM', 'DMARC', 'Return Path'];
|
|
42
39
|
return labels[index] || `Record ${index + 1}`;
|
|
@@ -40,8 +40,7 @@ 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
|
|
44
|
-
* formatted Error with the line number if the file contains invalid YAML syntax.
|
|
43
|
+
* settings and email array, or null if the file doesn't exist or can't be parsed.
|
|
45
44
|
*/
|
|
46
45
|
export declare function loadYaml(cwd?: string): Promise<MailmodoYaml | null>;
|
|
47
46
|
/**
|
package/dist/lib/yaml-config.js
CHANGED
|
@@ -3,26 +3,24 @@ 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';
|
|
7
6
|
/**
|
|
8
7
|
* Loads and parses the mailmodo.yaml configuration file from the specified
|
|
9
8
|
* directory (or current working directory).
|
|
10
9
|
*
|
|
11
10
|
* @param {string} [cwd] - Directory containing mailmodo.yaml. Defaults to process.cwd().
|
|
12
11
|
* @returns {Promise<MailmodoYaml | null>} The parsed configuration with project
|
|
13
|
-
* settings and email array, or null if the file doesn't exist
|
|
14
|
-
* formatted Error with the line number if the file contains invalid YAML syntax.
|
|
12
|
+
* settings and email array, or null if the file doesn't exist or can't be parsed.
|
|
15
13
|
*/
|
|
16
14
|
export async function loadYaml(cwd) {
|
|
17
15
|
const filePath = join(cwd || process.cwd(), YAML_FILE);
|
|
18
16
|
if (!existsSync(filePath))
|
|
19
17
|
return null;
|
|
20
|
-
const content = await readFile(filePath, 'utf8');
|
|
21
18
|
try {
|
|
19
|
+
const content = await readFile(filePath, 'utf8');
|
|
22
20
|
return load(content);
|
|
23
21
|
}
|
|
24
|
-
catch
|
|
25
|
-
|
|
22
|
+
catch {
|
|
23
|
+
return null;
|
|
26
24
|
}
|
|
27
25
|
}
|
|
28
26
|
/**
|
package/oclif.manifest.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
-
"
|
|
3
|
+
"billing": {
|
|
4
4
|
"aliases": [],
|
|
5
5
|
"args": {},
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "View billing status, purchase blocks, set cap, or add a payment method",
|
|
7
7
|
"examples": [
|
|
8
|
-
"<%= config.bin %>
|
|
9
|
-
"<%= config.bin %>
|
|
10
|
-
"<%= config.bin %>
|
|
11
|
-
"<%= config.bin %>
|
|
8
|
+
"<%= config.bin %> billing",
|
|
9
|
+
"<%= config.bin %> billing --status",
|
|
10
|
+
"<%= config.bin %> billing --cap 5",
|
|
11
|
+
"<%= config.bin %> billing --cap 5 --auto-charge-block-count 2",
|
|
12
|
+
"<%= config.bin %> billing --purchase 3",
|
|
13
|
+
"<%= config.bin %> billing --checkout"
|
|
12
14
|
],
|
|
13
15
|
"flags": {
|
|
14
16
|
"json": {
|
|
@@ -24,30 +26,43 @@
|
|
|
24
26
|
"allowNo": false,
|
|
25
27
|
"type": "boolean"
|
|
26
28
|
},
|
|
27
|
-
"
|
|
28
|
-
"description": "
|
|
29
|
-
"name": "
|
|
29
|
+
"auto-charge-block-count": {
|
|
30
|
+
"description": "Blocks to auto-purchase when the quota runs low (use with --cap)",
|
|
31
|
+
"name": "auto-charge-block-count",
|
|
30
32
|
"hasDynamicHelp": false,
|
|
31
33
|
"multiple": false,
|
|
32
34
|
"type": "option"
|
|
33
35
|
},
|
|
34
|
-
"
|
|
35
|
-
"description": "
|
|
36
|
-
"name": "
|
|
36
|
+
"cap": {
|
|
37
|
+
"description": "Set monthly sending cap in blocks",
|
|
38
|
+
"name": "cap",
|
|
39
|
+
"hasDynamicHelp": false,
|
|
40
|
+
"multiple": false,
|
|
41
|
+
"type": "option"
|
|
42
|
+
},
|
|
43
|
+
"checkout": {
|
|
44
|
+
"description": "Open Stripe checkout to add or update a payment method",
|
|
45
|
+
"name": "checkout",
|
|
37
46
|
"allowNo": false,
|
|
38
47
|
"type": "boolean"
|
|
39
48
|
},
|
|
40
|
-
"
|
|
41
|
-
"description": "
|
|
42
|
-
"name": "
|
|
49
|
+
"purchase": {
|
|
50
|
+
"description": "Manually purchase this many 10,000-email blocks",
|
|
51
|
+
"name": "purchase",
|
|
43
52
|
"hasDynamicHelp": false,
|
|
44
53
|
"multiple": false,
|
|
45
54
|
"type": "option"
|
|
55
|
+
},
|
|
56
|
+
"status": {
|
|
57
|
+
"description": "Show billing status only",
|
|
58
|
+
"name": "status",
|
|
59
|
+
"allowNo": false,
|
|
60
|
+
"type": "boolean"
|
|
46
61
|
}
|
|
47
62
|
},
|
|
48
63
|
"hasDynamicHelp": false,
|
|
49
64
|
"hiddenAliases": [],
|
|
50
|
-
"id": "
|
|
65
|
+
"id": "billing",
|
|
51
66
|
"pluginAlias": "@mailmodo/cli",
|
|
52
67
|
"pluginName": "@mailmodo/cli",
|
|
53
68
|
"pluginType": "core",
|
|
@@ -57,21 +72,19 @@
|
|
|
57
72
|
"relativePath": [
|
|
58
73
|
"dist",
|
|
59
74
|
"commands",
|
|
60
|
-
"
|
|
75
|
+
"billing",
|
|
61
76
|
"index.js"
|
|
62
77
|
]
|
|
63
78
|
},
|
|
64
|
-
"
|
|
79
|
+
"contacts": {
|
|
65
80
|
"aliases": [],
|
|
66
81
|
"args": {},
|
|
67
|
-
"description": "
|
|
82
|
+
"description": "Manage contacts — search, export, or delete",
|
|
68
83
|
"examples": [
|
|
69
|
-
"<%= config.bin %>
|
|
70
|
-
"<%= config.bin %>
|
|
71
|
-
"<%= config.bin %>
|
|
72
|
-
"<%= config.bin %>
|
|
73
|
-
"<%= config.bin %> billing --purchase 3",
|
|
74
|
-
"<%= config.bin %> billing --checkout"
|
|
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"
|
|
75
88
|
],
|
|
76
89
|
"flags": {
|
|
77
90
|
"json": {
|
|
@@ -87,43 +100,30 @@
|
|
|
87
100
|
"allowNo": false,
|
|
88
101
|
"type": "boolean"
|
|
89
102
|
},
|
|
90
|
-
"
|
|
91
|
-
"description": "
|
|
92
|
-
"name": "
|
|
93
|
-
"hasDynamicHelp": false,
|
|
94
|
-
"multiple": false,
|
|
95
|
-
"type": "option"
|
|
96
|
-
},
|
|
97
|
-
"cap": {
|
|
98
|
-
"description": "Set monthly sending cap in blocks",
|
|
99
|
-
"name": "cap",
|
|
103
|
+
"delete": {
|
|
104
|
+
"description": "GDPR hard delete a contact by email",
|
|
105
|
+
"name": "delete",
|
|
100
106
|
"hasDynamicHelp": false,
|
|
101
107
|
"multiple": false,
|
|
102
108
|
"type": "option"
|
|
103
109
|
},
|
|
104
|
-
"
|
|
105
|
-
"description": "
|
|
106
|
-
"name": "
|
|
110
|
+
"export": {
|
|
111
|
+
"description": "Export all contacts as GDPR-compliant CSV (writes contacts.csv in the current directory)",
|
|
112
|
+
"name": "export",
|
|
107
113
|
"allowNo": false,
|
|
108
114
|
"type": "boolean"
|
|
109
115
|
},
|
|
110
|
-
"
|
|
111
|
-
"description": "
|
|
112
|
-
"name": "
|
|
116
|
+
"search": {
|
|
117
|
+
"description": "Search for a contact by email",
|
|
118
|
+
"name": "search",
|
|
113
119
|
"hasDynamicHelp": false,
|
|
114
120
|
"multiple": false,
|
|
115
121
|
"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": "contacts",
|
|
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
|
+
"contacts",
|
|
137
137
|
"index.js"
|
|
138
138
|
]
|
|
139
139
|
},
|
|
@@ -228,19 +228,13 @@
|
|
|
228
228
|
"index.js"
|
|
229
229
|
]
|
|
230
230
|
},
|
|
231
|
-
"
|
|
231
|
+
"emails": {
|
|
232
232
|
"aliases": [],
|
|
233
|
-
"args": {
|
|
234
|
-
|
|
235
|
-
"description": "Email template ID to edit",
|
|
236
|
-
"name": "id",
|
|
237
|
-
"required": true
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
"description": "Edit an email using AI-assisted natural language changes",
|
|
233
|
+
"args": {},
|
|
234
|
+
"description": "List and view configured email sequences",
|
|
241
235
|
"examples": [
|
|
242
|
-
"<%= config.bin %>
|
|
243
|
-
"<%= config.bin %>
|
|
236
|
+
"<%= config.bin %> emails",
|
|
237
|
+
"<%= config.bin %> emails --json"
|
|
244
238
|
],
|
|
245
239
|
"flags": {
|
|
246
240
|
"json": {
|
|
@@ -255,18 +249,11 @@
|
|
|
255
249
|
"name": "yes",
|
|
256
250
|
"allowNo": false,
|
|
257
251
|
"type": "boolean"
|
|
258
|
-
},
|
|
259
|
-
"change": {
|
|
260
|
-
"description": "Natural language description of the change",
|
|
261
|
-
"name": "change",
|
|
262
|
-
"hasDynamicHelp": false,
|
|
263
|
-
"multiple": false,
|
|
264
|
-
"type": "option"
|
|
265
252
|
}
|
|
266
253
|
},
|
|
267
254
|
"hasDynamicHelp": false,
|
|
268
255
|
"hiddenAliases": [],
|
|
269
|
-
"id": "
|
|
256
|
+
"id": "emails",
|
|
270
257
|
"pluginAlias": "@mailmodo/cli",
|
|
271
258
|
"pluginName": "@mailmodo/cli",
|
|
272
259
|
"pluginType": "core",
|
|
@@ -276,17 +263,23 @@
|
|
|
276
263
|
"relativePath": [
|
|
277
264
|
"dist",
|
|
278
265
|
"commands",
|
|
279
|
-
"
|
|
266
|
+
"emails",
|
|
280
267
|
"index.js"
|
|
281
268
|
]
|
|
282
269
|
},
|
|
283
|
-
"
|
|
270
|
+
"edit": {
|
|
284
271
|
"aliases": [],
|
|
285
|
-
"args": {
|
|
286
|
-
|
|
272
|
+
"args": {
|
|
273
|
+
"id": {
|
|
274
|
+
"description": "Email template ID to edit",
|
|
275
|
+
"name": "id",
|
|
276
|
+
"required": true
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
"description": "Edit an email using AI-assisted natural language changes",
|
|
287
280
|
"examples": [
|
|
288
|
-
"<%= config.bin %>
|
|
289
|
-
"<%= config.bin %>
|
|
281
|
+
"<%= config.bin %> edit welcome",
|
|
282
|
+
"<%= config.bin %> edit welcome --change \"make subject more urgent\" --yes"
|
|
290
283
|
],
|
|
291
284
|
"flags": {
|
|
292
285
|
"json": {
|
|
@@ -301,11 +294,18 @@
|
|
|
301
294
|
"name": "yes",
|
|
302
295
|
"allowNo": false,
|
|
303
296
|
"type": "boolean"
|
|
297
|
+
},
|
|
298
|
+
"change": {
|
|
299
|
+
"description": "Natural language description of the change",
|
|
300
|
+
"name": "change",
|
|
301
|
+
"hasDynamicHelp": false,
|
|
302
|
+
"multiple": false,
|
|
303
|
+
"type": "option"
|
|
304
304
|
}
|
|
305
305
|
},
|
|
306
306
|
"hasDynamicHelp": false,
|
|
307
307
|
"hiddenAliases": [],
|
|
308
|
-
"id": "
|
|
308
|
+
"id": "edit",
|
|
309
309
|
"pluginAlias": "@mailmodo/cli",
|
|
310
310
|
"pluginName": "@mailmodo/cli",
|
|
311
311
|
"pluginType": "core",
|
|
@@ -315,7 +315,7 @@
|
|
|
315
315
|
"relativePath": [
|
|
316
316
|
"dist",
|
|
317
317
|
"commands",
|
|
318
|
-
"
|
|
318
|
+
"edit",
|
|
319
319
|
"index.js"
|
|
320
320
|
]
|
|
321
321
|
},
|
|
@@ -570,13 +570,14 @@
|
|
|
570
570
|
"index.js"
|
|
571
571
|
]
|
|
572
572
|
},
|
|
573
|
-
"
|
|
573
|
+
"settings": {
|
|
574
574
|
"aliases": [],
|
|
575
575
|
"args": {},
|
|
576
|
-
"description": "View
|
|
576
|
+
"description": "View and update project settings",
|
|
577
577
|
"examples": [
|
|
578
|
-
"<%= config.bin %>
|
|
579
|
-
"<%= config.bin %>
|
|
578
|
+
"<%= config.bin %> settings",
|
|
579
|
+
"<%= config.bin %> settings --set brand_color=#0F3460",
|
|
580
|
+
"<%= config.bin %> settings --json"
|
|
580
581
|
],
|
|
581
582
|
"flags": {
|
|
582
583
|
"json": {
|
|
@@ -591,11 +592,18 @@
|
|
|
591
592
|
"name": "yes",
|
|
592
593
|
"allowNo": false,
|
|
593
594
|
"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"
|
|
594
602
|
}
|
|
595
603
|
},
|
|
596
604
|
"hasDynamicHelp": false,
|
|
597
605
|
"hiddenAliases": [],
|
|
598
|
-
"id": "
|
|
606
|
+
"id": "settings",
|
|
599
607
|
"pluginAlias": "@mailmodo/cli",
|
|
600
608
|
"pluginName": "@mailmodo/cli",
|
|
601
609
|
"pluginType": "core",
|
|
@@ -605,18 +613,17 @@
|
|
|
605
613
|
"relativePath": [
|
|
606
614
|
"dist",
|
|
607
615
|
"commands",
|
|
608
|
-
"
|
|
616
|
+
"settings",
|
|
609
617
|
"index.js"
|
|
610
618
|
]
|
|
611
619
|
},
|
|
612
|
-
"
|
|
620
|
+
"status": {
|
|
613
621
|
"aliases": [],
|
|
614
622
|
"args": {},
|
|
615
|
-
"description": "View and
|
|
623
|
+
"description": "View email performance metrics and quota usage",
|
|
616
624
|
"examples": [
|
|
617
|
-
"<%= config.bin %>
|
|
618
|
-
"<%= config.bin %>
|
|
619
|
-
"<%= config.bin %> settings --json"
|
|
625
|
+
"<%= config.bin %> status",
|
|
626
|
+
"<%= config.bin %> status --json"
|
|
620
627
|
],
|
|
621
628
|
"flags": {
|
|
622
629
|
"json": {
|
|
@@ -631,18 +638,11 @@
|
|
|
631
638
|
"name": "yes",
|
|
632
639
|
"allowNo": false,
|
|
633
640
|
"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": "status",
|
|
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
|
+
"status",
|
|
656
656
|
"index.js"
|
|
657
657
|
]
|
|
658
658
|
}
|
|
659
659
|
},
|
|
660
|
-
"version": "0.0.44
|
|
660
|
+
"version": "0.0.44"
|
|
661
661
|
}
|