@mailmodo/cli 0.0.10 → 0.0.11-beta.pr13.17

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.
@@ -2,7 +2,7 @@ import { Flags } from '@oclif/core';
2
2
  import { editor, input, select } from '@inquirer/prompts';
3
3
  import chalk from 'chalk';
4
4
  import { BaseCommand } from '../../lib/base-command.js';
5
- import { API_ENDPOINTS, DEFAULT_BRAND_COLOR } from '../../lib/constants.js';
5
+ import { API_ENDPOINTS, DEFAULT_BRAND_COLOR, DEFAULT_MONTHLY_CAP } from '../../lib/constants.js';
6
6
  import { saveTemplate, saveYaml, } from '../../lib/yaml-config.js';
7
7
  function isValidUrl(value) {
8
8
  try {
@@ -140,6 +140,7 @@ export default class Init extends BaseCommand {
140
140
  fromEmail: '',
141
141
  fromName: `Team ${analysisPayload.productName}`,
142
142
  logoUrl: analysisPayload.brand?.logoUrl || '',
143
+ monthlyCap: DEFAULT_MONTHLY_CAP,
143
144
  name: analysisPayload.productName,
144
145
  replyTo: '',
145
146
  type: analysisPayload.pricingModel,
@@ -63,7 +63,7 @@ export default class Login extends BaseCommand {
63
63
  }
64
64
  const trimmedKey = apiKey.trim();
65
65
  const client = new ApiClient(trimmedKey);
66
- const response = await this.withApiSpinner({ json: flags.json, text: ' Validating API key...' }, () => client.post(API_ENDPOINTS.AUTH_VALIDATE, {}));
66
+ const response = await this.withApiSpinner({ json: flags.json, text: ' Validating API key...' }, () => client.get(API_ENDPOINTS.AUTH_VALIDATE));
67
67
  if (!response.ok) {
68
68
  this.handleApiError(response);
69
69
  }
@@ -1,27 +1,28 @@
1
1
  export declare const API_BASE_URL: string;
2
2
  export declare const API_ENDPOINTS: Readonly<{
3
- ANALYTICS: "/api/analytics";
4
- ANALYZE: "/api/analyze";
5
- ASSETS_LOGO: "/api/assets/logo";
6
- AUTH_VALIDATE: "/api/auth/validate";
7
- BILLING_CAP: "/api/billing/cap";
8
- BILLING_STATUS: "/api/billing/status";
9
- CONTACTS: "/api/contacts";
10
- CONTACTS_EXPORT: "/api/contacts/export";
11
- DOMAIN: "/api/domain";
12
- DOMAIN_STATUS: "/api/domain/status";
13
- DOMAIN_VERIFY: "/api/domain/verify";
14
- EDIT: "/api/edit";
15
- EVENTS: "/api/events";
16
- GENERATE: "/api/generate";
17
- LOGS: "/api/logs";
18
- PREVIEW: "/api/preview";
19
- SEQUENCES: "/api/sequences";
3
+ ANALYTICS: "/analytics";
4
+ ANALYZE: "/analyze";
5
+ ASSETS_LOGO: "/assets/logo";
6
+ AUTH_VALIDATE: "/auth/validate";
7
+ BILLING_CAP: "/billing/cap";
8
+ BILLING_STATUS: "/billing/status";
9
+ CONTACTS: "/contacts";
10
+ CONTACTS_EXPORT: "/contacts/export";
11
+ DOMAIN: "/domain";
12
+ DOMAIN_STATUS: "/domain/status";
13
+ DOMAIN_VERIFY: "/domain/verify";
14
+ EDIT: "/edit";
15
+ EVENTS: "/events";
16
+ GENERATE: "/generate";
17
+ LOGS: "/logs";
18
+ PREVIEW: "/preview";
19
+ SEQUENCES: "/sequences";
20
20
  }>;
21
21
  export declare const SIGNUP_URL = "https://mailmodo.com/cli";
22
22
  export declare const DOCS_URL = "https://mailmodo.com/docs/cli";
23
23
  export declare const DNS_GUIDE_URL = "https://mailmodo.com/docs/dns";
24
24
  export declare const PREVIEW_PORT = 3421;
25
25
  export declare const DEFAULT_BRAND_COLOR = "#1A56DB";
26
+ export declare const DEFAULT_MONTHLY_CAP = 5;
26
27
  export declare const TEMPLATES_DIR = "mailmodo";
27
28
  export declare const YAML_FILE = "mailmodo.yaml";
@@ -5,28 +5,29 @@ export const API_BASE_URL = process.env.MAILMODO_DEV_TSX
5
5
  ? DEV_API_BASE_URL
6
6
  : PRODUCTION_API_BASE_URL;
7
7
  export const API_ENDPOINTS = Object.freeze({
8
- ANALYTICS: '/api/analytics',
9
- ANALYZE: '/api/analyze',
10
- ASSETS_LOGO: '/api/assets/logo',
11
- AUTH_VALIDATE: '/api/auth/validate',
12
- BILLING_CAP: '/api/billing/cap',
13
- BILLING_STATUS: '/api/billing/status',
14
- CONTACTS: '/api/contacts',
15
- CONTACTS_EXPORT: '/api/contacts/export',
16
- DOMAIN: '/api/domain',
17
- DOMAIN_STATUS: '/api/domain/status',
18
- DOMAIN_VERIFY: '/api/domain/verify',
19
- EDIT: '/api/edit',
20
- EVENTS: '/api/events',
21
- GENERATE: '/api/generate',
22
- LOGS: '/api/logs',
23
- PREVIEW: '/api/preview',
24
- SEQUENCES: '/api/sequences',
8
+ ANALYTICS: '/analytics',
9
+ ANALYZE: '/analyze',
10
+ ASSETS_LOGO: '/assets/logo',
11
+ AUTH_VALIDATE: '/auth/validate',
12
+ BILLING_CAP: '/billing/cap',
13
+ BILLING_STATUS: '/billing/status',
14
+ CONTACTS: '/contacts',
15
+ CONTACTS_EXPORT: '/contacts/export',
16
+ DOMAIN: '/domain',
17
+ DOMAIN_STATUS: '/domain/status',
18
+ DOMAIN_VERIFY: '/domain/verify',
19
+ EDIT: '/edit',
20
+ EVENTS: '/events',
21
+ GENERATE: '/generate',
22
+ LOGS: '/logs',
23
+ PREVIEW: '/preview',
24
+ SEQUENCES: '/sequences',
25
25
  });
26
26
  export const SIGNUP_URL = 'https://mailmodo.com/cli';
27
27
  export const DOCS_URL = 'https://mailmodo.com/docs/cli';
28
28
  export const DNS_GUIDE_URL = 'https://mailmodo.com/docs/dns';
29
29
  export const PREVIEW_PORT = 3421;
30
30
  export const DEFAULT_BRAND_COLOR = '#1A56DB';
31
+ export const DEFAULT_MONTHLY_CAP = 5;
31
32
  export const TEMPLATES_DIR = 'mailmodo';
32
33
  export const YAML_FILE = 'mailmodo.yaml';
@@ -419,15 +419,19 @@
419
419
  "index.js"
420
420
  ]
421
421
  },
422
- "logs": {
422
+ "preview": {
423
423
  "aliases": [],
424
- "args": {},
425
- "description": "View email send logs and delivery events",
424
+ "args": {
425
+ "id": {
426
+ "description": "Email ID to preview",
427
+ "name": "id"
428
+ }
429
+ },
430
+ "description": "Preview an email in browser, as text, or send a test",
426
431
  "examples": [
427
- "<%= config.bin %> logs",
428
- "<%= config.bin %> logs --email sarah@example.com",
429
- "<%= config.bin %> logs --failed",
430
- "<%= config.bin %> logs --json"
432
+ "<%= config.bin %> preview welcome",
433
+ "<%= config.bin %> preview welcome --text",
434
+ "<%= config.bin %> preview welcome --send me@example.com"
431
435
  ],
432
436
  "flags": {
433
437
  "json": {
@@ -443,23 +447,23 @@
443
447
  "allowNo": false,
444
448
  "type": "boolean"
445
449
  },
446
- "email": {
447
- "description": "Filter logs by contact email",
448
- "name": "email",
450
+ "send": {
451
+ "description": "Send test email to this address",
452
+ "name": "send",
449
453
  "hasDynamicHelp": false,
450
454
  "multiple": false,
451
455
  "type": "option"
452
456
  },
453
- "failed": {
454
- "description": "Show only failed/bounced events",
455
- "name": "failed",
457
+ "text": {
458
+ "description": "Output plain text version (for AI agents)",
459
+ "name": "text",
456
460
  "allowNo": false,
457
461
  "type": "boolean"
458
462
  }
459
463
  },
460
464
  "hasDynamicHelp": false,
461
465
  "hiddenAliases": [],
462
- "id": "logs",
466
+ "id": "preview",
463
467
  "pluginAlias": "@mailmodo/cli",
464
468
  "pluginName": "@mailmodo/cli",
465
469
  "pluginType": "core",
@@ -469,23 +473,18 @@
469
473
  "relativePath": [
470
474
  "dist",
471
475
  "commands",
472
- "logs",
476
+ "preview",
473
477
  "index.js"
474
478
  ]
475
479
  },
476
- "preview": {
480
+ "settings": {
477
481
  "aliases": [],
478
- "args": {
479
- "id": {
480
- "description": "Email ID to preview",
481
- "name": "id"
482
- }
483
- },
484
- "description": "Preview an email in browser, as text, or send a test",
482
+ "args": {},
483
+ "description": "View and update project settings",
485
484
  "examples": [
486
- "<%= config.bin %> preview welcome",
487
- "<%= config.bin %> preview welcome --text",
488
- "<%= config.bin %> preview welcome --send me@example.com"
485
+ "<%= config.bin %> settings",
486
+ "<%= config.bin %> settings --set brand_color=#0F3460",
487
+ "<%= config.bin %> settings --json"
489
488
  ],
490
489
  "flags": {
491
490
  "json": {
@@ -501,23 +500,17 @@
501
500
  "allowNo": false,
502
501
  "type": "boolean"
503
502
  },
504
- "send": {
505
- "description": "Send test email to this address",
506
- "name": "send",
503
+ "set": {
504
+ "description": "Set a setting (format: key=value)",
505
+ "name": "set",
507
506
  "hasDynamicHelp": false,
508
507
  "multiple": false,
509
508
  "type": "option"
510
- },
511
- "text": {
512
- "description": "Output plain text version (for AI agents)",
513
- "name": "text",
514
- "allowNo": false,
515
- "type": "boolean"
516
509
  }
517
510
  },
518
511
  "hasDynamicHelp": false,
519
512
  "hiddenAliases": [],
520
- "id": "preview",
513
+ "id": "settings",
521
514
  "pluginAlias": "@mailmodo/cli",
522
515
  "pluginName": "@mailmodo/cli",
523
516
  "pluginType": "core",
@@ -527,7 +520,7 @@
527
520
  "relativePath": [
528
521
  "dist",
529
522
  "commands",
530
- "preview",
523
+ "settings",
531
524
  "index.js"
532
525
  ]
533
526
  },
@@ -570,14 +563,15 @@
570
563
  "index.js"
571
564
  ]
572
565
  },
573
- "settings": {
566
+ "logs": {
574
567
  "aliases": [],
575
568
  "args": {},
576
- "description": "View and update project settings",
569
+ "description": "View email send logs and delivery events",
577
570
  "examples": [
578
- "<%= config.bin %> settings",
579
- "<%= config.bin %> settings --set brand_color=#0F3460",
580
- "<%= config.bin %> settings --json"
571
+ "<%= config.bin %> logs",
572
+ "<%= config.bin %> logs --email sarah@example.com",
573
+ "<%= config.bin %> logs --failed",
574
+ "<%= config.bin %> logs --json"
581
575
  ],
582
576
  "flags": {
583
577
  "json": {
@@ -593,17 +587,23 @@
593
587
  "allowNo": false,
594
588
  "type": "boolean"
595
589
  },
596
- "set": {
597
- "description": "Set a setting (format: key=value)",
598
- "name": "set",
590
+ "email": {
591
+ "description": "Filter logs by contact email",
592
+ "name": "email",
599
593
  "hasDynamicHelp": false,
600
594
  "multiple": false,
601
595
  "type": "option"
596
+ },
597
+ "failed": {
598
+ "description": "Show only failed/bounced events",
599
+ "name": "failed",
600
+ "allowNo": false,
601
+ "type": "boolean"
602
602
  }
603
603
  },
604
604
  "hasDynamicHelp": false,
605
605
  "hiddenAliases": [],
606
- "id": "settings",
606
+ "id": "logs",
607
607
  "pluginAlias": "@mailmodo/cli",
608
608
  "pluginName": "@mailmodo/cli",
609
609
  "pluginType": "core",
@@ -613,10 +613,10 @@
613
613
  "relativePath": [
614
614
  "dist",
615
615
  "commands",
616
- "settings",
616
+ "logs",
617
617
  "index.js"
618
618
  ]
619
619
  }
620
620
  },
621
- "version": "0.0.10"
621
+ "version": "0.0.11-beta.pr13.17"
622
622
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mailmodo/cli",
3
3
  "description": "Email lifecycle automation for the AI-native builder generation.",
4
- "version": "0.0.10",
4
+ "version": "0.0.11-beta.pr13.17",
5
5
  "author": "provishalk",
6
6
  "bin": {
7
7
  "mailmodo": "bin/run.js"