@mailmodo/cli 0.0.26-beta.pr29.44 → 0.0.26

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.
@@ -47,14 +47,10 @@ export default class Domain extends BaseCommand {
47
47
  this.log(` ${'─'.repeat(53)}\n`);
48
48
  let domain;
49
49
  let senderEmail;
50
- let fromName;
51
- let replyTo;
52
50
  let address;
53
51
  if (flags.yes) {
54
52
  domain = yamlConfig.project?.domain || '';
55
53
  senderEmail = yamlConfig.project?.fromEmail || '';
56
- fromName = yamlConfig.project?.fromName || '';
57
- replyTo = yamlConfig.project?.replyTo || '';
58
54
  address = yamlConfig.project?.address || '';
59
55
  if (!domain) {
60
56
  this.error('Domain is required. Set it in mailmodo.yaml or use interactive mode.');
@@ -71,40 +67,23 @@ export default class Domain extends BaseCommand {
71
67
  message: 'Sender email address:',
72
68
  validate: (v) => v?.includes('@') ? true : 'Please enter a valid email',
73
69
  });
74
- fromName = await input({
75
- default: yamlConfig.project?.fromName || '',
76
- message: 'Display name (optional, shown as sender name):',
77
- });
78
- replyTo = await input({
79
- default: yamlConfig.project?.replyTo || '',
80
- message: 'Reply-to address (optional, press Enter to use sender email):',
81
- });
82
70
  address = await input({
83
71
  default: yamlConfig.project?.address,
84
72
  message: 'Business address (required by law):',
85
73
  validate: (v) => (v?.trim() ? true : 'Address is required'),
86
74
  });
87
75
  }
88
- const apiPayload = {
76
+ const response = await this.withApiSpinner({ json: flags.json, text: ' Configuring domain...' }, () => this.apiClient.post(API_ENDPOINTS.DOMAIN, {
89
77
  address,
90
78
  domain,
91
79
  fromEmail: senderEmail,
92
- };
93
- if (fromName)
94
- apiPayload.fromName = fromName;
95
- if (replyTo)
96
- apiPayload.replyTo = replyTo;
97
- const response = await this.withApiSpinner({ json: flags.json, text: ' Configuring domain...' }, () => this.apiClient.post(API_ENDPOINTS.DOMAIN, apiPayload));
80
+ }));
98
81
  if (!response.ok) {
99
82
  this.handleApiError(response);
100
83
  }
101
84
  yamlConfig.project.domain = domain;
102
85
  yamlConfig.project.fromEmail = senderEmail;
103
86
  yamlConfig.project.address = address;
104
- if (fromName)
105
- yamlConfig.project.fromName = fromName;
106
- if (replyTo)
107
- yamlConfig.project.replyTo = replyTo;
108
87
  await saveYaml(yamlConfig);
109
88
  await saveConfig({ ...config, domain });
110
89
  const records = response.data?.dnsRecords || [];
@@ -342,13 +342,12 @@
342
342
  "index.js"
343
343
  ]
344
344
  },
