@mailmodo/cli 0.0.49-beta.pr51.78 → 0.0.49-beta.pr51.79
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/base-command.d.ts +6 -3
- package/dist/lib/base-command.js +8 -5
- package/dist/lib/constants.d.ts +6 -0
- package/dist/lib/constants.js +6 -0
- package/oclif.manifest.json +105 -105
- package/package.json +1 -1
|
@@ -168,12 +168,15 @@ export declare abstract class BaseCommand extends Command {
|
|
|
168
168
|
value: string;
|
|
169
169
|
}>, guideUrl: string | undefined, json: boolean): void;
|
|
170
170
|
/**
|
|
171
|
-
* Builds the terminal error string for a failed API call
|
|
172
|
-
*
|
|
171
|
+
* Builds the terminal error string for a failed API call. In production only
|
|
172
|
+
* the user-facing message is returned; verbose request diagnostics (URL,
|
|
173
|
+
* status, response body, error code) are appended only when [[IS_DEV_MODE]]
|
|
174
|
+
* is true so end users never see internal request metadata.
|
|
173
175
|
*
|
|
174
176
|
* @param {string} message - Primary error text (HTTP message or generic).
|
|
175
177
|
* @param {{ status: number; debug?: ApiRequestDebugInfo }} response - Failed API response.
|
|
176
|
-
* @returns {string} Message
|
|
178
|
+
* @returns {string} Message alone in production, or message plus indented
|
|
179
|
+
* Request details when running in dev/debug mode.
|
|
177
180
|
*/
|
|
178
181
|
private formatApiFailure;
|
|
179
182
|
}
|
package/dist/lib/base-command.js
CHANGED
|
@@ -4,7 +4,7 @@ import chalk from 'chalk';
|
|
|
4
4
|
import ora from 'ora';
|
|
5
5
|
import { ApiClient } from './api-client.js';
|
|
6
6
|
import { loadConfig } from './config.js';
|
|
7
|
-
import { API_ENDPOINTS } from './constants.js';
|
|
7
|
+
import { API_ENDPOINTS, IS_DEV_MODE } from './constants.js';
|
|
8
8
|
import { ERRORS, INFO, PROMPTS, quotaExhaustedMessage, recordLabel, VALIDATION, } from './messages.js';
|
|
9
9
|
import { loadYaml, saveYaml } from './yaml-config.js';
|
|
10
10
|
export const FREE_TIER = 'free';
|
|
@@ -296,16 +296,19 @@ export class BaseCommand extends Command {
|
|
|
296
296
|
this.log(` Full guide: ${chalk.cyan(guideUrl)}\n`);
|
|
297
297
|
}
|
|
298
298
|
/**
|
|
299
|
-
* Builds the terminal error string for a failed API call
|
|
300
|
-
*
|
|
299
|
+
* Builds the terminal error string for a failed API call. In production only
|
|
300
|
+
* the user-facing message is returned; verbose request diagnostics (URL,
|
|
301
|
+
* status, response body, error code) are appended only when [[IS_DEV_MODE]]
|
|
302
|
+
* is true so end users never see internal request metadata.
|
|
301
303
|
*
|
|
302
304
|
* @param {string} message - Primary error text (HTTP message or generic).
|
|
303
305
|
* @param {{ status: number; debug?: ApiRequestDebugInfo }} response - Failed API response.
|
|
304
|
-
* @returns {string} Message
|
|
306
|
+
* @returns {string} Message alone in production, or message plus indented
|
|
307
|
+
* Request details when running in dev/debug mode.
|
|
305
308
|
*/
|
|
306
309
|
formatApiFailure(message, response) {
|
|
307
310
|
const { debug, status } = response;
|
|
308
|
-
if (!debug) {
|
|
311
|
+
if (!IS_DEV_MODE || !debug) {
|
|
309
312
|
return message;
|
|
310
313
|
}
|
|
311
314
|
return [
|
package/dist/lib/constants.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True when the CLI is running in a dev/debug context. Verbose request
|
|
3
|
+
* diagnostics (URL, status, response body, error code) are only surfaced
|
|
4
|
+
* when this is true so end users never see internal request metadata.
|
|
5
|
+
*/
|
|
6
|
+
export declare const IS_DEV_MODE: boolean;
|
|
1
7
|
export declare const API_BASE_URL = "https://app-vertex-debug.azurewebsites.net";
|
|
2
8
|
export declare const API_ENDPOINTS: Readonly<{
|
|
3
9
|
ANALYTICS: "/analytics";
|
package/dist/lib/constants.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
/** Set by `bin/dev.js` when running the CLI locally (tsx bootstrap). */
|
|
2
2
|
const DEV_API_BASE_URL = 'https://app-vertex-debug.azurewebsites.net';
|
|
3
|
+
/**
|
|
4
|
+
* True when the CLI is running in a dev/debug context. Verbose request
|
|
5
|
+
* diagnostics (URL, status, response body, error code) are only surfaced
|
|
6
|
+
* when this is true so end users never see internal request metadata.
|
|
7
|
+
*/
|
|
8
|
+
export const IS_DEV_MODE = Boolean(process.env.MAILMODO_DEV_TSX || process.env.MAILMODO_DEBUG);
|
|
3
9
|
// const PRODUCTION_API_BASE_URL = 'https://api.mailmodo.com';
|
|
4
10
|
const PRODUCTION_API_BASE_URL = 'https://app-vertex-debug.azurewebsites.net';
|
|
5
11
|
export const API_BASE_URL = process.env.MAILMODO_DEV_TSX
|
package/oclif.manifest.json
CHANGED
|
@@ -76,15 +76,14 @@
|
|
|
76
76
|
"index.js"
|
|
77
77
|
]
|
|
78
78
|
},
|
|
79
|
-
"
|
|
79
|
+
"domain": {
|
|
80
80
|
"aliases": [],
|
|
81
81
|
"args": {},
|
|
82
|
-
"description": "
|
|
82
|
+
"description": "Set up and verify your sending domain",
|
|
83
83
|
"examples": [
|
|
84
|
-
"<%= config.bin %>
|
|
85
|
-
"<%= config.bin %>
|
|
86
|
-
"<%= config.bin %>
|
|
87
|
-
"<%= config.bin %> contacts --delete sarah@example.com"
|
|
84
|
+
"<%= config.bin %> domain",
|
|
85
|
+
"<%= config.bin %> domain --verify",
|
|
86
|
+
"<%= config.bin %> domain --status"
|
|
88
87
|
],
|
|
89
88
|
"flags": {
|
|
90
89
|
"json": {
|
|
@@ -100,30 +99,22 @@
|
|
|
100
99
|
"allowNo": false,
|
|
101
100
|
"type": "boolean"
|
|
102
101
|
},
|
|
103
|
-
"
|
|
104
|
-
"description": "
|
|
105
|
-
"name": "
|
|
106
|
-
"hasDynamicHelp": false,
|
|
107
|
-
"multiple": false,
|
|
108
|
-
"type": "option"
|
|
109
|
-
},
|
|
110
|
-
"export": {
|
|
111
|
-
"description": "Export all contacts as GDPR-compliant CSV (writes contacts.csv in the current directory)",
|
|
112
|
-
"name": "export",
|
|
102
|
+
"status": {
|
|
103
|
+
"description": "Show domain health status",
|
|
104
|
+
"name": "status",
|
|
113
105
|
"allowNo": false,
|
|
114
106
|
"type": "boolean"
|
|
115
107
|
},
|
|
116
|
-
"
|
|
117
|
-
"description": "
|
|
118
|
-
"name": "
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"type": "option"
|
|
108
|
+
"verify": {
|
|
109
|
+
"description": "Verify DNS records",
|
|
110
|
+
"name": "verify",
|
|
111
|
+
"allowNo": false,
|
|
112
|
+
"type": "boolean"
|
|
122
113
|
}
|
|
123
114
|
},
|
|
124
115
|
"hasDynamicHelp": false,
|
|
125
116
|
"hiddenAliases": [],
|
|
126
|
-
"id": "
|
|
117
|
+
"id": "domain",
|
|
127
118
|
"pluginAlias": "@mailmodo/cli",
|
|
128
119
|
"pluginName": "@mailmodo/cli",
|
|
129
120
|
"pluginType": "core",
|
|
@@ -133,7 +124,7 @@
|
|
|
133
124
|
"relativePath": [
|
|
134
125
|
"dist",
|
|
135
126
|
"commands",
|
|
136
|
-
"
|
|
127
|
+
"domain",
|
|
137
128
|
"index.js"
|
|
138
129
|
]
|
|
139
130
|
},
|
|
@@ -176,14 +167,15 @@
|
|
|
176
167
|
"index.js"
|
|
177
168
|
]
|
|
178
169
|
},
|
|
179
|
-
"
|
|
170
|
+
"contacts": {
|
|
180
171
|
"aliases": [],
|
|
181
172
|
"args": {},
|
|
182
|
-
"description": "
|
|
173
|
+
"description": "Manage contacts — search, export, or delete",
|
|
183
174
|
"examples": [
|
|
184
|
-
"<%= config.bin %>
|
|
185
|
-
"<%= config.bin %>
|
|
186
|
-
"<%= config.bin %>
|
|
175
|
+
"<%= config.bin %> contacts",
|
|
176
|
+
"<%= config.bin %> contacts --search sarah@example.com",
|
|
177
|
+
"<%= config.bin %> contacts --export # GDPR CSV → contacts.csv",
|
|
178
|
+
"<%= config.bin %> contacts --delete sarah@example.com"
|
|
187
179
|
],
|
|
188
180
|
"flags": {
|
|
189
181
|
"json": {
|
|
@@ -199,22 +191,30 @@
|
|
|
199
191
|
"allowNo": false,
|
|
200
192
|
"type": "boolean"
|
|
201
193
|
},
|
|
202
|
-
"
|
|
203
|
-
"description": "
|
|
204
|
-
"name": "
|
|
205
|
-
"
|
|
206
|
-
"
|
|
194
|
+
"delete": {
|
|
195
|
+
"description": "GDPR hard delete a contact by email",
|
|
196
|
+
"name": "delete",
|
|
197
|
+
"hasDynamicHelp": false,
|
|
198
|
+
"multiple": false,
|
|
199
|
+
"type": "option"
|
|
207
200
|
},
|
|
208
|
-
"
|
|
209
|
-
"description": "
|
|
210
|
-
"name": "
|
|
201
|
+
"export": {
|
|
202
|
+
"description": "Export all contacts as GDPR-compliant CSV (writes contacts.csv in the current directory)",
|
|
203
|
+
"name": "export",
|
|
211
204
|
"allowNo": false,
|
|
212
205
|
"type": "boolean"
|
|
206
|
+
},
|
|
207
|
+
"search": {
|
|
208
|
+
"description": "Search for a contact by email",
|
|
209
|
+
"name": "search",
|
|
210
|
+
"hasDynamicHelp": false,
|
|
211
|
+
"multiple": false,
|
|
212
|
+
"type": "option"
|
|
213
213
|
}
|
|
214
214
|
},
|
|
215
215
|
"hasDynamicHelp": false,
|
|
216
216
|
"hiddenAliases": [],
|
|
217
|
-
"id": "
|
|
217
|
+
"id": "contacts",
|
|
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
|
+
"contacts",
|
|
228
228
|
"index.js"
|
|
229
229
|
]
|
|
230
230
|
},
|
|
@@ -365,6 +365,45 @@
|
|
|
365
365
|
"index.js"
|
|
366
366
|
]
|
|
367
367
|
},
|
|
368
|
+
"login": {
|
|
369
|
+
"aliases": [],
|
|
370
|
+
"args": {},
|
|
371
|
+
"description": "Authenticate with Mailmodo using your API key",
|
|
372
|
+
"examples": [
|
|
373
|
+
"<%= config.bin %> login",
|
|
374
|
+
"MAILMODO_API_KEY=YOUR_API_KEY <%= config.bin %> login"
|
|
375
|
+
],
|
|
376
|
+
"flags": {
|
|
377
|
+
"json": {
|
|
378
|
+
"description": "Output as JSON",
|
|
379
|
+
"name": "json",
|
|
380
|
+
"allowNo": false,
|
|
381
|
+
"type": "boolean"
|
|
382
|
+
},
|
|
383
|
+
"yes": {
|
|
384
|
+
"char": "y",
|
|
385
|
+
"description": "Skip confirmation prompts",
|
|
386
|
+
"name": "yes",
|
|
387
|
+
"allowNo": false,
|
|
388
|
+
"type": "boolean"
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
"hasDynamicHelp": false,
|
|
392
|
+
"hiddenAliases": [],
|
|
393
|
+
"id": "login",
|
|
394
|
+
"pluginAlias": "@mailmodo/cli",
|
|
395
|
+
"pluginName": "@mailmodo/cli",
|
|
396
|
+
"pluginType": "core",
|
|
397
|
+
"strict": true,
|
|
398
|
+
"enableJsonFlag": false,
|
|
399
|
+
"isESM": true,
|
|
400
|
+
"relativePath": [
|
|
401
|
+
"dist",
|
|
402
|
+
"commands",
|
|
403
|
+
"login",
|
|
404
|
+
"index.js"
|
|
405
|
+
]
|
|
406
|
+
},
|
|
368
407
|
"logout": {
|
|
369
408
|
"aliases": [],
|
|
370
409
|
"args": {},
|
|
@@ -473,64 +512,6 @@
|
|
|
473
512
|
"index.js"
|
|
474
513
|
]
|
|
475
514
|
},
|
|
476
|
-
"preview": {
|
|
477
|
-
"aliases": [],
|
|
478
|
-
"args": {
|
|
479
|
-
"id": {
|
|
480
|
-
"description": "Email template ID to preview",
|
|
481
|
-
"name": "id"
|
|
482
|
-
}
|
|
483
|
-
},
|
|
484
|
-
"description": "Preview an email in browser, as text, or send a test",
|
|
485
|
-
"examples": [
|
|
486
|
-
"<%= config.bin %> preview welcome",
|
|
487
|
-
"<%= config.bin %> preview welcome --text",
|
|
488
|
-
"<%= config.bin %> preview welcome --send me@example.com"
|
|
489
|
-
],
|
|
490
|
-
"flags": {
|
|
491
|
-
"json": {
|
|
492
|
-
"description": "Output as JSON",
|
|
493
|
-
"name": "json",
|
|
494
|
-
"allowNo": false,
|
|
495
|
-
"type": "boolean"
|
|
496
|
-
},
|
|
497
|
-
"yes": {
|
|
498
|
-
"char": "y",
|
|
499
|
-
"description": "Skip confirmation prompts",
|
|
500
|
-
"name": "yes",
|
|
501
|
-
"allowNo": false,
|
|
502
|
-
"type": "boolean"
|
|
503
|
-
},
|
|
504
|
-
"send": {
|
|
505
|
-
"description": "Send test email to this address",
|
|
506
|
-
"name": "send",
|
|
507
|
-
"hasDynamicHelp": false,
|
|
508
|
-
"multiple": false,
|
|
509
|
-
"type": "option"
|
|
510
|
-
},
|
|
511
|
-
"text": {
|
|
512
|
-
"description": "Output plain text version (for AI agents)",
|
|
513
|
-
"name": "text",
|
|
514
|
-
"allowNo": false,
|
|
515
|
-
"type": "boolean"
|
|
516
|
-
}
|
|
517
|
-
},
|
|
518
|
-
"hasDynamicHelp": false,
|
|
519
|
-
"hiddenAliases": [],
|
|
520
|
-
"id": "preview",
|
|
521
|
-
"pluginAlias": "@mailmodo/cli",
|
|
522
|
-
"pluginName": "@mailmodo/cli",
|
|
523
|
-
"pluginType": "core",
|
|
524
|
-
"strict": true,
|
|
525
|
-
"enableJsonFlag": false,
|
|
526
|
-
"isESM": true,
|
|
527
|
-
"relativePath": [
|
|
528
|
-
"dist",
|
|
529
|
-
"commands",
|
|
530
|
-
"preview",
|
|
531
|
-
"index.js"
|
|
532
|
-
]
|
|
533
|
-
},
|
|
534
515
|
"settings": {
|
|
535
516
|
"aliases": [],
|
|
536
517
|
"args": {},
|
|
@@ -617,13 +598,19 @@
|
|
|
617
598
|
"index.js"
|
|
618
599
|
]
|
|
619
600
|
},
|
|
620
|
-
"
|
|
601
|
+
"preview": {
|
|
621
602
|
"aliases": [],
|
|
622
|
-
"args": {
|
|
623
|
-
|
|
603
|
+
"args": {
|
|
604
|
+
"id": {
|
|
605
|
+
"description": "Email template ID to preview",
|
|
606
|
+
"name": "id"
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
"description": "Preview an email in browser, as text, or send a test",
|
|
624
610
|
"examples": [
|
|
625
|
-
"<%= config.bin %>
|
|
626
|
-
"
|
|
611
|
+
"<%= config.bin %> preview welcome",
|
|
612
|
+
"<%= config.bin %> preview welcome --text",
|
|
613
|
+
"<%= config.bin %> preview welcome --send me@example.com"
|
|
627
614
|
],
|
|
628
615
|
"flags": {
|
|
629
616
|
"json": {
|
|
@@ -638,11 +625,24 @@
|
|
|
638
625
|
"name": "yes",
|
|
639
626
|
"allowNo": false,
|
|
640
627
|
"type": "boolean"
|
|
628
|
+
},
|
|
629
|
+
"send": {
|
|
630
|
+
"description": "Send test email to this address",
|
|
631
|
+
"name": "send",
|
|
632
|
+
"hasDynamicHelp": false,
|
|
633
|
+
"multiple": false,
|
|
634
|
+
"type": "option"
|
|
635
|
+
},
|
|
636
|
+
"text": {
|
|
637
|
+
"description": "Output plain text version (for AI agents)",
|
|
638
|
+
"name": "text",
|
|
639
|
+
"allowNo": false,
|
|
640
|
+
"type": "boolean"
|
|
641
641
|
}
|
|
642
642
|
},
|
|
643
643
|
"hasDynamicHelp": false,
|
|
644
644
|
"hiddenAliases": [],
|
|
645
|
-
"id": "
|
|
645
|
+
"id": "preview",
|
|
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
|
+
"preview",
|
|
656
656
|
"index.js"
|
|
657
657
|
]
|
|
658
658
|
}
|
|
659
659
|
},
|
|
660
|
-
"version": "0.0.49-beta.pr51.
|
|
660
|
+
"version": "0.0.49-beta.pr51.79"
|
|
661
661
|
}
|
package/package.json
CHANGED