@mailmodo/cli 0.0.54-beta.pr56.86 → 0.0.54-beta.pr56.88
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/billing/index.js +8 -6
- package/dist/commands/login/index.js +1 -1
- package/dist/lib/base-command.d.ts +1 -0
- package/dist/lib/base-command.js +24 -17
- package/dist/lib/deploy/domain-setup.js +3 -1
- package/dist/lib/deploy/missing-templates.js +11 -6
- package/dist/lib/deploy/output.js +8 -8
- package/dist/lib/messages.d.ts +13 -0
- package/dist/lib/messages.js +13 -0
- package/oclif.manifest.json +69 -69
- package/package.json +1 -1
|
@@ -68,12 +68,14 @@ export default class Billing extends BaseCommand {
|
|
|
68
68
|
}
|
|
69
69
|
this.log(`\n ${chalk.bold('Stripe Checkout')} — add or update your payment method.`);
|
|
70
70
|
this.log(` ${chalk.dim(checkoutUrl)}\n`);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
if (!process.env.CI) {
|
|
72
|
+
try {
|
|
73
|
+
await open(checkoutUrl);
|
|
74
|
+
this.log(` ${INFO.BROWSER_OPENING}\n`);
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
this.log(` ${INFO.BROWSER_OPEN_FAILED}\n`);
|
|
78
|
+
}
|
|
77
79
|
}
|
|
78
80
|
}
|
|
79
81
|
async showStatus(jsonOutput, statusOnly) {
|
|
@@ -49,7 +49,7 @@ export default class Login extends BaseCommand {
|
|
|
49
49
|
else {
|
|
50
50
|
this.log(` ${chalk.dim('1.')} Run ${chalk.cyan('mailmodo init')} to generate an email sequence.`);
|
|
51
51
|
}
|
|
52
|
-
this.log(` ${chalk.dim('2.')} Run ${chalk.cyan('mailmodo logout')} to log in with another account.\n`);
|
|
52
|
+
this.log(` ${chalk.dim(yamlRestored ? '1.' : '2.')} Run ${chalk.cyan('mailmodo logout')} to log in with another account.\n`);
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -68,6 +68,7 @@ export declare abstract class BaseCommand extends Command {
|
|
|
68
68
|
* settings and all email sequence definitions.
|
|
69
69
|
*/
|
|
70
70
|
protected ensureYaml(): Promise<MailmodoYaml>;
|
|
71
|
+
private fetchAndWriteYaml;
|
|
71
72
|
/**
|
|
72
73
|
* Attempts to fetch mailmodo.yaml from the server and save it locally.
|
|
73
74
|
* Returns null silently on any failure so callers can fall through to an error.
|
package/dist/lib/base-command.js
CHANGED
|
@@ -95,20 +95,36 @@ export class BaseCommand extends Command {
|
|
|
95
95
|
return restored;
|
|
96
96
|
this.error(ERRORS.NO_YAML);
|
|
97
97
|
}
|
|
98
|
+
async fetchAndWriteYaml(client) {
|
|
99
|
+
try {
|
|
100
|
+
const response = await client.getRawText(API_ENDPOINTS.ASSETS_YAML);
|
|
101
|
+
if (!response.ok || !response.data)
|
|
102
|
+
return false;
|
|
103
|
+
await writeFile(join(process.cwd(), YAML_FILE), response.data);
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
catch {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
98
110
|
/**
|
|
99
111
|
* Attempts to fetch mailmodo.yaml from the server and save it locally.
|
|
100
112
|
* Returns null silently on any failure so callers can fall through to an error.
|
|
101
113
|
*/
|
|
102
114
|
async restoreYamlFromServer() {
|
|
103
|
-
if (!this.apiClient)
|
|
104
|
-
return null;
|
|
105
115
|
try {
|
|
106
|
-
|
|
107
|
-
if (!
|
|
116
|
+
let client = this.apiClient;
|
|
117
|
+
if (!client) {
|
|
118
|
+
const envKey = process.env.MAILMODO_API_KEY;
|
|
119
|
+
const apiKey = envKey ?? (await loadConfig())?.apiKey;
|
|
120
|
+
if (!apiKey)
|
|
121
|
+
return null;
|
|
122
|
+
client = new ApiClient(apiKey);
|
|
123
|
+
}
|
|
124
|
+
const written = await this.fetchAndWriteYaml(client);
|
|
125
|
+
if (!written)
|
|
108
126
|
return null;
|
|
109
|
-
|
|
110
|
-
await writeFile(filePath, response.data);
|
|
111
|
-
this.log(INFO.YAML_RESTORED_FROM_SERVER);
|
|
127
|
+
this.logToStderr(INFO.YAML_RESTORED_FROM_SERVER);
|
|
112
128
|
return loadYaml();
|
|
113
129
|
}
|
|
114
130
|
catch {
|
|
@@ -127,16 +143,7 @@ export class BaseCommand extends Command {
|
|
|
127
143
|
async recoverYamlAfterLogin(client) {
|
|
128
144
|
if (existsSync(join(process.cwd(), YAML_FILE)))
|
|
129
145
|
return false;
|
|
130
|
-
|
|
131
|
-
const response = await client.getRawText(API_ENDPOINTS.ASSETS_YAML);
|
|
132
|
-
if (!response.ok || !response.data)
|
|
133
|
-
return false;
|
|
134
|
-
await writeFile(join(process.cwd(), YAML_FILE), response.data);
|
|
135
|
-
return true;
|
|
136
|
-
}
|
|
137
|
-
catch {
|
|
138
|
-
return false;
|
|
139
|
-
}
|
|
146
|
+
return this.fetchAndWriteYaml(client);
|
|
140
147
|
}
|
|
141
148
|
/**
|
|
142
149
|
* Uploads the current local mailmodo.yaml to the server as a backup.
|
|
@@ -54,7 +54,9 @@ export async function ensureDomainReady(ctx, yamlConfig, flags) {
|
|
|
54
54
|
const check = await ctx.spinner(' Checking domain verification...', flags.json, () => ctx.get(API_ENDPOINTS.DOMAIN_VERIFY, {
|
|
55
55
|
domain: yamlConfig.project?.domain || '',
|
|
56
56
|
}));
|
|
57
|
-
if (check.ok
|
|
57
|
+
if (!check.ok)
|
|
58
|
+
ctx.onApiError(check);
|
|
59
|
+
if (check.data?.domainStatus === 'VERIFIED')
|
|
58
60
|
return true;
|
|
59
61
|
if (yamlConfig.project?.domain) {
|
|
60
62
|
if (!flags.json)
|
|
@@ -4,19 +4,21 @@ import { select } from '@inquirer/prompts';
|
|
|
4
4
|
import chalk from 'chalk';
|
|
5
5
|
import { API_ENDPOINTS, TEMPLATES_DIR } from '../constants.js';
|
|
6
6
|
import { MISSING_TEMPLATES } from '../messages.js';
|
|
7
|
-
import { saveTemplate } from '../yaml-config.js';
|
|
7
|
+
import { getTemplateFilename, saveTemplate, } from '../yaml-config.js';
|
|
8
8
|
import { buildRegeneratePayload } from './payload.js';
|
|
9
9
|
export function getMissingTemplateIds(yamlConfig) {
|
|
10
10
|
return yamlConfig.emails
|
|
11
|
-
.filter((e) => !existsSync(join(process.cwd(), TEMPLATES_DIR,
|
|
11
|
+
.filter((e) => !existsSync(join(process.cwd(), TEMPLATES_DIR, getTemplateFilename(e.id, e.style, yamlConfig.project?.emailStyle))))
|
|
12
12
|
.map((e) => e.id);
|
|
13
13
|
}
|
|
14
14
|
async function regenerateMissingTemplates(ctx, yamlConfig, missingIds, flags) {
|
|
15
|
-
const response = await ctx.spinner(
|
|
15
|
+
const response = await ctx.spinner(` ${MISSING_TEMPLATES.REGENERATE_SPINNER}`, flags.json, () => ctx.post(API_ENDPOINTS.GENERATE, buildRegeneratePayload(yamlConfig, missingIds)));
|
|
16
16
|
if (!response.ok)
|
|
17
17
|
ctx.onApiError(response);
|
|
18
18
|
const saves = [];
|
|
19
19
|
for (const email of response.data?.emails ?? []) {
|
|
20
|
+
if (!/^[\w-]+$/.test(email.id))
|
|
21
|
+
continue;
|
|
20
22
|
if (email.html)
|
|
21
23
|
saves.push(saveTemplate(`${email.id}.html`, email.html));
|
|
22
24
|
if (email.plainHtml)
|
|
@@ -44,10 +46,13 @@ export async function handleMissingTemplates(ctx, yamlConfig, missingIds, flags)
|
|
|
44
46
|
ctx.log(`\n ${MISSING_TEMPLATES.REGENERATE_NOTE}\n`);
|
|
45
47
|
const action = await select({
|
|
46
48
|
choices: [
|
|
47
|
-
{
|
|
48
|
-
|
|
49
|
+
{
|
|
50
|
+
name: MISSING_TEMPLATES.CHOICE_REGENERATE,
|
|
51
|
+
value: 'regenerate',
|
|
52
|
+
},
|
|
53
|
+
{ name: MISSING_TEMPLATES.CHOICE_ABORT, value: 'abort' },
|
|
49
54
|
],
|
|
50
|
-
message:
|
|
55
|
+
message: MISSING_TEMPLATES.PROMPT_ACTION,
|
|
51
56
|
});
|
|
52
57
|
if (action === 'abort') {
|
|
53
58
|
ctx.log(`\n ${MISSING_TEMPLATES.ABORT_HINT}\n`);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { SDK_IMPORT_SNIPPET, SDK_INSTALL_COMMAND } from '../constants.js';
|
|
3
|
-
import { SEPARATOR } from '../messages.js';
|
|
3
|
+
import { DEPLOY, SEPARATOR } from '../messages.js';
|
|
4
4
|
export function logDiff(ctx, diff) {
|
|
5
5
|
if (!diff.hasChanges) {
|
|
6
|
-
ctx.log(`
|
|
6
|
+
ctx.log(` ${DEPLOY.NO_CHANGES}`);
|
|
7
7
|
return;
|
|
8
8
|
}
|
|
9
|
-
ctx.log(`
|
|
9
|
+
ctx.log(` ${DEPLOY.CHANGES_HEADER}`);
|
|
10
10
|
for (const email of diff.added) {
|
|
11
11
|
ctx.log(` ${chalk.green('+')} ${email.id.padEnd(24)} ${email.trigger || ''}`);
|
|
12
12
|
}
|
|
@@ -24,7 +24,7 @@ export function logPreDeploySummary(ctx, yamlConfig, validateResult, jsonOutput)
|
|
|
24
24
|
return;
|
|
25
25
|
ctx.log(`\n ${chalk.green('✓')} Domain: ${yamlConfig.project?.domain || 'verified'}\n`);
|
|
26
26
|
if (!validateResult.existingDeployment || !validateResult.diff) {
|
|
27
|
-
ctx.log(`
|
|
27
|
+
ctx.log(` ${DEPLOY.DEPLOYING_HEADER}`);
|
|
28
28
|
for (const email of yamlConfig.emails) {
|
|
29
29
|
ctx.log(` ${chalk.green('+')} ${email.id.padEnd(24)} ${email.trigger}`);
|
|
30
30
|
}
|
|
@@ -35,14 +35,14 @@ export function logPreDeploySummary(ctx, yamlConfig, validateResult, jsonOutput)
|
|
|
35
35
|
ctx.log('');
|
|
36
36
|
}
|
|
37
37
|
export function logDeploySuccessInstructions(ctx, sdkSnippet) {
|
|
38
|
-
ctx.log(` ${
|
|
38
|
+
ctx.log(` ${DEPLOY.SUCCESS}\n`);
|
|
39
39
|
ctx.log(` ${SEPARATOR}`);
|
|
40
|
-
ctx.log(` ${
|
|
40
|
+
ctx.log(` ${DEPLOY.SDK_ONBOARDING_HEADER}`);
|
|
41
41
|
ctx.log(` ${SEPARATOR}\n`);
|
|
42
42
|
ctx.log(` ${chalk.cyan(sdkSnippet.install ?? SDK_INSTALL_COMMAND)}\n`);
|
|
43
43
|
ctx.log(` ${chalk.dim(SDK_IMPORT_SNIPPET)}\n`);
|
|
44
44
|
if (sdkSnippet.examples) {
|
|
45
|
-
ctx.log(` ${
|
|
45
|
+
ctx.log(` ${DEPLOY.SDK_EXAMPLE_COMMENT}`);
|
|
46
46
|
ctx.log(` ${chalk.dim(sdkSnippet.examples.track)}`);
|
|
47
47
|
ctx.log(` ${chalk.dim(sdkSnippet.examples.identify)}\n`);
|
|
48
48
|
}
|
|
@@ -56,6 +56,6 @@ export function logDeploySuccessInstructions(ctx, sdkSnippet) {
|
|
|
56
56
|
ctx.log(` ${chalk.dim(call)}`);
|
|
57
57
|
if (identifyCalls.length > 0)
|
|
58
58
|
ctx.log('');
|
|
59
|
-
ctx.log(`
|
|
59
|
+
ctx.log(` ${DEPLOY.SDK_DOCS_HINT}\n`);
|
|
60
60
|
ctx.log(` ${SEPARATOR}\n`);
|
|
61
61
|
}
|
package/dist/lib/messages.d.ts
CHANGED
|
@@ -15,8 +15,12 @@ export declare const PROMPTS: {
|
|
|
15
15
|
};
|
|
16
16
|
export declare const MISSING_TEMPLATES: {
|
|
17
17
|
readonly ABORT_HINT: `Restore the missing files from version control, then run ${string} again.`;
|
|
18
|
+
readonly CHOICE_ABORT: "Abort (restore from version control)";
|
|
19
|
+
readonly CHOICE_REGENERATE: "Re-generate via AI";
|
|
18
20
|
readonly HEADER: `Some email templates are missing from ${string}:`;
|
|
21
|
+
readonly PROMPT_ACTION: "What would you like to do?";
|
|
19
22
|
readonly REGENERATE_NOTE: string;
|
|
23
|
+
readonly REGENERATE_SPINNER: "Regenerating email templates...";
|
|
20
24
|
readonly REVIEW_HINT: `Templates regenerated. Review them with ${string}, then run ${string} again.`;
|
|
21
25
|
readonly YES_ERROR: `Missing templates cannot be resolved with ${string}. Run ${string} without ${string} to regenerate via AI or restore from version control.`;
|
|
22
26
|
};
|
|
@@ -50,6 +54,15 @@ export declare const INFO: {
|
|
|
50
54
|
readonly YAML_RESTORED_FROM_SERVER: string;
|
|
51
55
|
readonly YAML_RESTORED_ON_LOGIN: ` mailmodo.yaml restored from server. Run ${string} to re-deploy your sequences.`;
|
|
52
56
|
};
|
|
57
|
+
export declare const DEPLOY: {
|
|
58
|
+
readonly CHANGES_HEADER: "Changes vs. last deployment:";
|
|
59
|
+
readonly DEPLOYING_HEADER: "Deploying:";
|
|
60
|
+
readonly NO_CHANGES: "No changes from last deployment.";
|
|
61
|
+
readonly SDK_DOCS_HINT: `Full SDK docs: ${string}`;
|
|
62
|
+
readonly SDK_EXAMPLE_COMMENT: string;
|
|
63
|
+
readonly SDK_ONBOARDING_HEADER: string;
|
|
64
|
+
readonly SUCCESS: `${string} Emails are live.`;
|
|
65
|
+
};
|
|
53
66
|
export declare function pauseSuccess(sequenceId: string): string;
|
|
54
67
|
export declare function pauseAlready(sequenceId: string): string;
|
|
55
68
|
export declare function resumeSuccess(sequenceId: string): string;
|
package/dist/lib/messages.js
CHANGED
|
@@ -16,8 +16,12 @@ export const PROMPTS = {
|
|
|
16
16
|
};
|
|
17
17
|
export const MISSING_TEMPLATES = {
|
|
18
18
|
ABORT_HINT: `Restore the missing files from version control, then run ${chalk.cyan('mailmodo deploy')} again.`,
|
|
19
|
+
CHOICE_ABORT: 'Abort (restore from version control)',
|
|
20
|
+
CHOICE_REGENERATE: 'Re-generate via AI',
|
|
19
21
|
HEADER: `Some email templates are missing from ${chalk.cyan('./mailmodo/')}:`,
|
|
22
|
+
PROMPT_ACTION: 'What would you like to do?',
|
|
20
23
|
REGENERATE_NOTE: chalk.yellow(' Note: any previous manual edits to these files will be replaced with a new AI draft.'),
|
|
24
|
+
REGENERATE_SPINNER: 'Regenerating email templates...',
|
|
21
25
|
REVIEW_HINT: `Templates regenerated. Review them with ${chalk.cyan('mailmodo preview')}, then run ${chalk.cyan('mailmodo deploy')} again.`,
|
|
22
26
|
YES_ERROR: `Missing templates cannot be resolved with ${chalk.cyan('--yes')}. Run ${chalk.cyan('mailmodo deploy')} without ${chalk.cyan('--yes')} to regenerate via AI or restore from version control.`,
|
|
23
27
|
};
|
|
@@ -50,6 +54,15 @@ export const INFO = {
|
|
|
50
54
|
YAML_RESTORED_FROM_SERVER: chalk.dim(' mailmodo.yaml not found locally — restored from server.'),
|
|
51
55
|
YAML_RESTORED_ON_LOGIN: ` mailmodo.yaml restored from server. Run ${chalk.cyan("'mailmodo deploy'")} to re-deploy your sequences.`,
|
|
52
56
|
};
|
|
57
|
+
export const DEPLOY = {
|
|
58
|
+
CHANGES_HEADER: 'Changes vs. last deployment:',
|
|
59
|
+
DEPLOYING_HEADER: 'Deploying:',
|
|
60
|
+
NO_CHANGES: 'No changes from last deployment.',
|
|
61
|
+
SDK_DOCS_HINT: `Full SDK docs: ${chalk.cyan('mailmodo.com/docs/sdk')}`,
|
|
62
|
+
SDK_EXAMPLE_COMMENT: chalk.dim('// Example usage:'),
|
|
63
|
+
SDK_ONBOARDING_HEADER: chalk.bold('ADD THIS TO YOUR APP (one-time only):'),
|
|
64
|
+
SUCCESS: `${chalk.green('Deployed.')} Emails are live.`,
|
|
65
|
+
};
|
|
53
66
|
export function pauseSuccess(sequenceId) {
|
|
54
67
|
return `Sequence ${chalk.cyan(sequenceId)} paused. Run ${chalk.cyan(`mailmodo deploy --resume ${sequenceId}`)} to resume.`;
|
|
55
68
|
}
|
package/oclif.manifest.json
CHANGED
|
@@ -380,52 +380,6 @@
|
|
|
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
|
-
},
|
|
429
383
|
"login": {
|
|
430
384
|
"aliases": [],
|
|
431
385
|
"args": {},
|
|
@@ -573,19 +527,13 @@
|
|
|
573
527
|
"index.js"
|
|
574
528
|
]
|
|
575
529
|
},
|
|
576
|
-
"
|
|
530
|
+
"init": {
|
|
577
531
|
"aliases": [],
|
|
578
|
-
"args": {
|
|
579
|
-
|
|
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",
|
|
532
|
+
"args": {},
|
|
533
|
+
"description": "Analyze your product and generate email sequences",
|
|
585
534
|
"examples": [
|
|
586
|
-
"<%= config.bin %>
|
|
587
|
-
"<%= config.bin %>
|
|
588
|
-
"<%= config.bin %> preview welcome --send me@example.com"
|
|
535
|
+
"<%= config.bin %> init",
|
|
536
|
+
"<%= config.bin %> init --url https://myapp.com --yes"
|
|
589
537
|
],
|
|
590
538
|
"flags": {
|
|
591
539
|
"json": {
|
|
@@ -601,23 +549,17 @@
|
|
|
601
549
|
"allowNo": false,
|
|
602
550
|
"type": "boolean"
|
|
603
551
|
},
|
|
604
|
-
"
|
|
605
|
-
"description": "
|
|
606
|
-
"name": "
|
|
552
|
+
"url": {
|
|
553
|
+
"description": "Product URL to analyze",
|
|
554
|
+
"name": "url",
|
|
607
555
|
"hasDynamicHelp": false,
|
|
608
556
|
"multiple": false,
|
|
609
557
|
"type": "option"
|
|
610
|
-
},
|
|
611
|
-
"text": {
|
|
612
|
-
"description": "Output plain text version (for AI agents)",
|
|
613
|
-
"name": "text",
|
|
614
|
-
"allowNo": false,
|
|
615
|
-
"type": "boolean"
|
|
616
558
|
}
|
|
617
559
|
},
|
|
618
560
|
"hasDynamicHelp": false,
|
|
619
561
|
"hiddenAliases": [],
|
|
620
|
-
"id": "
|
|
562
|
+
"id": "init",
|
|
621
563
|
"pluginAlias": "@mailmodo/cli",
|
|
622
564
|
"pluginName": "@mailmodo/cli",
|
|
623
565
|
"pluginType": "core",
|
|
@@ -627,7 +569,7 @@
|
|
|
627
569
|
"relativePath": [
|
|
628
570
|
"dist",
|
|
629
571
|
"commands",
|
|
630
|
-
"
|
|
572
|
+
"init",
|
|
631
573
|
"index.js"
|
|
632
574
|
]
|
|
633
575
|
},
|
|
@@ -678,6 +620,64 @@
|
|
|
678
620
|
"index.js"
|
|
679
621
|
]
|
|
680
622
|
},
|
|
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.88"
|
|
769
769
|
}
|
package/package.json
CHANGED