345
- "login": {
345
+ "logout": {
346
346
  "aliases": [],
347
347
  "args": {},
348
- "description": "Authenticate with Mailmodo using your API key",
348
+ "description": "Sign out by removing saved credentials from this machine",
349
349
  "examples": [
350
- "<%= config.bin %> login",
351
- "MAILMODO_API_KEY=mm_live_xxx <%= config.bin %> login"
350
+ "<%= config.bin %> logout"
352
351
  ],
353
352
  "flags": {
354
353
  "json": {
@@ -367,7 +366,7 @@
367
366
  },
368
367
  "hasDynamicHelp": false,
369
368
  "hiddenAliases": [],
370
- "id": "login",
369
+ "id": "logout",
371
370
  "pluginAlias": "@mailmodo/cli",
372
371
  "pluginName": "@mailmodo/cli",
373
372
  "pluginType": "core",
@@ -377,16 +376,17 @@
377
376
  "relativePath": [
378
377
  "dist",
379
378
  "commands",
380
- "login",
379
+ "logout",
381
380
  "index.js"
382
381
  ]
383
382
  },
384
- "logout": {
383
+ "login": {
385
384
  "aliases": [],
386
385
  "args": {},
387
- "description": "Sign out by removing saved credentials from this machine",
386
+ "description": "Authenticate with Mailmodo using your API key",
388
387
  "examples": [
389
- "<%= config.bin %> logout"
388
+ "<%= config.bin %> login",
389
+ "MAILMODO_API_KEY=mm_live_xxx <%= config.bin %> login"
390
390
  ],
391
391
  "flags": {
392
392
  "json": {
@@ -405,7 +405,7 @@
405
405
  },
406
406
  "hasDynamicHelp": false,
407
407
  "hiddenAliases": [],
408
- "id": "logout",
408
+ "id": "login",
409
409
  "pluginAlias": "@mailmodo/cli",
410
410
  "pluginName": "@mailmodo/cli",
411
411
  "pluginType": "core",
@@ -415,7 +415,7 @@
415
415
  "relativePath": [
416
416
  "dist",
417
417
  "commands",
418
- "logout",
418
+ "login",
419
419
  "index.js"
420
420
  ]
421
421
  },
@@ -547,13 +547,14 @@
547
547
  "index.js"
548
548
  ]
549
549
  },
550
- "status": {
550
+ "settings": {
551
551
  "aliases": [],
552
552
  "args": {},
553
- "description": "View email performance metrics and quota usage",
553
+ "description": "View and update project settings",
554
554
  "examples": [
555
- "<%= config.bin %> status",
556
- "<%= config.bin %> status --json"
555
+ "<%= config.bin %> settings",
556
+ "<%= config.bin %> settings --set brand_color=#0F3460",
557
+ "<%= config.bin %> settings --json"
557
558
  ],
558
559
  "flags": {
559
560
  "json": {
@@ -568,11 +569,18 @@
568
569
  "name": "yes",
569
570
  "allowNo": false,
570
571
  "type": "boolean"
572
+ },
573
+ "set": {
574
+ "description": "Set a setting (format: key=value)",
575
+ "name": "set",
576
+ "hasDynamicHelp": false,
577
+ "multiple": false,
578
+ "type": "option"
571
579
  }
572
580
  },
573
581
  "hasDynamicHelp": false,
574
582
  "hiddenAliases": [],
575
- "id": "status",
583
+ "id": "settings",
576
584
  "pluginAlias": "@mailmodo/cli",
577
585
  "pluginName": "@mailmodo/cli",
578
586
  "pluginType": "core",
@@ -582,18 +590,17 @@
582
590
  "relativePath": [
583
591
  "dist",
584
592
  "commands",
585
- "status",
593
+ "settings",
586
594
  "index.js"
587
595
  ]
588
596
  },
589
- "settings": {
597
+ "status": {
590
598
  "aliases": [],
591
599
  "args": {},
592
- "description": "View and update project settings",
600
+ "description": "View email performance metrics and quota usage",
593
601
  "examples": [
594
- "<%= config.bin %> settings",
595
- "<%= config.bin %> settings --set brand_color=#0F3460",
596
- "<%= config.bin %> settings --json"
602
+ "<%= config.bin %> status",
603
+ "<%= config.bin %> status --json"
597
604
  ],
598
605
  "flags": {
599
606
  "json": {
@@ -608,18 +615,11 @@
608
615
  "name": "yes",
609
616
  "allowNo": false,
610
617
  "type": "boolean"
611
- },
612
- "set": {
613
- "description": "Set a setting (format: key=value)",
614
- "name": "set",
615
- "hasDynamicHelp": false,
616
- "multiple": false,
617
- "type": "option"
618
618
  }
619
619
  },
620
620
  "hasDynamicHelp": false,
621
621
  "hiddenAliases": [],
622
- "id": "settings",
622
+ "id": "status",
623
623
  "pluginAlias": "@mailmodo/cli",
624
624
  "pluginName": "@mailmodo/cli",
625
625
  "pluginType": "core",
@@ -629,10 +629,10 @@
629
629
  "relativePath": [
630
630
  "dist",
631
631
  "commands",
632
- "settings",
632
+ "status",
633
633
  "index.js"
634
634
  ]
635
635
  }
636
636
  },
637
- "version": "0.0.26-beta.pr29.44"
637
+ "version": "0.0.26"
638
638
  }
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.26-beta.pr29.44",
4
+ "version": "0.0.26",
5
5
  "author": "provishalk",
6
6
  "bin": {
7
7
  "mailmodo": "bin/run.js"