@mailmodo/cli 0.0.44 → 0.0.45-beta.pr47.73
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.
|
@@ -28,7 +28,7 @@ export default class Billing extends BaseCommand {
|
|
|
28
28
|
description: 'Open Stripe checkout to add or update a payment method',
|
|
29
29
|
}),
|
|
30
30
|
purchase: Flags.integer({
|
|
31
|
-
description: 'Manually purchase
|
|
31
|
+
description: 'Manually purchase email blocks',
|
|
32
32
|
}),
|
|
33
33
|
status: Flags.boolean({
|
|
34
34
|
default: false,
|
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
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"type": "boolean"
|
|
48
48
|
},
|
|
49
49
|
"purchase": {
|
|
50
|
-
"description": "Manually purchase
|
|
50
|
+
"description": "Manually purchase email blocks",
|
|
51
51
|
"name": "purchase",
|
|
52
52
|
"hasDynamicHelp": false,
|
|
53
53
|
"multiple": false,
|
|
@@ -228,13 +228,19 @@
|
|
|
228
228
|
"index.js"
|
|
229
229
|
]
|
|
230
230
|
},
|
|
231
|
-
"
|
|
231
|
+
"edit": {
|
|
232
232
|
"aliases": [],
|
|
233
|
-
"args": {
|
|
234
|
-
|
|
233
|
+
"args": {
|
|
234
|
+
"id": {
|
|
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",
|
|
235
241
|
"examples": [
|
|
236
|
-
"<%= config.bin %>
|
|
237
|
-
"<%= config.bin %>
|
|
242
|
+
"<%= config.bin %> edit welcome",
|
|
243
|
+
"<%= config.bin %> edit welcome --change \"make subject more urgent\" --yes"
|
|
238
244
|
],
|
|
239
245
|
"flags": {
|
|
240
246
|
"json": {
|
|
@@ -249,11 +255,18 @@
|
|
|
249
255
|
"name": "yes",
|
|
250
256
|
"allowNo": false,
|
|
251
257
|
"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"
|
|
252
265
|
}
|
|
253
266
|
},
|
|
254
267
|
"hasDynamicHelp": false,
|
|
255
268
|
"hiddenAliases": [],
|
|
256
|
-
"id": "
|
|
269
|
+
"id": "edit",
|
|
257
270
|
"pluginAlias": "@mailmodo/cli",
|
|
258
271
|
"pluginName": "@mailmodo/cli",
|
|
259
272
|
"pluginType": "core",
|
|
@@ -263,23 +276,17 @@
|
|
|
263
276
|
"relativePath": [
|
|
264
277
|
"dist",
|
|
265
278
|
"commands",
|
|
266
|
-
"
|
|
279
|
+
"edit",
|
|
267
280
|
"index.js"
|
|
268
281
|
]
|
|
269
282
|
},
|
|
270
|
-
"
|
|
283
|
+
"emails": {
|
|
271
284
|
"aliases": [],
|
|
272
|
-
"args": {
|
|
273
|
-
|
|
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",
|
|
285
|
+
"args": {},
|
|
286
|
+
"description": "List and view configured email sequences",
|
|
280
287
|
"examples": [
|
|
281
|
-
"<%= config.bin %>
|
|
282
|
-
"<%= config.bin %>
|
|
288
|
+
"<%= config.bin %> emails",
|
|
289
|
+
"<%= config.bin %> emails --json"
|
|
283
290
|
],
|
|
284
291
|
"flags": {
|
|
285
292
|
"json": {
|
|
@@ -294,18 +301,11 @@
|
|
|
294
301
|
"name": "yes",
|
|
295
302
|
"allowNo": false,
|
|
296
303
|
"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": "emails",
|
|
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
|
+
"emails",
|
|
319
319
|
"index.js"
|
|
320
320
|
]
|
|
321
321
|
},
|
|
@@ -657,5 +657,5 @@
|
|
|
657
657
|
]
|
|
658
658
|
}
|
|
659
659
|
},
|
|
660
|
-
"version": "0.0.
|
|
660
|
+
"version": "0.0.45-beta.pr47.73"
|
|
661
661
|
}
|