@mailmodo/cli 0.0.54-beta.pr56.88 → 0.0.54-beta.pr56.90
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 +6 -2
- package/dist/commands/edit/index.js +18 -0
- package/dist/commands/preview/index.js +24 -12
- package/dist/lib/deploy/types.d.ts +3 -1
- package/dist/lib/templates/missing-templates.d.ts +5 -0
- package/dist/lib/{deploy → templates}/missing-templates.js +3 -4
- package/dist/lib/templates/types.d.ts +13 -0
- package/dist/lib/templates/types.js +1 -0
- package/oclif.manifest.json +123 -123
- package/package.json +1 -1
- package/dist/lib/deploy/missing-templates.d.ts +0 -4
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
2
|
import { confirm } from '@inquirer/prompts';
|
|
3
|
+
import chalk from 'chalk';
|
|
3
4
|
import { BaseCommand } from '../../lib/base-command.js';
|
|
4
5
|
import { API_ENDPOINTS } from '../../lib/constants.js';
|
|
6
|
+
import { MISSING_TEMPLATES } from '../../lib/messages.js';
|
|
5
7
|
import { buildDeployPayload } from '../../lib/deploy/payload.js';
|
|
6
8
|
import { logDeploySuccessInstructions, logPreDeploySummary, } from '../../lib/deploy/output.js';
|
|
7
9
|
import { pauseSequence, resumeSequence, } from '../../lib/deploy/sequence-status.js';
|
|
8
10
|
import { ensureDomainReady, validateDeploySequence, } from '../../lib/deploy/domain-setup.js';
|
|
9
|
-
import { getMissingTemplateIds, handleMissingTemplates, } from '../../lib/
|
|
11
|
+
import { getMissingTemplateIds, handleMissingTemplates, } from '../../lib/templates/missing-templates.js';
|
|
10
12
|
export default class Deploy extends BaseCommand {
|
|
11
13
|
static description = 'Deploy, pause, or resume an email sequence';
|
|
12
14
|
static examples = [
|
|
@@ -42,7 +44,9 @@ export default class Deploy extends BaseCommand {
|
|
|
42
44
|
const yamlConfig = await this.ensureYaml();
|
|
43
45
|
const missingIds = getMissingTemplateIds(yamlConfig);
|
|
44
46
|
if (missingIds.length > 0) {
|
|
45
|
-
await handleMissingTemplates(ctx, yamlConfig, missingIds, baseFlags);
|
|
47
|
+
const regenerated = await handleMissingTemplates(ctx, yamlConfig, missingIds, baseFlags);
|
|
48
|
+
if (regenerated)
|
|
49
|
+
ctx.log(`\n ${chalk.green('✓')} ${MISSING_TEMPLATES.REVIEW_HINT}\n`);
|
|
46
50
|
return;
|
|
47
51
|
}
|
|
48
52
|
const domainReady = await ensureDomainReady(ctx, yamlConfig, baseFlags);
|
|
@@ -4,6 +4,7 @@ import chalk from 'chalk';
|
|
|
4
4
|
import { BaseCommand } from '../../lib/base-command.js';
|
|
5
5
|
import { API_ENDPOINTS } from '../../lib/constants.js';
|
|
6
6
|
import { loadTemplate, getTemplateFilename, saveTemplate, saveYaml, } from '../../lib/yaml-config.js';
|
|
7
|
+
import { handleMissingTemplates } from '../../lib/templates/missing-templates.js';
|
|
7
8
|
export default class Edit extends BaseCommand {
|
|
8
9
|
static args = {
|
|
9
10
|
id: Args.string({
|
|
@@ -43,6 +44,23 @@ export default class Edit extends BaseCommand {
|
|
|
43
44
|
json: flags.json ?? false,
|
|
44
45
|
yes: flags.yes ?? false,
|
|
45
46
|
};
|
|
47
|
+
if (!ctx.templateHtml) {
|
|
48
|
+
const regenCtx = {
|
|
49
|
+
error: (msg) => this.error(msg),
|
|
50
|
+
exit: (code) => this.exit(code),
|
|
51
|
+
log: (msg) => this.log(msg),
|
|
52
|
+
onApiError: (r) => this.handleApiError(r),
|
|
53
|
+
post: (path, body) => this.apiClient.post(path, body),
|
|
54
|
+
spinner: (text, json, work) => this.withApiSpinner({ json, text }, work),
|
|
55
|
+
syncYaml: () => this.syncYamlToServer(),
|
|
56
|
+
};
|
|
57
|
+
const regenerated = await handleMissingTemplates(regenCtx, yamlConfig, [email.id], editFlags);
|
|
58
|
+
if (!regenerated)
|
|
59
|
+
return;
|
|
60
|
+
ctx.templateHtml = await loadTemplate(templateFilename);
|
|
61
|
+
if (!ctx.templateHtml)
|
|
62
|
+
this.error('Template regeneration failed.');
|
|
63
|
+
}
|
|
46
64
|
const initialChange = flags.change?.trim() || (await this.askChangeDescription());
|
|
47
65
|
await this.runEditStep(ctx, initialChange, editFlags);
|
|
48
66
|
}
|
|
@@ -6,6 +6,7 @@ import { BaseCommand } from '../../lib/base-command.js';
|
|
|
6
6
|
import { API_ENDPOINTS, PREVIEW_PORT } from '../../lib/constants.js';
|
|
7
7
|
import { INFO } from '../../lib/messages.js';
|
|
8
8
|
import { loadTemplate, getEmailStyle, getTemplateFilename, } from '../../lib/yaml-config.js';
|
|
9
|
+
import { handleMissingTemplates } from '../../lib/templates/missing-templates.js';
|
|
9
10
|
/* eslint-disable camelcase */
|
|
10
11
|
const SAMPLE_DATA = Object.freeze({
|
|
11
12
|
app_url: 'https://yourapp.com',
|
|
@@ -86,12 +87,28 @@ export default class Preview extends BaseCommand {
|
|
|
86
87
|
product_name: yamlConfig.project?.name || 'YourApp', // eslint-disable-line camelcase
|
|
87
88
|
};
|
|
88
89
|
const effectiveStyle = getEmailStyle(email.style, yamlConfig.project?.emailStyle);
|
|
89
|
-
const
|
|
90
|
+
const templateFilename = getTemplateFilename(email.id, email.style, yamlConfig.project?.emailStyle);
|
|
91
|
+
let templateHtml = await loadTemplate(templateFilename);
|
|
92
|
+
if (!templateHtml) {
|
|
93
|
+
await this.ensureAuth();
|
|
94
|
+
const regenCtx = {
|
|
95
|
+
error: (msg) => this.error(msg),
|
|
96
|
+
exit: (code) => this.exit(code),
|
|
97
|
+
log: (msg) => this.log(msg),
|
|
98
|
+
onApiError: (r) => this.handleApiError(r),
|
|
99
|
+
post: (path, body) => this.apiClient.post(path, body),
|
|
100
|
+
spinner: (text, json, work) => this.withApiSpinner({ json, text }, work),
|
|
101
|
+
syncYaml: () => this.syncYamlToServer(),
|
|
102
|
+
};
|
|
103
|
+
const regenerated = await handleMissingTemplates(regenCtx, yamlConfig, [email.id], { json: flags.json, yes: flags.yes });
|
|
104
|
+
if (!regenerated)
|
|
105
|
+
return;
|
|
106
|
+
templateHtml = await loadTemplate(templateFilename);
|
|
107
|
+
if (!templateHtml)
|
|
108
|
+
this.error('Template regeneration failed.');
|
|
109
|
+
}
|
|
90
110
|
if (flags.send) {
|
|
91
|
-
|
|
92
|
-
? renderTemplate(templateHtml, sampleData)
|
|
93
|
-
: '';
|
|
94
|
-
await this.sendTestEmail(email, rendered, {
|
|
111
|
+
await this.sendTestEmail(email, renderTemplate(templateHtml, sampleData), {
|
|
95
112
|
domain: yamlConfig.project?.domain,
|
|
96
113
|
jsonOutput: flags.json,
|
|
97
114
|
toAddress: flags.send,
|
|
@@ -112,10 +129,7 @@ export default class Preview extends BaseCommand {
|
|
|
112
129
|
* and CI pipelines that cannot open a browser.
|
|
113
130
|
*/
|
|
114
131
|
async renderText(email, templateHtml, sampleData, jsonOutput) {
|
|
115
|
-
const
|
|
116
|
-
? renderTemplate(templateHtml, sampleData)
|
|
117
|
-
: '';
|
|
118
|
-
const plainText = htmlToText(rendered);
|
|
132
|
+
const plainText = htmlToText(renderTemplate(templateHtml, sampleData));
|
|
119
133
|
if (jsonOutput) {
|
|
120
134
|
this.log(JSON.stringify({
|
|
121
135
|
body: plainText,
|
|
@@ -181,9 +195,7 @@ export default class Preview extends BaseCommand {
|
|
|
181
195
|
*/
|
|
182
196
|
async startPreviewServer(email, templateHtml, sampleData, opts) {
|
|
183
197
|
const { effectiveStyle, jsonOutput } = opts;
|
|
184
|
-
const rendered = templateHtml
|
|
185
|
-
? renderTemplate(templateHtml, sampleData)
|
|
186
|
-
: '<p>No template found.</p>';
|
|
198
|
+
const rendered = renderTemplate(templateHtml, sampleData);
|
|
187
199
|
const wrapperHtml = `<!DOCTYPE html>
|
|
188
200
|
<html>
|
|
189
201
|
<head>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ApiResponse } from '../api-client.js';
|
|
2
2
|
import type { MailmodoYaml } from '../yaml-config.js';
|
|
3
|
+
import type { RegenCtx } from '../templates/types.js';
|
|
3
4
|
export interface EmailDiffEntry {
|
|
4
5
|
changedFields?: string[];
|
|
5
6
|
id: string;
|
|
@@ -44,7 +45,7 @@ export type DeployFlags = {
|
|
|
44
45
|
json: boolean;
|
|
45
46
|
yes: boolean;
|
|
46
47
|
};
|
|
47
|
-
export type DeployCtx = {
|
|
48
|
+
export type DeployCtx = RegenCtx & {
|
|
48
49
|
collectDomainInputs(yaml: MailmodoYaml, skip: boolean): Promise<{
|
|
49
50
|
address: string;
|
|
50
51
|
domain: string;
|
|
@@ -84,3 +85,4 @@ export type DeployCtx = {
|
|
|
84
85
|
spinner<T>(text: string, json: boolean, work: () => Promise<T>): Promise<T>;
|
|
85
86
|
syncYaml(): Promise<void>;
|
|
86
87
|
};
|
|
88
|
+
export { type RegenCtx } from '../templates/types.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type MailmodoYaml } from '../yaml-config.js';
|
|
2
|
+
import type { DeployFlags } from '../deploy/types.js';
|
|
3
|
+
import type { RegenCtx } from './types.js';
|
|
4
|
+
export declare function getMissingTemplateIds(yamlConfig: MailmodoYaml): string[];
|
|
5
|
+
export declare function handleMissingTemplates(ctx: RegenCtx, yamlConfig: MailmodoYaml, missingIds: string[], flags: DeployFlags): Promise<boolean>;
|
|
@@ -5,7 +5,7 @@ import chalk from 'chalk';
|
|
|
5
5
|
import { API_ENDPOINTS, TEMPLATES_DIR } from '../constants.js';
|
|
6
6
|
import { MISSING_TEMPLATES } from '../messages.js';
|
|
7
7
|
import { getTemplateFilename, saveTemplate, } from '../yaml-config.js';
|
|
8
|
-
import { buildRegeneratePayload } from '
|
|
8
|
+
import { buildRegeneratePayload } from '../deploy/payload.js';
|
|
9
9
|
export function getMissingTemplateIds(yamlConfig) {
|
|
10
10
|
return yamlConfig.emails
|
|
11
11
|
.filter((e) => !existsSync(join(process.cwd(), TEMPLATES_DIR, getTemplateFilename(e.id, e.style, yamlConfig.project?.emailStyle))))
|
|
@@ -26,7 +26,6 @@ async function regenerateMissingTemplates(ctx, yamlConfig, missingIds, flags) {
|
|
|
26
26
|
}
|
|
27
27
|
await Promise.all(saves);
|
|
28
28
|
await ctx.syncYaml();
|
|
29
|
-
ctx.log(`\n ${chalk.green('✓')} ${MISSING_TEMPLATES.REVIEW_HINT}\n`);
|
|
30
29
|
}
|
|
31
30
|
export async function handleMissingTemplates(ctx, yamlConfig, missingIds, flags) {
|
|
32
31
|
if (flags.json) {
|
|
@@ -36,7 +35,6 @@ export async function handleMissingTemplates(ctx, yamlConfig, missingIds, flags)
|
|
|
36
35
|
missingTemplates: missingIds.map((id) => `${id}.html`),
|
|
37
36
|
}, null, 2));
|
|
38
37
|
ctx.exit(1);
|
|
39
|
-
return;
|
|
40
38
|
}
|
|
41
39
|
if (flags.yes)
|
|
42
40
|
ctx.error(MISSING_TEMPLATES.YES_ERROR);
|
|
@@ -56,7 +54,8 @@ export async function handleMissingTemplates(ctx, yamlConfig, missingIds, flags)
|
|
|
56
54
|
});
|
|
57
55
|
if (action === 'abort') {
|
|
58
56
|
ctx.log(`\n ${MISSING_TEMPLATES.ABORT_HINT}\n`);
|
|
59
|
-
return;
|
|
57
|
+
return false;
|
|
60
58
|
}
|
|
61
59
|
await regenerateMissingTemplates(ctx, yamlConfig, missingIds, flags);
|
|
60
|
+
return true;
|
|
62
61
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ApiResponse } from '../api-client.js';
|
|
2
|
+
export type RegenCtx = {
|
|
3
|
+
error(msg: string): never;
|
|
4
|
+
exit(code?: number): never;
|
|
5
|
+
log(msg?: string): void;
|
|
6
|
+
onApiError(resp: {
|
|
7
|
+
error?: string;
|
|
8
|
+
status: number;
|
|
9
|
+
}): never;
|
|
10
|
+
post<T = Record<string, unknown>>(path: string, body?: Record<string, unknown> | unknown): Promise<ApiResponse<T>>;
|
|
11
|
+
spinner<T>(text: string, json: boolean, work: () => Promise<T>): Promise<T>;
|
|
12
|
+
syncYaml(): Promise<void>;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/oclif.manifest.json
CHANGED
|
@@ -76,15 +76,15 @@
|
|
|
76
76
|
"index.js"
|
|
77
77
|
]
|
|
78
78
|
},
|
|
79
|
-
"
|
|
79
|
+
"deploy": {
|
|
80
80
|
"aliases": [],
|
|
81
81
|
"args": {},
|
|
82
|
-
"description": "
|
|
82
|
+
"description": "Deploy, pause, or resume an email sequence",
|
|
83
83
|
"examples": [
|
|
84
|
-
"<%= config.bin %>
|
|
85
|
-
"<%= config.bin %>
|
|
86
|
-
"<%= config.bin %>
|
|
87
|
-
"<%= config.bin %>
|
|
84
|
+
"<%= config.bin %> deploy",
|
|
85
|
+
"<%= config.bin %> deploy --yes",
|
|
86
|
+
"<%= config.bin %> deploy --pause seq_abc123",
|
|
87
|
+
"<%= config.bin %> deploy --resume seq_abc123 --json"
|
|
88
88
|
],
|
|
89
89
|
"flags": {
|
|
90
90
|
"json": {
|
|
@@ -100,22 +100,22 @@
|
|
|
100
100
|
"allowNo": false,
|
|
101
101
|
"type": "boolean"
|
|
102
102
|
},
|
|
103
|
-
"
|
|
104
|
-
"description": "
|
|
105
|
-
"
|
|
103
|
+
"pause": {
|
|
104
|
+
"description": "Pause a deployed sequence by ID (stops scheduled + triggered sends)",
|
|
105
|
+
"exclusive": [
|
|
106
|
+
"resume"
|
|
107
|
+
],
|
|
108
|
+
"name": "pause",
|
|
106
109
|
"hasDynamicHelp": false,
|
|
107
110
|
"multiple": false,
|
|
108
111
|
"type": "option"
|
|
109
112
|
},
|
|
110
|
-
"
|
|
111
|
-
"description": "
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
"search": {
|
|
117
|
-
"description": "Search for a contact by email",
|
|
118
|
-
"name": "search",
|
|
113
|
+
"resume": {
|
|
114
|
+
"description": "Resume a paused sequence by ID",
|
|
115
|
+
"exclusive": [
|
|
116
|
+
"pause"
|
|
117
|
+
],
|
|
118
|
+
"name": "resume",
|
|
119
119
|
"hasDynamicHelp": false,
|
|
120
120
|
"multiple": false,
|
|
121
121
|
"type": "option"
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
},
|
|
124
124
|
"hasDynamicHelp": false,
|
|
125
125
|
"hiddenAliases": [],
|
|
126
|
-
"id": "
|
|
126
|
+
"id": "deploy",
|
|
127
127
|
"pluginAlias": "@mailmodo/cli",
|
|
128
128
|
"pluginName": "@mailmodo/cli",
|
|
129
129
|
"pluginType": "core",
|
|
@@ -133,19 +133,17 @@
|
|
|
133
133
|
"relativePath": [
|
|
134
134
|
"dist",
|
|
135
135
|
"commands",
|
|
136
|
-
"
|
|
136
|
+
"deploy",
|
|
137
137
|
"index.js"
|
|
138
138
|
]
|
|
139
139
|
},
|
|
140
|
-
"
|
|
140
|
+
"deployments": {
|
|
141
141
|
"aliases": [],
|
|
142
142
|
"args": {},
|
|
143
|
-
"description": "
|
|
143
|
+
"description": "List every deployed sequence on this account, with the IDs needed for deploy --pause / --resume",
|
|
144
144
|
"examples": [
|
|
145
|
-
"<%= config.bin %>
|
|
146
|
-
"<%= config.bin %>
|
|
147
|
-
"<%= config.bin %> deploy --pause seq_abc123",
|
|
148
|
-
"<%= config.bin %> deploy --resume seq_abc123 --json"
|
|
145
|
+
"<%= config.bin %> deployments",
|
|
146
|
+
"<%= config.bin %> deployments --json"
|
|
149
147
|
],
|
|
150
148
|
"flags": {
|
|
151
149
|
"json": {
|
|
@@ -160,31 +158,11 @@
|
|
|
160
158
|
"name": "yes",
|
|
161
159
|
"allowNo": false,
|
|
162
160
|
"type": "boolean"
|
|
163
|
-
},
|
|
164
|
-
"pause": {
|
|
165
|
-
"description": "Pause a deployed sequence by ID (stops scheduled + triggered sends)",
|
|
166
|
-
"exclusive": [
|
|
167
|
-
"resume"
|
|
168
|
-
],
|
|
169
|
-
"name": "pause",
|
|
170
|
-
"hasDynamicHelp": false,
|
|
171
|
-
"multiple": false,
|
|
172
|
-
"type": "option"
|
|
173
|
-
},
|
|
174
|
-
"resume": {
|
|
175
|
-
"description": "Resume a paused sequence by ID",
|
|
176
|
-
"exclusive": [
|
|
177
|
-
"pause"
|
|
178
|
-
],
|
|
179
|
-
"name": "resume",
|
|
180
|
-
"hasDynamicHelp": false,
|
|
181
|
-
"multiple": false,
|
|
182
|
-
"type": "option"
|
|
183
161
|
}
|
|
184
162
|
},
|
|
185
163
|
"hasDynamicHelp": false,
|
|
186
164
|
"hiddenAliases": [],
|
|
187
|
-
"id": "
|
|
165
|
+
"id": "deployments",
|
|
188
166
|
"pluginAlias": "@mailmodo/cli",
|
|
189
167
|
"pluginName": "@mailmodo/cli",
|
|
190
168
|
"pluginType": "core",
|
|
@@ -194,17 +172,19 @@
|
|
|
194
172
|
"relativePath": [
|
|
195
173
|
"dist",
|
|
196
174
|
"commands",
|
|
197
|
-
"
|
|
175
|
+
"deployments",
|
|
198
176
|
"index.js"
|
|
199
177
|
]
|
|
200
178
|
},
|
|
201
|
-
"
|
|
179
|
+
"contacts": {
|
|
202
180
|
"aliases": [],
|
|
203
181
|
"args": {},
|
|
204
|
-
"description": "
|
|
182
|
+
"description": "Manage contacts — search, export, or delete",
|
|
205
183
|
"examples": [
|
|
206
|
-
"<%= config.bin %>
|
|
207
|
-
"<%= config.bin %>
|
|
184
|
+
"<%= config.bin %> contacts",
|
|
185
|
+
"<%= config.bin %> contacts --search sarah@example.com",
|
|
186
|
+
"<%= config.bin %> contacts --export # GDPR CSV → contacts.csv",
|
|
187
|
+
"<%= config.bin %> contacts --delete sarah@example.com"
|
|
208
188
|
],
|
|
209
189
|
"flags": {
|
|
210
190
|
"json": {
|
|
@@ -219,11 +199,31 @@
|
|
|
219
199
|
"name": "yes",
|
|
220
200
|
"allowNo": false,
|
|
221
201
|
"type": "boolean"
|
|
202
|
+
},
|
|
203
|
+
"delete": {
|
|
204
|
+
"description": "GDPR hard delete a contact by email",
|
|
205
|
+
"name": "delete",
|
|
206
|
+
"hasDynamicHelp": false,
|
|
207
|
+
"multiple": false,
|
|
208
|
+
"type": "option"
|
|
209
|
+
},
|
|
210
|
+
"export": {
|
|
211
|
+
"description": "Export all contacts as GDPR-compliant CSV (writes contacts.csv in the current directory)",
|
|
212
|
+
"name": "export",
|
|
213
|
+
"allowNo": false,
|
|
214
|
+
"type": "boolean"
|
|
215
|
+
},
|
|
216
|
+
"search": {
|
|
217
|
+
"description": "Search for a contact by email",
|
|
218
|
+
"name": "search",
|
|
219
|
+
"hasDynamicHelp": false,
|
|
220
|
+
"multiple": false,
|
|
221
|
+
"type": "option"
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
224
|
"hasDynamicHelp": false,
|
|
225
225
|
"hiddenAliases": [],
|
|
226
|
-
"id": "
|
|
226
|
+
"id": "contacts",
|
|
227
227
|
"pluginAlias": "@mailmodo/cli",
|
|
228
228
|
"pluginName": "@mailmodo/cli",
|
|
229
229
|
"pluginType": "core",
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
"relativePath": [
|
|
234
234
|
"dist",
|
|
235
235
|
"commands",
|
|
236
|
-
"
|
|
236
|
+
"contacts",
|
|
237
237
|
"index.js"
|
|
238
238
|
]
|
|
239
239
|
},
|
|
@@ -380,6 +380,52 @@
|
|
|
380
380
|
"index.js"
|
|
381
381
|
]
|
|
382
382
|
},
|
|
383
|
+
"init": {
|
|
384
|
+
"aliases": [],
|
|
385
|
+
"args": {},
|
|
386
|
+
"description": "Analyze your product and generate email sequences",
|
|
387
|
+
"examples": [
|
|
388
|
+
"<%= config.bin %> init",
|
|
389
|
+
"<%= config.bin %> init --url https://myapp.com --yes"
|
|
390
|
+
],
|
|
391
|
+
"flags": {
|
|
392
|
+
"json": {
|
|
393
|
+
"description": "Output as JSON",
|
|
394
|
+
"name": "json",
|
|
395
|
+
"allowNo": false,
|
|
396
|
+
"type": "boolean"
|
|
397
|
+
},
|
|
398
|
+
"yes": {
|
|
399
|
+
"char": "y",
|
|
400
|
+
"description": "Skip confirmation prompts",
|
|
401
|
+
"name": "yes",
|
|
402
|
+
"allowNo": false,
|
|
403
|
+
"type": "boolean"
|
|
404
|
+
},
|
|
405
|
+
"url": {
|
|
406
|
+
"description": "Product URL to analyze",
|
|
407
|
+
"name": "url",
|
|
408
|
+
"hasDynamicHelp": false,
|
|
409
|
+
"multiple": false,
|
|
410
|
+
"type": "option"
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
"hasDynamicHelp": false,
|
|
414
|
+
"hiddenAliases": [],
|
|
415
|
+
"id": "init",
|
|
416
|
+
"pluginAlias": "@mailmodo/cli",
|
|
417
|
+
"pluginName": "@mailmodo/cli",
|
|
418
|
+
"pluginType": "core",
|
|
419
|
+
"strict": true,
|
|
420
|
+
"enableJsonFlag": false,
|
|
421
|
+
"isESM": true,
|
|
422
|
+
"relativePath": [
|
|
423
|
+
"dist",
|
|
424
|
+
"commands",
|
|
425
|
+
"init",
|
|
426
|
+
"index.js"
|
|
427
|
+
]
|
|
428
|
+
},
|
|
383
429
|
"login": {
|
|
384
430
|
"aliases": [],
|
|
385
431
|
"args": {},
|
|
@@ -527,13 +573,19 @@
|
|
|
527
573
|
"index.js"
|
|
528
574
|
]
|
|
529
575
|
},
|
|
530
|
-
"
|
|
576
|
+
"preview": {
|
|
531
577
|
"aliases": [],
|
|
532
|
-
"args": {
|
|
533
|
-
|
|
578
|
+
"args": {
|
|
579
|
+
"id": {
|
|
580
|
+
"description": "Email template ID to preview",
|
|
581
|
+
"name": "id"
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
"description": "Preview an email in browser, as text, or send a test",
|
|
534
585
|
"examples": [
|
|
535
|
-
"<%= config.bin %>
|
|
536
|
-
"<%= config.bin %>
|
|
586
|
+
"<%= config.bin %> preview welcome",
|
|
587
|
+
"<%= config.bin %> preview welcome --text",
|
|
588
|
+
"<%= config.bin %> preview welcome --send me@example.com"
|
|
537
589
|
],
|
|
538
590
|
"flags": {
|
|
539
591
|
"json": {
|
|
@@ -549,17 +601,23 @@
|
|
|
549
601
|
"allowNo": false,
|
|
550
602
|
"type": "boolean"
|
|
551
603
|
},
|
|
552
|
-
"
|
|
553
|
-
"description": "
|
|
554
|
-
"name": "
|
|
604
|
+
"send": {
|
|
605
|
+
"description": "Send test email to this address",
|
|
606
|
+
"name": "send",
|
|
555
607
|
"hasDynamicHelp": false,
|
|
556
608
|
"multiple": false,
|
|
557
609
|
"type": "option"
|
|
610
|
+
},
|
|
611
|
+
"text": {
|
|
612
|
+
"description": "Output plain text version (for AI agents)",
|
|
613
|
+
"name": "text",
|
|
614
|
+
"allowNo": false,
|
|
615
|
+
"type": "boolean"
|
|
558
616
|
}
|
|
559
617
|
},
|
|
560
618
|
"hasDynamicHelp": false,
|
|
561
619
|
"hiddenAliases": [],
|
|
562
|
-
"id": "
|
|
620
|
+
"id": "preview",
|
|
563
621
|
"pluginAlias": "@mailmodo/cli",
|
|
564
622
|
"pluginName": "@mailmodo/cli",
|
|
565
623
|
"pluginType": "core",
|
|
@@ -569,7 +627,7 @@
|
|
|
569
627
|
"relativePath": [
|
|
570
628
|
"dist",
|
|
571
629
|
"commands",
|
|
572
|
-
"
|
|
630
|
+
"preview",
|
|
573
631
|
"index.js"
|
|
574
632
|
]
|
|
575
633
|
},
|
|
@@ -620,64 +678,6 @@
|
|
|
620
678
|
"index.js"
|
|
621
679
|
]
|
|
622
680
|
},
|
|
623
|
-
"preview": {
|
|
624
|
-
"aliases": [],
|
|
625
|
-
"args": {
|
|
626
|
-
"id": {
|
|
627
|
-
"description": "Email template ID to preview",
|
|
628
|
-
"name": "id"
|
|
629
|
-
}
|
|
630
|
-
},
|
|
631
|
-
"description": "Preview an email in browser, as text, or send a test",
|
|
632
|
-
"examples": [
|
|
633
|
-
"<%= config.bin %> preview welcome",
|
|
634
|
-
"<%= config.bin %> preview welcome --text",
|
|
635
|
-
"<%= config.bin %> preview welcome --send me@example.com"
|
|
636
|
-
],
|
|
637
|
-
"flags": {
|
|
638
|
-
"json": {
|
|
639
|
-
"description": "Output as JSON",
|
|
640
|
-
"name": "json",
|
|
641
|
-
"allowNo": false,
|
|
642
|
-
"type": "boolean"
|
|
643
|
-
},
|
|
644
|
-
"yes": {
|
|
645
|
-
"char": "y",
|
|
646
|
-
"description": "Skip confirmation prompts",
|
|
647
|
-
"name": "yes",
|
|
648
|
-
"allowNo": false,
|
|
649
|
-
"type": "boolean"
|
|
650
|
-
},
|
|
651
|
-
"send": {
|
|
652
|
-
"description": "Send test email to this address",
|
|
653
|
-
"name": "send",
|
|
654
|
-
"hasDynamicHelp": false,
|
|
655
|
-
"multiple": false,
|
|
656
|
-
"type": "option"
|
|
657
|
-
},
|
|
658
|
-
"text": {
|
|
659
|
-
"description": "Output plain text version (for AI agents)",
|
|
660
|
-
"name": "text",
|
|
661
|
-
"allowNo": false,
|
|
662
|
-
"type": "boolean"
|
|
663
|
-
}
|
|
664
|
-
},
|
|
665
|
-
"hasDynamicHelp": false,
|
|
666
|
-
"hiddenAliases": [],
|
|
667
|
-
"id": "preview",
|
|
668
|
-
"pluginAlias": "@mailmodo/cli",
|
|
669
|
-
"pluginName": "@mailmodo/cli",
|
|
670
|
-
"pluginType": "core",
|
|
671
|
-
"strict": true,
|
|
672
|
-
"enableJsonFlag": false,
|
|
673
|
-
"isESM": true,
|
|
674
|
-
"relativePath": [
|
|
675
|
-
"dist",
|
|
676
|
-
"commands",
|
|
677
|
-
"preview",
|
|
678
|
-
"index.js"
|
|
679
|
-
]
|
|
680
|
-
},
|
|
681
681
|
"settings": {
|
|
682
682
|
"aliases": [],
|
|
683
683
|
"args": {},
|
|
@@ -765,5 +765,5 @@
|
|
|
765
765
|
]
|
|
766
766
|
}
|
|
767
767
|
},
|
|
768
|
-
"version": "0.0.54-beta.pr56.
|
|
768
|
+
"version": "0.0.54-beta.pr56.90"
|
|
769
769
|
}
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type MailmodoYaml } from '../yaml-config.js';
|
|
2
|
-
import type { DeployCtx, DeployFlags } from './types.js';
|
|
3
|
-
export declare function getMissingTemplateIds(yamlConfig: MailmodoYaml): string[];
|
|
4
|
-
export declare function handleMissingTemplates(ctx: DeployCtx, yamlConfig: MailmodoYaml, missingIds: string[], flags: DeployFlags): Promise<void>;
|