@mailmodo/cli 0.0.40 → 0.0.41-beta.pr43.68

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.
@@ -51,6 +51,16 @@ export default class Domain extends BaseCommand {
51
51
  */
52
52
  async setupDomain(flags) {
53
53
  const yamlConfig = await this.ensureYaml();
54
+ const existingDomain = yamlConfig.project?.domain;
55
+ if (existingDomain) {
56
+ if (flags.json) {
57
+ this.log(JSON.stringify({ domain: existingDomain, status: 'pending_verification' }, null, 2));
58
+ return;
59
+ }
60
+ this.log(`\n Domain already configured: ${chalk.cyan(existingDomain)}`);
61
+ this.log(` ${INFO.DOMAIN_PENDING_VERIFICATION}\n`);
62
+ return;
63
+ }
54
64
  this.log(`\n ${SEPARATOR}`);
55
65
  this.log(` ${chalk.bold('DOMAIN SETUP')}`);
56
66
  this.log(` ${SEPARATOR}\n`);
@@ -8,10 +8,16 @@ import { API_ENDPOINTS, LOGIN_URL } from '../../lib/constants.js';
8
8
  import { INFO } from '../../lib/messages.js';
9
9
  export default class Login extends BaseCommand {
10
10
  static description = 'Authenticate with Mailmodo using your API key';
11
- static examples = [
12
- '<%= config.bin %> login',
13
- 'MAILMODO_API_KEY=mm_live_xxx <%= config.bin %> login',
14
- ];
11
+ static examples = process.platform === 'win32'
12
+ ? [
13
+ '<%= config.bin %> login',
14
+ '$env:MAILMODO_API_KEY="YOUR_API_KEY"; <%= config.bin %> login # PowerShell',
15
+ 'set MAILMODO_API_KEY=YOUR_API_KEY && <%= config.bin %> login # CMD',
16
+ ]
17
+ : [
18
+ '<%= config.bin %> login',
19
+ 'MAILMODO_API_KEY=YOUR_API_KEY <%= config.bin %> login',
20
+ ];
15
21
  static flags = {
16
22
  ...BaseCommand.baseFlags,
17
23
  };
@@ -31,6 +31,7 @@ export declare const INFO: {
31
31
  readonly DNS_RECORDS_FAILED: string;
32
32
  readonly DOMAIN_NOT_DEPLOYED_HINT: `When ready, run: ${string}
33
33
  Then: ${string}`;
34
+ readonly DOMAIN_PENDING_VERIFICATION: `Domain is not verified yet. Run ${string} to check the status.`;
34
35
  readonly SEQUENCES_NOT_DEPLOYED: `Sequences saved but ${string}.`;
35
36
  };
36
37
  export declare function recordLabel(index: number): string;
@@ -31,6 +31,7 @@ export const INFO = {
31
31
  DNS_PROPAGATION: 'DNS changes take 5–30 minutes to propagate.',
32
32
  DNS_RECORDS_FAILED: chalk.yellow('Some records failed.'),
33
33
  DOMAIN_NOT_DEPLOYED_HINT: `When ready, run: ${chalk.cyan('mailmodo domain')}\n Then: ${chalk.cyan('mailmodo deploy')}`,
34
+ DOMAIN_PENDING_VERIFICATION: `Domain is not verified yet. Run ${chalk.cyan('mailmodo domain --verify')} to check the status.`,
34
35
  SEQUENCES_NOT_DEPLOYED: `Sequences saved but ${chalk.yellow('NOT deployed')}.`,
35
36
  };
36
37
  export function recordLabel(index) {
@@ -371,7 +371,7 @@
371
371
  "description": "Authenticate with Mailmodo using your API key",
372
372
  "examples": [
373
373
  "<%= config.bin %> login",
374
- "MAILMODO_API_KEY=mm_live_xxx <%= config.bin %> login"
374
+ "MAILMODO_API_KEY=YOUR_API_KEY <%= config.bin %> login"
375
375
  ],
376
376
  "flags": {
377
377
  "json": {
@@ -404,6 +404,44 @@
404
404
  "index.js"
405
405
  ]
406
406
  },
407
+ "logout": {
408
+ "aliases": [],
409
+ "args": {},
410
+ "description": "Sign out by removing saved credentials from this machine",
411
+ "examples": [
412
+ "<%= config.bin %> logout"
413
+ ],
414
+ "flags": {
415
+ "json": {
416
+ "description": "Output as JSON",
417
+ "name": "json",
418
+ "allowNo": false,
419
+ "type": "boolean"
420
+ },
421
+ "yes": {
422
+ "char": "y",
423
+ "description": "Skip confirmation prompts",
424
+ "name": "yes",
425
+ "allowNo": false,
426
+ "type": "boolean"
427
+ }
428
+ },
429
+ "hasDynamicHelp": false,
430
+ "hiddenAliases": [],
431
+ "id": "logout",
432
+ "pluginAlias": "@mailmodo/cli",
433
+ "pluginName": "@mailmodo/cli",
434
+ "pluginType": "core",
435
+ "strict": true,
436
+ "enableJsonFlag": false,
437
+ "isESM": true,
438
+ "relativePath": [
439
+ "dist",
440
+ "commands",
441
+ "logout",
442
+ "index.js"
443
+ ]
444
+ },
407
445
  "logs": {
408
446
  "aliases": [],
409
447
  "args": {},
@@ -474,44 +512,6 @@
474
512
  "index.js"
475
513
  ]
476
514
  },
477
- "logout": {
478
- "aliases": [],
479
- "args": {},
480
- "description": "Sign out by removing saved credentials from this machine",
481
- "examples": [
482
- "<%= config.bin %> logout"
483
- ],
484
- "flags": {
485
- "json": {
486
- "description": "Output as JSON",
487
- "name": "json",
488
- "allowNo": false,
489
- "type": "boolean"
490
- },
491
- "yes": {
492
- "char": "y",
493
- "description": "Skip confirmation prompts",
494
- "name": "yes",
495
- "allowNo": false,
496
- "type": "boolean"
497
- }
498
- },
499
- "hasDynamicHelp": false,
500
- "hiddenAliases": [],
501
- "id": "logout",
502
- "pluginAlias": "@mailmodo/cli",
503
- "pluginName": "@mailmodo/cli",
504
- "pluginType": "core",
505
- "strict": true,
506
- "enableJsonFlag": false,
507
- "isESM": true,
508
- "relativePath": [
509
- "dist",
510
- "commands",
511
- "logout",
512
- "index.js"
513
- ]
514
- },
515
515
  "preview": {
516
516
  "aliases": [],
517
517
  "args": {
@@ -657,5 +657,5 @@
657
657
  ]
658
658
  }
659
659
  },
660
- "version": "0.0.40"
660
+ "version": "0.0.41-beta.pr43.68"
661
661
  }
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.40",
4
+ "version": "0.0.41-beta.pr43.68",
5
5
  "author": "provishalk",
6
6
  "bin": {
7
7
  "mailmodo": "bin/run.js"