@mailmodo/cli 0.0.51-beta.pr53.81 → 0.0.51-beta.pr53.84

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 { confirm, input } 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, SDK_IMPORT_SNIPPET, SDK_INSTALL_COMMAND, } from '../../lib/constants.js';
6
6
  import { ERRORS, INFO, pauseAlready, pauseSuccess, PROMPTS, resumeAlready, resumeSuccess, SEPARATOR, } from '../../lib/messages.js';
7
7
  import { loadTemplate, } from '../../lib/yaml-config.js';
8
8
  export default class Deploy extends BaseCommand {
@@ -286,8 +286,8 @@ export default class Deploy extends BaseCommand {
286
286
  this.log(` ${SEPARATOR}`);
287
287
  this.log(` ${chalk.bold('ADD THIS TO YOUR APP (one-time only):')}`);
288
288
  this.log(` ${SEPARATOR}\n`);
289
- this.log(` ${chalk.cyan(sdkSnippet.install ?? 'npm install @mailmodo/sdk')}\n`);
290
- this.log(` ${chalk.dim("import { track, identify } from '@mailmodo/sdk'")}\n`);
289
+ this.log(` ${chalk.cyan(sdkSnippet.install ?? SDK_INSTALL_COMMAND)}\n`);
290
+ this.log(` ${chalk.dim(SDK_IMPORT_SNIPPET)}\n`);
291
291
  if (sdkSnippet.examples) {
292
292
  this.log(` ${chalk.dim('// Example usage:')}`);
293
293
  this.log(` ${chalk.dim(sdkSnippet.examples.track)}`);
@@ -1,7 +1,7 @@
1
1
  import { Flags } from '@oclif/core';
2
2
  import chalk from 'chalk';
3
3
  import { BaseCommand } from '../../lib/base-command.js';
4
- import { API_ENDPOINTS } from '../../lib/constants.js';
4
+ import { API_ENDPOINTS, SDK_IMPORT_SNIPPET, SDK_INSTALL_COMMAND, } from '../../lib/constants.js';
5
5
  import { SEPARATOR } from '../../lib/messages.js';
6
6
  export default class Sdk extends BaseCommand {
7
7
  static description = 'Show the SDK track() / identify() reference for deployed sequences';
@@ -43,8 +43,8 @@ export default class Sdk extends BaseCommand {
43
43
  this.log(` ${SEPARATOR}`);
44
44
  this.log(` ${chalk.bold('SDK EVENT REFERENCE')}`);
45
45
  this.log(` ${SEPARATOR}\n`);
46
- this.log(` ${chalk.cyan('npm install @mailmodo/sdk')}\n`);
47
- this.log(` ${chalk.dim("import { track, identify } from '@mailmodo/sdk'")}\n`);
46
+ this.log(` ${chalk.cyan(SDK_INSTALL_COMMAND)}\n`);
47
+ this.log(` ${chalk.dim(SDK_IMPORT_SNIPPET)}\n`);
48
48
  for (const [index, snippet] of snippets.entries()) {
49
49
  this.renderSequenceBlock(snippet);
50
50
  if (index < snippets.length - 1)
@@ -34,3 +34,6 @@ export declare const PREVIEW_PORT = 3421;
34
34
  export declare const DEFAULT_BRAND_COLOR = "#1A56DB";
35
35
  export declare const TEMPLATES_DIR = "mailmodo";
36
36
  export declare const YAML_FILE = "mailmodo.yaml";
37
+ export declare const SDK_PACKAGE_NAME = "@mailmodo/sdk";
38
+ export declare const SDK_INSTALL_COMMAND = "npm install @mailmodo/sdk";
39
+ export declare const SDK_IMPORT_SNIPPET = "import { track, identify } from '@mailmodo/sdk'";
@@ -45,3 +45,6 @@ export const PREVIEW_PORT = 3421;
45
45
  export const DEFAULT_BRAND_COLOR = '#1A56DB';
46
46
  export const TEMPLATES_DIR = 'mailmodo';
47
47
  export const YAML_FILE = 'mailmodo.yaml';
48
+ export const SDK_PACKAGE_NAME = '@mailmodo/sdk';
49
+ export const SDK_INSTALL_COMMAND = `npm install ${SDK_PACKAGE_NAME}`;
50
+ export const SDK_IMPORT_SNIPPET = `import { track, identify } from '${SDK_PACKAGE_NAME}'`;
@@ -289,13 +289,19 @@
289
289
  "index.js"
290
290
  ]
291
291
  },
292
- "emails": {
292
+ "edit": {
293
293
  "aliases": [],
294
- "args": {},
295
- "description": "List and view configured email sequences",
294
+ "args": {
295
+ "id": {
296
+ "description": "Email template ID to edit",
297
+ "name": "id",
298
+ "required": true
299
+ }
300
+ },
301
+ "description": "Edit an email using AI-assisted natural language changes",
296
302
  "examples": [
297
- "<%= config.bin %> emails",
298
- "<%= config.bin %> emails --json"
303
+ "<%= config.bin %> edit welcome",
304
+ "<%= config.bin %> edit welcome --change \"make subject more urgent\" --yes"
299
305
  ],
300
306
  "flags": {
301
307
  "json": {
@@ -310,11 +316,18 @@
310
316
  "name": "yes",
311
317
  "allowNo": false,
312
318
  "type": "boolean"
319
+ },
320
+ "change": {
321
+ "description": "Natural language description of the change",
322
+ "name": "change",
323
+ "hasDynamicHelp": false,
324
+ "multiple": false,
325
+ "type": "option"
313
326
  }
314
327
  },
315
328
  "hasDynamicHelp": false,
316
329
  "hiddenAliases": [],
317
- "id": "emails",
330
+ "id": "edit",
318
331
  "pluginAlias": "@mailmodo/cli",
319
332
  "pluginName": "@mailmodo/cli",
320
333
  "pluginType": "core",
@@ -324,23 +337,17 @@
324
337
  "relativePath": [
325
338
  "dist",
326
339
  "commands",
327
- "emails",
340
+ "edit",
328
341
  "index.js"
329
342
  ]
330
343
  },
331
- "edit": {
344
+ "emails": {
332
345
  "aliases": [],
333
- "args": {
334
- "id": {
335
- "description": "Email template ID to edit",
336
- "name": "id",
337
- "required": true
338
- }
339
- },
340
- "description": "Edit an email using AI-assisted natural language changes",
346
+ "args": {},
347
+ "description": "List and view configured email sequences",
341
348
  "examples": [
342
- "<%= config.bin %> edit welcome",
343
- "<%= config.bin %> edit welcome --change \"make subject more urgent\" --yes"
349
+ "<%= config.bin %> emails",
350
+ "<%= config.bin %> emails --json"
344
351
  ],
345
352
  "flags": {
346
353
  "json": {
@@ -355,18 +362,11 @@
355
362
  "name": "yes",
356
363
  "allowNo": false,
357
364
  "type": "boolean"
358
- },
359
- "change": {
360
- "description": "Natural language description of the change",
361
- "name": "change",
362
- "hasDynamicHelp": false,
363
- "multiple": false,
364
- "type": "option"
365
365
  }
366
366
  },
367
367
  "hasDynamicHelp": false,
368
368
  "hiddenAliases": [],
369
- "id": "edit",
369
+ "id": "emails",
370
370
  "pluginAlias": "@mailmodo/cli",
371
371
  "pluginName": "@mailmodo/cli",
372
372
  "pluginType": "core",
@@ -376,7 +376,7 @@
376
376
  "relativePath": [
377
377
  "dist",
378
378
  "commands",
379
- "edit",
379
+ "emails",
380
380
  "index.js"
381
381
  ]
382
382
  },
@@ -503,15 +503,19 @@
503
503
  "index.js"
504
504
  ]
505
505
  },
506
- "logs": {
506
+ "preview": {
507
507
  "aliases": [],
508
- "args": {},
509
- "description": "View email send logs and delivery events",
508
+ "args": {
509
+ "id": {
510
+ "description": "Email template ID to preview",
511
+ "name": "id"
512
+ }
513
+ },
514
+ "description": "Preview an email in browser, as text, or send a test",
510
515
  "examples": [
511
- "<%= config.bin %> logs",
512
- "<%= config.bin %> logs --email sarah@example.com",
513
- "<%= config.bin %> logs --failed",
514
- "<%= config.bin %> logs --json"
516
+ "<%= config.bin %> preview welcome",
517
+ "<%= config.bin %> preview welcome --text",
518
+ "<%= config.bin %> preview welcome --send me@example.com"
515
519
  ],
516
520
  "flags": {
517
521
  "json": {
@@ -527,39 +531,23 @@
527
531
  "allowNo": false,
528
532
  "type": "boolean"
529
533
  },
530
- "email": {
531
- "description": "Filter logs by contact email",
532
- "name": "email",
534
+ "send": {
535
+ "description": "Send test email to this address",
536
+ "name": "send",
533
537
  "hasDynamicHelp": false,
534
538
  "multiple": false,
535
539
  "type": "option"
536
540
  },
537
- "failed": {
538
- "description": "Show only failed/bounced events",
539
- "name": "failed",
541
+ "text": {
542
+ "description": "Output plain text version (for AI agents)",
543
+ "name": "text",
540
544
  "allowNo": false,
541
545
  "type": "boolean"
542
- },
543
- "limit": {
544
- "description": "Entries per page (max 200)",
545
- "name": "limit",
546
- "default": 50,
547
- "hasDynamicHelp": false,
548
- "multiple": false,
549
- "type": "option"
550
- },
551
- "page": {
552
- "description": "Page number",
553
- "name": "page",
554
- "default": 1,
555
- "hasDynamicHelp": false,
556
- "multiple": false,
557
- "type": "option"
558
546
  }
559
547
  },
560
548
  "hasDynamicHelp": false,
561
549
  "hiddenAliases": [],
562
- "id": "logs",
550
+ "id": "preview",
563
551
  "pluginAlias": "@mailmodo/cli",
564
552
  "pluginName": "@mailmodo/cli",
565
553
  "pluginType": "core",
@@ -569,23 +557,18 @@
569
557
  "relativePath": [
570
558
  "dist",
571
559
  "commands",
572
- "logs",
560
+ "preview",
573
561
  "index.js"
574
562
  ]
575
563
  },
576
- "preview": {
564
+ "sdk": {
577
565
  "aliases": [],
578
- "args": {
579
- "id": {
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",
566
+ "args": {},
567
+ "description": "Show the SDK track() / identify() reference for deployed sequences",
585
568
  "examples": [
586
- "<%= config.bin %> preview welcome",
587
- "<%= config.bin %> preview welcome --text",
588
- "<%= config.bin %> preview welcome --send me@example.com"
569
+ "<%= config.bin %> sdk",
570
+ "<%= config.bin %> sdk --sequence-id a1b2c3d4",
571
+ "<%= config.bin %> sdk --json"
589
572
  ],
590
573
  "flags": {
591
574
  "json": {
@@ -601,23 +584,17 @@
601
584
  "allowNo": false,
602
585
  "type": "boolean"
603
586
  },
604
- "send": {
605
- "description": "Send test email to this address",
606
- "name": "send",
587
+ "sequence-id": {
588
+ "description": "Limit output to a single active sequence by ID (default: all active sequences)",
589
+ "name": "sequence-id",
607
590
  "hasDynamicHelp": false,
608
591
  "multiple": false,
609
592
  "type": "option"
610
- },
611
- "text": {
612
- "description": "Output plain text version (for AI agents)",
613
- "name": "text",
614
- "allowNo": false,
615
- "type": "boolean"
616
593
  }
617
594
  },
618
595
  "hasDynamicHelp": false,
619
596
  "hiddenAliases": [],
620
- "id": "preview",
597
+ "id": "sdk",
621
598
  "pluginAlias": "@mailmodo/cli",
622
599
  "pluginName": "@mailmodo/cli",
623
600
  "pluginType": "core",
@@ -627,18 +604,18 @@
627
604
  "relativePath": [
628
605
  "dist",
629
606
  "commands",
630
- "preview",
607
+ "sdk",
631
608
  "index.js"
632
609
  ]
633
610
  },
634
- "sdk": {
611
+ "settings": {
635
612
  "aliases": [],
636
613
  "args": {},
637
- "description": "Show the SDK track() / identify() reference for deployed sequences",
614
+ "description": "View and update project settings",
638
615
  "examples": [
639
- "<%= config.bin %> sdk",
640
- "<%= config.bin %> sdk --sequence-id a1b2c3d4",
641
- "<%= config.bin %> sdk --json"
616
+ "<%= config.bin %> settings",
617
+ "<%= config.bin %> settings --set brand_color=#0F3460",
618
+ "<%= config.bin %> settings --json"
642
619
  ],
643
620
  "flags": {
644
621
  "json": {
@@ -654,9 +631,9 @@
654
631
  "allowNo": false,
655
632
  "type": "boolean"
656
633
  },
657
- "sequence-id": {
658
- "description": "Limit output to a single active sequence by ID (default: all active sequences)",
659
- "name": "sequence-id",
634
+ "set": {
635
+ "description": "Set a setting (format: key=value)",
636
+ "name": "set",
660
637
  "hasDynamicHelp": false,
661
638
  "multiple": false,
662
639
  "type": "option"
@@ -664,7 +641,7 @@
664
641
  },
665
642
  "hasDynamicHelp": false,
666
643
  "hiddenAliases": [],
667
- "id": "sdk",
644
+ "id": "settings",
668
645
  "pluginAlias": "@mailmodo/cli",
669
646
  "pluginName": "@mailmodo/cli",
670
647
  "pluginType": "core",
@@ -674,7 +651,7 @@
674
651
  "relativePath": [
675
652
  "dist",
676
653
  "commands",
677
- "sdk",
654
+ "settings",
678
655
  "index.js"
679
656
  ]
680
657
  },
@@ -717,14 +694,15 @@
717
694
  "index.js"
718
695
  ]
719
696
  },
720
- "settings": {
697
+ "logs": {
721
698
  "aliases": [],
722
699
  "args": {},
723
- "description": "View and update project settings",
700
+ "description": "View email send logs and delivery events",
724
701
  "examples": [
725
- "<%= config.bin %> settings",
726
- "<%= config.bin %> settings --set brand_color=#0F3460",
727
- "<%= config.bin %> settings --json"
702
+ "<%= config.bin %> logs",
703
+ "<%= config.bin %> logs --email sarah@example.com",
704
+ "<%= config.bin %> logs --failed",
705
+ "<%= config.bin %> logs --json"
728
706
  ],
729
707
  "flags": {
730
708
  "json": {
@@ -740,9 +718,31 @@
740
718
  "allowNo": false,
741
719
  "type": "boolean"
742
720
  },
743
- "set": {
744
- "description": "Set a setting (format: key=value)",
745
- "name": "set",
721
+ "email": {
722
+ "description": "Filter logs by contact email",
723
+ "name": "email",
724
+ "hasDynamicHelp": false,
725
+ "multiple": false,
726
+ "type": "option"
727
+ },
728
+ "failed": {
729
+ "description": "Show only failed/bounced events",
730
+ "name": "failed",
731
+ "allowNo": false,
732
+ "type": "boolean"
733
+ },
734
+ "limit": {
735
+ "description": "Entries per page (max 200)",
736
+ "name": "limit",
737
+ "default": 50,
738
+ "hasDynamicHelp": false,
739
+ "multiple": false,
740
+ "type": "option"
741
+ },
742
+ "page": {
743
+ "description": "Page number",
744
+ "name": "page",
745
+ "default": 1,
746
746
  "hasDynamicHelp": false,
747
747
  "multiple": false,
748
748
  "type": "option"
@@ -750,7 +750,7 @@
750
750
  },
751
751
  "hasDynamicHelp": false,
752
752
  "hiddenAliases": [],
753
- "id": "settings",
753
+ "id": "logs",
754
754
  "pluginAlias": "@mailmodo/cli",
755
755
  "pluginName": "@mailmodo/cli",
756
756
  "pluginType": "core",
@@ -760,10 +760,10 @@
760
760
  "relativePath": [
761
761
  "dist",
762
762
  "commands",
763
- "settings",
763
+ "logs",
764
764
  "index.js"
765
765
  ]
766
766
  }
767
767
  },
768
- "version": "0.0.51-beta.pr53.81"
768
+ "version": "0.0.51-beta.pr53.84"
769
769
  }
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.51-beta.pr53.81",
4
+ "version": "0.0.51-beta.pr53.84",
5
5
  "author": "provishalk",
6
6
  "bin": {
7
7
  "mailmodo": "bin/run.js"