@mailmodo/cli 0.0.30-beta.pr32.52 → 0.0.30
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 -2
- package/dist/commands/edit/index.d.ts +1 -11
- package/dist/commands/edit/index.js +86 -148
- package/dist/commands/emails/index.d.ts +0 -2
- package/dist/commands/emails/index.js +1 -50
- package/dist/commands/init/index.js +1 -1
- package/dist/commands/preview/index.js +2 -2
- package/dist/lib/yaml-config.d.ts +0 -1
- package/dist/lib/yaml-config.js +0 -4
- package/oclif.manifest.json +90 -90
- package/package.json +1 -1
|
@@ -62,8 +62,7 @@ export default class Deploy extends BaseCommand {
|
|
|
62
62
|
async buildDeployPayload(yamlConfig) {
|
|
63
63
|
const emailsWithHtml = await Promise.all(yamlConfig.emails.map(async (email) => {
|
|
64
64
|
const html = (await loadTemplate(`${email.id}.html`)) || '';
|
|
65
|
-
|
|
66
|
-
return { ...this.mapEmailToPayload(email), html, plainHtml };
|
|
65
|
+
return { ...this.mapEmailToPayload(email), html, plainHtml: html };
|
|
67
66
|
}));
|
|
68
67
|
return {
|
|
69
68
|
...this.buildProjectPayload(yamlConfig.project),
|
|
@@ -10,17 +10,6 @@ export default class Edit extends BaseCommand {
|
|
|
10
10
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
yes: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
12
|
};
|
|
13
|
-
run(): Promise<void>;
|
|
14
|
-
private runEditStep;
|
|
15
|
-
private handleUserAction;
|
|
16
|
-
private callEditApi;
|
|
17
|
-
private finalizeEdit;
|
|
18
|
-
private applyEmailChanges;
|
|
19
|
-
private persistChanges;
|
|
20
|
-
private logJsonResult;
|
|
21
|
-
private handleAcceptOutput;
|
|
22
|
-
private promptEditAction;
|
|
23
|
-
private askChangeDescription;
|
|
24
13
|
private showFieldDiff;
|
|
25
14
|
private stripHtml;
|
|
26
15
|
private truncate;
|
|
@@ -31,4 +20,5 @@ export default class Edit extends BaseCommand {
|
|
|
31
20
|
private showUnchanged;
|
|
32
21
|
private buildDiffPreview;
|
|
33
22
|
private showChangeSummary;
|
|
23
|
+
run(): Promise<void>;
|
|
34
24
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import { confirm, input
|
|
2
|
+
import { confirm, input } from '@inquirer/prompts';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import { BaseCommand } from '../../lib/base-command.js';
|
|
5
5
|
import { API_ENDPOINTS } from '../../lib/constants.js';
|
|
6
|
-
import { loadTemplate,
|
|
6
|
+
import { loadTemplate, saveTemplate, saveYaml, } from '../../lib/yaml-config.js';
|
|
7
7
|
export default class Edit extends BaseCommand {
|
|
8
8
|
static args = {
|
|
9
9
|
id: Args.string({
|
|
@@ -22,152 +22,6 @@ export default class Edit extends BaseCommand {
|
|
|
22
22
|
description: 'Natural language description of the change',
|
|
23
23
|
}),
|
|
24
24
|
};
|
|
25
|
-
async run() {
|
|
26
|
-
const { args, flags } = await this.parse(Edit);
|
|
27
|
-
await this.ensureAuth();
|
|
28
|
-
const yamlConfig = await this.ensureYaml();
|
|
29
|
-
const emailIndex = yamlConfig.emails.findIndex((e) => e.id === args.id);
|
|
30
|
-
if (emailIndex === -1) {
|
|
31
|
-
this.error(`Email '${args.id}' not found in mailmodo.yaml.`);
|
|
32
|
-
}
|
|
33
|
-
const email = yamlConfig.emails[emailIndex];
|
|
34
|
-
const templateFilename = resolveTemplateFilename(email.id, email.style, yamlConfig.project?.emailStyle);
|
|
35
|
-
const ctx = {
|
|
36
|
-
email,
|
|
37
|
-
emailIndex,
|
|
38
|
-
templateFilename,
|
|
39
|
-
templateHtml: await loadTemplate(templateFilename),
|
|
40
|
-
yamlConfig,
|
|
41
|
-
};
|
|
42
|
-
const editFlags = {
|
|
43
|
-
json: flags.json ?? false,
|
|
44
|
-
yes: flags.yes ?? false,
|
|
45
|
-
};
|
|
46
|
-
const initialChange = flags.change?.trim() || (await this.askChangeDescription());
|
|
47
|
-
await this.runEditStep(ctx, initialChange, editFlags);
|
|
48
|
-
}
|
|
49
|
-
async runEditStep(ctx, changeDescription, flags) {
|
|
50
|
-
const response = await this.withApiSpinner({ json: flags.json, text: ' Applying AI edits...' }, () => this.callEditApi(changeDescription, ctx.email, ctx.templateHtml));
|
|
51
|
-
if (!response.ok) {
|
|
52
|
-
this.handleApiError(response);
|
|
53
|
-
}
|
|
54
|
-
const updated = response.data;
|
|
55
|
-
if (flags.json) {
|
|
56
|
-
this.log(JSON.stringify(this.buildDiffPreview(ctx.email, updated, ctx.templateHtml), null, 2));
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
this.showChangeSummary(ctx.email, updated, ctx.templateHtml);
|
|
60
|
-
}
|
|
61
|
-
if (flags.yes) {
|
|
62
|
-
await this.finalizeEdit(ctx, updated, flags);
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
await this.handleUserAction(ctx, updated, changeDescription, flags);
|
|
66
|
-
}
|
|
67
|
-
async handleUserAction(ctx, updated, changeDescription, flags) {
|
|
68
|
-
this.log('');
|
|
69
|
-
const action = await this.promptEditAction();
|
|
70
|
-
if (action === 'skip') {
|
|
71
|
-
this.log('\n Changes discarded.\n');
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
if (action === 'retry') {
|
|
75
|
-
const newChange = await this.askChangeDescription();
|
|
76
|
-
await this.runEditStep(ctx, newChange, flags);
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
await this.finalizeEdit(ctx, updated, flags);
|
|
80
|
-
}
|
|
81
|
-
callEditApi(changeDescription, email, templateHtml) {
|
|
82
|
-
return this.apiClient.post(API_ENDPOINTS.EDIT, {
|
|
83
|
-
changeRequest: changeDescription,
|
|
84
|
-
currentEmail: {
|
|
85
|
-
condition: email.condition,
|
|
86
|
-
goal: email.goal,
|
|
87
|
-
html: templateHtml,
|
|
88
|
-
id: email.id,
|
|
89
|
-
previewText: email.previewText,
|
|
90
|
-
subject: email.subject,
|
|
91
|
-
trigger: email.trigger,
|
|
92
|
-
},
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
async finalizeEdit(ctx, updated, flags) {
|
|
96
|
-
const oldSubject = ctx.email.subject;
|
|
97
|
-
this.applyEmailChanges(ctx.email, updated);
|
|
98
|
-
await this.persistChanges(ctx, updated);
|
|
99
|
-
if (flags.json) {
|
|
100
|
-
this.logJsonResult(ctx.email, updated, oldSubject);
|
|
101
|
-
}
|
|
102
|
-
else if (flags.yes) {
|
|
103
|
-
this.log(`\n Updated ${chalk.green('mailmodo.yaml')}\n`);
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
await this.handleAcceptOutput(ctx.email);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
applyEmailChanges(email, updated) {
|
|
110
|
-
if (updated.subject)
|
|
111
|
-
email.subject = updated.subject;
|
|
112
|
-
if (updated.previewText)
|
|
113
|
-
email.previewText = updated.previewText;
|
|
114
|
-
if (updated.ctaText)
|
|
115
|
-
email.ctaText = updated.ctaText;
|
|
116
|
-
}
|
|
117
|
-
async persistChanges(ctx, updated) {
|
|
118
|
-
const updatedYaml = {
|
|
119
|
-
...ctx.yamlConfig,
|
|
120
|
-
emails: [...ctx.yamlConfig.emails],
|
|
121
|
-
};
|
|
122
|
-
updatedYaml.emails[ctx.emailIndex] = ctx.email;
|
|
123
|
-
await saveYaml(updatedYaml);
|
|
124
|
-
if (updated.html) {
|
|
125
|
-
await saveTemplate(ctx.templateFilename, updated.html);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
logJsonResult(email, updated, oldSubject) {
|
|
129
|
-
this.log(JSON.stringify({
|
|
130
|
-
diff: {
|
|
131
|
-
previewText: updated.previewText && updated.previewText !== email.previewText
|
|
132
|
-
? { new: updated.previewText, old: email.previewText }
|
|
133
|
-
: undefined,
|
|
134
|
-
subject: oldSubject === email.subject
|
|
135
|
-
? undefined
|
|
136
|
-
: { new: email.subject, old: oldSubject },
|
|
137
|
-
},
|
|
138
|
-
email,
|
|
139
|
-
status: 'updated',
|
|
140
|
-
}, null, 2));
|
|
141
|
-
}
|
|
142
|
-
async handleAcceptOutput(email) {
|
|
143
|
-
this.log(`\n Updated ${chalk.green('mailmodo.yaml')}`);
|
|
144
|
-
const shouldPreview = await confirm({
|
|
145
|
-
default: true,
|
|
146
|
-
message: 'Preview the change?',
|
|
147
|
-
});
|
|
148
|
-
if (shouldPreview) {
|
|
149
|
-
await this.config.runCommand('preview', [email.id]);
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
this.log(` Run: ${chalk.cyan(`mailmodo preview ${email.id}`)}\n`);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
async promptEditAction() {
|
|
156
|
-
return select({
|
|
157
|
-
message: 'Accept, try again, or skip?',
|
|
158
|
-
choices: [
|
|
159
|
-
{ name: 'Accept', value: 'accept' },
|
|
160
|
-
{ name: 'Try again', value: 'retry' },
|
|
161
|
-
{ name: 'Skip', value: 'skip' },
|
|
162
|
-
],
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
async askChangeDescription() {
|
|
166
|
-
return input({
|
|
167
|
-
message: 'What do you want to change?',
|
|
168
|
-
validate: (value) => value?.trim() ? true : 'Please describe the change',
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
25
|
showFieldDiff(label, oldVal, newVal) {
|
|
172
26
|
if (!newVal || oldVal === newVal)
|
|
173
27
|
return false;
|
|
@@ -285,4 +139,88 @@ export default class Edit extends BaseCommand {
|
|
|
285
139
|
this.showSuggestedChanges(email, updated, templateHtml, changed);
|
|
286
140
|
this.showUnchanged(email, templateHtml, changed);
|
|
287
141
|
}
|
|
142
|
+
async run() {
|
|
143
|
+
const { args, flags } = await this.parse(Edit);
|
|
144
|
+
await this.ensureAuth();
|
|
145
|
+
const yamlConfig = await this.ensureYaml();
|
|
146
|
+
const emailIndex = yamlConfig.emails.findIndex((e) => e.id === args.id);
|
|
147
|
+
if (emailIndex === -1) {
|
|
148
|
+
this.error(`Email '${args.id}' not found in mailmodo.yaml.`);
|
|
149
|
+
}
|
|
150
|
+
const email = yamlConfig.emails[emailIndex];
|
|
151
|
+
const templateHtml = await loadTemplate(`${email.id}.html`);
|
|
152
|
+
let changeDescription = flags.change;
|
|
153
|
+
if (!changeDescription) {
|
|
154
|
+
changeDescription = await input({
|
|
155
|
+
message: 'What do you want to change?',
|
|
156
|
+
validate: (value) => value?.trim() ? true : 'Please describe the change',
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
const response = await this.withApiSpinner({ json: flags.json, text: ' Applying AI edits...' }, () => this.apiClient.post(API_ENDPOINTS.EDIT, {
|
|
160
|
+
changeRequest: changeDescription,
|
|
161
|
+
currentEmail: {
|
|
162
|
+
condition: email.condition,
|
|
163
|
+
goal: email.goal,
|
|
164
|
+
html: templateHtml,
|
|
165
|
+
id: email.id,
|
|
166
|
+
previewText: email.previewText,
|
|
167
|
+
subject: email.subject,
|
|
168
|
+
trigger: email.trigger,
|
|
169
|
+
},
|
|
170
|
+
}));
|
|
171
|
+
if (!response.ok) {
|
|
172
|
+
this.handleApiError(response);
|
|
173
|
+
}
|
|
174
|
+
const updated = response.data;
|
|
175
|
+
if (flags.json) {
|
|
176
|
+
this.log(JSON.stringify(this.buildDiffPreview(email, updated, templateHtml), null, 2));
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
this.showChangeSummary(email, updated, templateHtml);
|
|
180
|
+
}
|
|
181
|
+
if (!flags.yes) {
|
|
182
|
+
const accepted = await confirm({
|
|
183
|
+
default: true,
|
|
184
|
+
message: 'Accept changes?',
|
|
185
|
+
});
|
|
186
|
+
if (!accepted) {
|
|
187
|
+
this.log('\n Changes discarded.\n');
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
const oldSubject = email.subject;
|
|
192
|
+
const newSubject = updated.subject || email.subject;
|
|
193
|
+
if (updated.subject)
|
|
194
|
+
email.subject = updated.subject;
|
|
195
|
+
if (updated.previewText)
|
|
196
|
+
email.previewText = updated.previewText;
|
|
197
|
+
if (updated.ctaText)
|
|
198
|
+
email.ctaText = updated.ctaText;
|
|
199
|
+
const updatedYaml = {
|
|
200
|
+
...yamlConfig,
|
|
201
|
+
emails: [...yamlConfig.emails],
|
|
202
|
+
};
|
|
203
|
+
updatedYaml.emails[emailIndex] = email;
|
|
204
|
+
await saveYaml(updatedYaml);
|
|
205
|
+
if (updated.html) {
|
|
206
|
+
await saveTemplate(`${email.id}.html`, updated.html);
|
|
207
|
+
}
|
|
208
|
+
if (flags.json) {
|
|
209
|
+
this.log(JSON.stringify({
|
|
210
|
+
diff: {
|
|
211
|
+
previewText: updated.previewText && updated.previewText !== email.previewText
|
|
212
|
+
? { new: updated.previewText, old: email.previewText }
|
|
213
|
+
: undefined,
|
|
214
|
+
subject: oldSubject === newSubject
|
|
215
|
+
? undefined
|
|
216
|
+
: { new: newSubject, old: oldSubject },
|
|
217
|
+
},
|
|
218
|
+
email,
|
|
219
|
+
status: 'updated',
|
|
220
|
+
}, null, 2));
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
this.log(`\n Updated ${chalk.green('mailmodo.yaml')}`);
|
|
224
|
+
this.log(` Preview the change: ${chalk.cyan(`mailmodo preview ${email.id}`)}\n`);
|
|
225
|
+
}
|
|
288
226
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
import { confirm, input } from '@inquirer/prompts';
|
|
1
|
+
import { input } from '@inquirer/prompts';
|
|
4
2
|
import chalk from 'chalk';
|
|
5
|
-
import open from 'open';
|
|
6
3
|
import { BaseCommand } from '../../lib/base-command.js';
|
|
7
4
|
export default class Emails extends BaseCommand {
|
|
8
5
|
static description = 'List and view configured email sequences';
|
|
@@ -64,53 +61,7 @@ export default class Emails extends BaseCommand {
|
|
|
64
61
|
this.log(` ${chalk.bold('Goal:')} ${email.goal}`);
|
|
65
62
|
}
|
|
66
63
|
this.log('');
|
|
67
|
-
const openIt = await confirm({
|
|
68
|
-
default: true,
|
|
69
|
-
message: 'Open template in editor?',
|
|
70
|
-
});
|
|
71
|
-
if (openIt) {
|
|
72
|
-
await this.openTemplateInEditor(email.template);
|
|
73
|
-
}
|
|
74
64
|
}
|
|
75
65
|
}
|
|
76
66
|
}
|
|
77
|
-
async openTemplateInEditor(template) {
|
|
78
|
-
const templatePath = join(process.cwd(), template);
|
|
79
|
-
this.log(`\n Opening ${template}...\n`);
|
|
80
|
-
const editor = process.env.VISUAL || process.env.EDITOR;
|
|
81
|
-
if (editor) {
|
|
82
|
-
const [cmd, ...editorArgs] = editor.trim().split(/\s+/);
|
|
83
|
-
const launched = await new Promise((resolve) => {
|
|
84
|
-
const child = spawn(cmd, [...editorArgs, templatePath], {
|
|
85
|
-
stdio: 'inherit',
|
|
86
|
-
});
|
|
87
|
-
child.on('error', () => resolve(false));
|
|
88
|
-
child.on('close', () => resolve(true));
|
|
89
|
-
});
|
|
90
|
-
if (launched)
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
if (await this.trySpawnEditor('code', templatePath))
|
|
94
|
-
return;
|
|
95
|
-
try {
|
|
96
|
-
await open(templatePath);
|
|
97
|
-
}
|
|
98
|
-
catch {
|
|
99
|
-
this.log(` ${chalk.dim(`Could not open editor. Open the file manually: ${templatePath}`)}`);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
trySpawnEditor(editor, filePath) {
|
|
103
|
-
const [cmd, args] = process.platform === 'win32'
|
|
104
|
-
? ['cmd.exe', ['/c', editor, filePath]]
|
|
105
|
-
: [editor, [filePath]];
|
|
106
|
-
return new Promise((resolve) => {
|
|
107
|
-
const child = spawn(cmd, [...args], { stdio: 'ignore' });
|
|
108
|
-
child.on('error', () => {
|
|
109
|
-
resolve(false);
|
|
110
|
-
});
|
|
111
|
-
child.on('close', (code) => {
|
|
112
|
-
resolve(code === 0);
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
67
|
}
|
|
@@ -139,7 +139,7 @@ export default class Init extends BaseCommand {
|
|
|
139
139
|
project: {
|
|
140
140
|
brandColor: analysisPayload.brand?.color || DEFAULT_BRAND_COLOR,
|
|
141
141
|
description: analysisPayload.description,
|
|
142
|
-
emailStyle: '
|
|
142
|
+
emailStyle: 'branded',
|
|
143
143
|
fromEmail: '',
|
|
144
144
|
fromName: `Team ${analysisPayload.productName}`,
|
|
145
145
|
logoUrl: analysisPayload.brand?.logoUrl || '',
|
|
@@ -4,7 +4,7 @@ import chalk from 'chalk';
|
|
|
4
4
|
import open from 'open';
|
|
5
5
|
import { BaseCommand } from '../../lib/base-command.js';
|
|
6
6
|
import { API_ENDPOINTS, PREVIEW_PORT } from '../../lib/constants.js';
|
|
7
|
-
import { loadTemplate
|
|
7
|
+
import { loadTemplate } from '../../lib/yaml-config.js';
|
|
8
8
|
/* eslint-disable camelcase */
|
|
9
9
|
const SAMPLE_DATA = Object.freeze({
|
|
10
10
|
app_url: 'https://yourapp.com',
|
|
@@ -84,7 +84,7 @@ export default class Preview extends BaseCommand {
|
|
|
84
84
|
app_url: yamlConfig.project?.url || 'https://yourapp.com', // eslint-disable-line camelcase
|
|
85
85
|
product_name: yamlConfig.project?.name || 'YourApp', // eslint-disable-line camelcase
|
|
86
86
|
};
|
|
87
|
-
const templateHtml = await loadTemplate(
|
|
87
|
+
const templateHtml = await loadTemplate(`${email.id}.html`);
|
|
88
88
|
if (flags.send) {
|
|
89
89
|
const rendered = templateHtml
|
|
90
90
|
? renderTemplate(templateHtml, sampleData)
|
|
@@ -68,4 +68,3 @@ export declare function saveTemplate(filename: string, html: string, cwd?: strin
|
|
|
68
68
|
* or null if the file doesn't exist or can't be read.
|
|
69
69
|
*/
|
|
70
70
|
export declare function loadTemplate(filename: string, cwd?: string): Promise<null | string>;
|
|
71
|
-
export declare function resolveTemplateFilename(emailId: string, emailStyle?: 'branded' | 'plain', projectStyle?: 'branded' | 'plain'): string;
|
package/dist/lib/yaml-config.js
CHANGED
|
@@ -72,7 +72,3 @@ export async function loadTemplate(filename, cwd) {
|
|
|
72
72
|
return null;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
export function resolveTemplateFilename(emailId, emailStyle, projectStyle) {
|
|
76
|
-
const style = emailStyle ?? projectStyle ?? 'branded';
|
|
77
|
-
return style === 'plain' ? `${emailId}_plain.html` : `${emailId}.html`;
|
|
78
|
-
}
|
package/oclif.manifest.json
CHANGED
|
@@ -137,14 +137,13 @@
|
|
|
137
137
|
"index.js"
|
|
138
138
|
]
|
|
139
139
|
},
|
|
140
|
-
"
|
|
140
|
+
"deploy": {
|
|
141
141
|
"aliases": [],
|
|
142
142
|
"args": {},
|
|
143
|
-
"description": "
|
|
143
|
+
"description": "Deploy email sequences and verify sending domain",
|
|
144
144
|
"examples": [
|
|
145
|
-
"<%= config.bin %>
|
|
146
|
-
"<%= config.bin %>
|
|
147
|
-
"<%= config.bin %> domain --status"
|
|
145
|
+
"<%= config.bin %> deploy",
|
|
146
|
+
"<%= config.bin %> deploy --yes"
|
|
148
147
|
],
|
|
149
148
|
"flags": {
|
|
150
149
|
"json": {
|
|
@@ -159,23 +158,11 @@
|
|
|
159
158
|
"name": "yes",
|
|
160
159
|
"allowNo": false,
|
|
161
160
|
"type": "boolean"
|
|
162
|
-
},
|
|
163
|
-
"status": {
|
|
164
|
-
"description": "Show domain health status",
|
|
165
|
-
"name": "status",
|
|
166
|
-
"allowNo": false,
|
|
167
|
-
"type": "boolean"
|
|
168
|
-
},
|
|
169
|
-
"verify": {
|
|
170
|
-
"description": "Verify DNS records",
|
|
171
|
-
"name": "verify",
|
|
172
|
-
"allowNo": false,
|
|
173
|
-
"type": "boolean"
|
|
174
161
|
}
|
|
175
162
|
},
|
|
176
163
|
"hasDynamicHelp": false,
|
|
177
164
|
"hiddenAliases": [],
|
|
178
|
-
"id": "
|
|
165
|
+
"id": "deploy",
|
|
179
166
|
"pluginAlias": "@mailmodo/cli",
|
|
180
167
|
"pluginName": "@mailmodo/cli",
|
|
181
168
|
"pluginType": "core",
|
|
@@ -185,17 +172,18 @@
|
|
|
185
172
|
"relativePath": [
|
|
186
173
|
"dist",
|
|
187
174
|
"commands",
|
|
188
|
-
"
|
|
175
|
+
"deploy",
|
|
189
176
|
"index.js"
|
|
190
177
|
]
|
|
191
178
|
},
|
|
192
|
-
"
|
|
179
|
+
"domain": {
|
|
193
180
|
"aliases": [],
|
|
194
181
|
"args": {},
|
|
195
|
-
"description": "
|
|
182
|
+
"description": "Set up and verify your sending domain",
|
|
196
183
|
"examples": [
|
|
197
|
-
"<%= config.bin %>
|
|
198
|
-
"<%= config.bin %>
|
|
184
|
+
"<%= config.bin %> domain",
|
|
185
|
+
"<%= config.bin %> domain --verify",
|
|
186
|
+
"<%= config.bin %> domain --status"
|
|
199
187
|
],
|
|
200
188
|
"flags": {
|
|
201
189
|
"json": {
|
|
@@ -210,11 +198,23 @@
|
|
|
210
198
|
"name": "yes",
|
|
211
199
|
"allowNo": false,
|
|
212
200
|
"type": "boolean"
|
|
201
|
+
},
|
|
202
|
+
"status": {
|
|
203
|
+
"description": "Show domain health status",
|
|
204
|
+
"name": "status",
|
|
205
|
+
"allowNo": false,
|
|
206
|
+
"type": "boolean"
|
|
207
|
+
},
|
|
208
|
+
"verify": {
|
|
209
|
+
"description": "Verify DNS records",
|
|
210
|
+
"name": "verify",
|
|
211
|
+
"allowNo": false,
|
|
212
|
+
"type": "boolean"
|
|
213
213
|
}
|
|
214
214
|
},
|
|
215
215
|
"hasDynamicHelp": false,
|
|
216
216
|
"hiddenAliases": [],
|
|
217
|
-
"id": "
|
|
217
|
+
"id": "domain",
|
|
218
218
|
"pluginAlias": "@mailmodo/cli",
|
|
219
219
|
"pluginName": "@mailmodo/cli",
|
|
220
220
|
"pluginType": "core",
|
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
"relativePath": [
|
|
225
225
|
"dist",
|
|
226
226
|
"commands",
|
|
227
|
-
"
|
|
227
|
+
"domain",
|
|
228
228
|
"index.js"
|
|
229
229
|
]
|
|
230
230
|
},
|
|
@@ -365,13 +365,12 @@
|
|
|
365
365
|
"index.js"
|
|
366
366
|
]
|
|
367
367
|
},
|
|
368
|
-
"
|
|
368
|
+
"logout": {
|
|
369
369
|
"aliases": [],
|
|
370
370
|
"args": {},
|
|
371
|
-
"description": "
|
|
371
|
+
"description": "Sign out by removing saved credentials from this machine",
|
|
372
372
|
"examples": [
|
|
373
|
-
"<%= config.bin %>
|
|
374
|
-
"MAILMODO_API_KEY=mm_live_xxx <%= config.bin %> login"
|
|
373
|
+
"<%= config.bin %> logout"
|
|
375
374
|
],
|
|
376
375
|
"flags": {
|
|
377
376
|
"json": {
|
|
@@ -390,7 +389,7 @@
|
|
|
390
389
|
},
|
|
391
390
|
"hasDynamicHelp": false,
|
|
392
391
|
"hiddenAliases": [],
|
|
393
|
-
"id": "
|
|
392
|
+
"id": "logout",
|
|
394
393
|
"pluginAlias": "@mailmodo/cli",
|
|
395
394
|
"pluginName": "@mailmodo/cli",
|
|
396
395
|
"pluginType": "core",
|
|
@@ -400,16 +399,19 @@
|
|
|
400
399
|
"relativePath": [
|
|
401
400
|
"dist",
|
|
402
401
|
"commands",
|
|
403
|
-
"
|
|
402
|
+
"logout",
|
|
404
403
|
"index.js"
|
|
405
404
|
]
|
|
406
405
|
},
|
|
407
|
-
"
|
|
406
|
+
"logs": {
|
|
408
407
|
"aliases": [],
|
|
409
408
|
"args": {},
|
|
410
|
-
"description": "
|
|
409
|
+
"description": "View email send logs and delivery events",
|
|
411
410
|
"examples": [
|
|
412
|
-
"<%= config.bin %>
|
|
411
|
+
"<%= config.bin %> logs",
|
|
412
|
+
"<%= config.bin %> logs --email sarah@example.com",
|
|
413
|
+
"<%= config.bin %> logs --failed",
|
|
414
|
+
"<%= config.bin %> logs --json"
|
|
413
415
|
],
|
|
414
416
|
"flags": {
|
|
415
417
|
"json": {
|
|
@@ -424,11 +426,40 @@
|
|
|
424
426
|
"name": "yes",
|
|
425
427
|
"allowNo": false,
|
|
426
428
|
"type": "boolean"
|
|
429
|
+
},
|
|
430
|
+
"email": {
|
|
431
|
+
"description": "Filter logs by contact email",
|
|
432
|
+
"name": "email",
|
|
433
|
+
"hasDynamicHelp": false,
|
|
434
|
+
"multiple": false,
|
|
435
|
+
"type": "option"
|
|
436
|
+
},
|
|
437
|
+
"failed": {
|
|
438
|
+
"description": "Show only failed/bounced events",
|
|
439
|
+
"name": "failed",
|
|
440
|
+
"allowNo": false,
|
|
441
|
+
"type": "boolean"
|
|
442
|
+
},
|
|
443
|
+
"limit": {
|
|
444
|
+
"description": "Entries per page (max 200)",
|
|
445
|
+
"name": "limit",
|
|
446
|
+
"default": 50,
|
|
447
|
+
"hasDynamicHelp": false,
|
|
448
|
+
"multiple": false,
|
|
449
|
+
"type": "option"
|
|
450
|
+
},
|
|
451
|
+
"page": {
|
|
452
|
+
"description": "Page number",
|
|
453
|
+
"name": "page",
|
|
454
|
+
"default": 1,
|
|
455
|
+
"hasDynamicHelp": false,
|
|
456
|
+
"multiple": false,
|
|
457
|
+
"type": "option"
|
|
427
458
|
}
|
|
428
459
|
},
|
|
429
460
|
"hasDynamicHelp": false,
|
|
430
461
|
"hiddenAliases": [],
|
|
431
|
-
"id": "
|
|
462
|
+
"id": "logs",
|
|
432
463
|
"pluginAlias": "@mailmodo/cli",
|
|
433
464
|
"pluginName": "@mailmodo/cli",
|
|
434
465
|
"pluginType": "core",
|
|
@@ -438,7 +469,7 @@
|
|
|
438
469
|
"relativePath": [
|
|
439
470
|
"dist",
|
|
440
471
|
"commands",
|
|
441
|
-
"
|
|
472
|
+
"logs",
|
|
442
473
|
"index.js"
|
|
443
474
|
]
|
|
444
475
|
},
|
|
@@ -500,15 +531,14 @@
|
|
|
500
531
|
"index.js"
|
|
501
532
|
]
|
|
502
533
|
},
|
|
503
|
-
"
|
|
534
|
+
"settings": {
|
|
504
535
|
"aliases": [],
|
|
505
536
|
"args": {},
|
|
506
|
-
"description": "View
|
|
537
|
+
"description": "View and update project settings",
|
|
507
538
|
"examples": [
|
|
508
|
-
"<%= config.bin %>
|
|
509
|
-
"<%= config.bin %>
|
|
510
|
-
"<%= config.bin %>
|
|
511
|
-
"<%= config.bin %> logs --json"
|
|
539
|
+
"<%= config.bin %> settings",
|
|
540
|
+
"<%= config.bin %> settings --set brand_color=#0F3460",
|
|
541
|
+
"<%= config.bin %> settings --json"
|
|
512
542
|
],
|
|
513
543
|
"flags": {
|
|
514
544
|
"json": {
|
|
@@ -524,31 +554,9 @@
|
|
|
524
554
|
"allowNo": false,
|
|
525
555
|
"type": "boolean"
|
|
526
556
|
},
|
|
527
|
-
"
|
|
528
|
-
"description": "
|
|
529
|
-
"name": "
|
|
530
|
-
"hasDynamicHelp": false,
|
|
531
|
-
"multiple": false,
|
|
532
|
-
"type": "option"
|
|
533
|
-
},
|
|
534
|
-
"failed": {
|
|
535
|
-
"description": "Show only failed/bounced events",
|
|
536
|
-
"name": "failed",
|
|
537
|
-
"allowNo": false,
|
|
538
|
-
"type": "boolean"
|
|
539
|
-
},
|
|
540
|
-
"limit": {
|
|
541
|
-
"description": "Entries per page (max 200)",
|
|
542
|
-
"name": "limit",
|
|
543
|
-
"default": 50,
|
|
544
|
-
"hasDynamicHelp": false,
|
|
545
|
-
"multiple": false,
|
|
546
|
-
"type": "option"
|
|
547
|
-
},
|
|
548
|
-
"page": {
|
|
549
|
-
"description": "Page number",
|
|
550
|
-
"name": "page",
|
|
551
|
-
"default": 1,
|
|
557
|
+
"set": {
|
|
558
|
+
"description": "Set a setting (format: key=value)",
|
|
559
|
+
"name": "set",
|
|
552
560
|
"hasDynamicHelp": false,
|
|
553
561
|
"multiple": false,
|
|
554
562
|
"type": "option"
|
|
@@ -556,7 +564,7 @@
|
|
|
556
564
|
},
|
|
557
565
|
"hasDynamicHelp": false,
|
|
558
566
|
"hiddenAliases": [],
|
|
559
|
-
"id": "
|
|
567
|
+
"id": "settings",
|
|
560
568
|
"pluginAlias": "@mailmodo/cli",
|
|
561
569
|
"pluginName": "@mailmodo/cli",
|
|
562
570
|
"pluginType": "core",
|
|
@@ -566,18 +574,17 @@
|
|
|
566
574
|
"relativePath": [
|
|
567
575
|
"dist",
|
|
568
576
|
"commands",
|
|
569
|
-
"
|
|
577
|
+
"settings",
|
|
570
578
|
"index.js"
|
|
571
579
|
]
|
|
572
580
|
},
|
|
573
|
-
"
|
|
581
|
+
"status": {
|
|
574
582
|
"aliases": [],
|
|
575
583
|
"args": {},
|
|
576
|
-
"description": "View and
|
|
584
|
+
"description": "View email performance metrics and quota usage",
|
|
577
585
|
"examples": [
|
|
578
|
-
"<%= config.bin %>
|
|
579
|
-
"<%= config.bin %>
|
|
580
|
-
"<%= config.bin %> settings --json"
|
|
586
|
+
"<%= config.bin %> status",
|
|
587
|
+
"<%= config.bin %> status --json"
|
|
581
588
|
],
|
|
582
589
|
"flags": {
|
|
583
590
|
"json": {
|
|
@@ -592,18 +599,11 @@
|
|
|
592
599
|
"name": "yes",
|
|
593
600
|
"allowNo": false,
|
|
594
601
|
"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
602
|
}
|
|
603
603
|
},
|
|
604
604
|
"hasDynamicHelp": false,
|
|
605
605
|
"hiddenAliases": [],
|
|
606
|
-
"id": "
|
|
606
|
+
"id": "status",
|
|
607
607
|
"pluginAlias": "@mailmodo/cli",
|
|
608
608
|
"pluginName": "@mailmodo/cli",
|
|
609
609
|
"pluginType": "core",
|
|
@@ -613,17 +613,17 @@
|
|
|
613
613
|
"relativePath": [
|
|
614
614
|
"dist",
|
|
615
615
|
"commands",
|
|
616
|
-
"
|
|
616
|
+
"status",
|
|
617
617
|
"index.js"
|
|
618
618
|
]
|
|
619
619
|
},
|
|
620
|
-
"
|
|
620
|
+
"login": {
|
|
621
621
|
"aliases": [],
|
|
622
622
|
"args": {},
|
|
623
|
-
"description": "
|
|
623
|
+
"description": "Authenticate with Mailmodo using your API key",
|
|
624
624
|
"examples": [
|
|
625
|
-
"<%= config.bin %>
|
|
626
|
-
"<%= config.bin %>
|
|
625
|
+
"<%= config.bin %> login",
|
|
626
|
+
"MAILMODO_API_KEY=mm_live_xxx <%= config.bin %> login"
|
|
627
627
|
],
|
|
628
628
|
"flags": {
|
|
629
629
|
"json": {
|
|
@@ -642,7 +642,7 @@
|
|
|
642
642
|
},
|
|
643
643
|
"hasDynamicHelp": false,
|
|
644
644
|
"hiddenAliases": [],
|
|
645
|
-
"id": "
|
|
645
|
+
"id": "login",
|
|
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
|
+
"login",
|
|
656
656
|
"index.js"
|
|
657
657
|
]
|
|
658
658
|
}
|
|
659
659
|
},
|
|
660
|
-
"version": "0.0.30
|
|
660
|
+
"version": "0.0.30"
|
|
661
661
|
}
|