@mailmodo/cli 0.0.58 → 0.0.59
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/config.js +4 -2
- package/oclif.manifest.json +177 -177
- package/package.json +1 -1
package/dist/lib/config.js
CHANGED
|
@@ -39,9 +39,11 @@ export async function loadConfig() {
|
|
|
39
39
|
export async function saveConfig(config) {
|
|
40
40
|
const dir = configDir();
|
|
41
41
|
if (!existsSync(dir)) {
|
|
42
|
-
await mkdir(dir, { recursive: true });
|
|
42
|
+
await mkdir(dir, { recursive: true, mode: 0o700 });
|
|
43
43
|
}
|
|
44
|
-
await writeFile(configFile(), JSON.stringify(config, null, 2)
|
|
44
|
+
await writeFile(configFile(), JSON.stringify(config, null, 2), {
|
|
45
|
+
mode: 0o600,
|
|
46
|
+
});
|
|
45
47
|
}
|
|
46
48
|
/**
|
|
47
49
|
* Deletes the saved CLI config file (~/.mailmodo/config), removing the stored API key.
|
package/oclif.manifest.json
CHANGED
|
@@ -380,52 +380,6 @@
|
|
|
380
380
|
"index.js"
|
|
381
381
|
]
|
|
382
382
|
},
|
|
383
|
-
"init": {
|
|
384
|
-
"aliases": [],
|
|
385
|
-
"args": {},
|
|
386
|
-
"description": "Analyze your product and generate email sequences",
|
|
387
|
-
"examples": [
|
|
388
|
-
"<%= config.bin %> init",
|
|
389
|
-
"<%= config.bin %> init --url https://myapp.com --yes"
|
|
390
|
-
],
|
|
391
|
-
"flags": {
|
|
392
|
-
"json": {
|
|
393
|
-
"description": "Output as JSON",
|
|
394
|
-
"name": "json",
|
|
395
|
-
"allowNo": false,
|
|
396
|
-
"type": "boolean"
|
|
397
|
-
},
|
|
398
|
-
"yes": {
|
|
399
|
-
"char": "y",
|
|
400
|
-
"description": "Skip confirmation prompts",
|
|
401
|
-
"name": "yes",
|
|
402
|
-
"allowNo": false,
|
|
403
|
-
"type": "boolean"
|
|
404
|
-
},
|
|
405
|
-
"url": {
|
|
406
|
-
"description": "Product URL to analyze",
|
|
407
|
-
"name": "url",
|
|
408
|
-
"hasDynamicHelp": false,
|
|
409
|
-
"multiple": false,
|
|
410
|
-
"type": "option"
|
|
411
|
-
}
|
|
412
|
-
},
|
|
413
|
-
"hasDynamicHelp": false,
|
|
414
|
-
"hiddenAliases": [],
|
|
415
|
-
"id": "init",
|
|
416
|
-
"pluginAlias": "@mailmodo/cli",
|
|
417
|
-
"pluginName": "@mailmodo/cli",
|
|
418
|
-
"pluginType": "core",
|
|
419
|
-
"strict": true,
|
|
420
|
-
"enableJsonFlag": false,
|
|
421
|
-
"isESM": true,
|
|
422
|
-
"relativePath": [
|
|
423
|
-
"dist",
|
|
424
|
-
"commands",
|
|
425
|
-
"init",
|
|
426
|
-
"index.js"
|
|
427
|
-
]
|
|
428
|
-
},
|
|
429
383
|
"login": {
|
|
430
384
|
"aliases": [],
|
|
431
385
|
"args": {},
|
|
@@ -631,6 +585,173 @@
|
|
|
631
585
|
"index.js"
|
|
632
586
|
]
|
|
633
587
|
},
|
|
588
|
+
"report": {
|
|
589
|
+
"aliases": [],
|
|
590
|
+
"args": {},
|
|
591
|
+
"description": "Fetch an email analytics report",
|
|
592
|
+
"examples": [
|
|
593
|
+
"<%= config.bin %> report --preset last7d",
|
|
594
|
+
"<%= config.bin %> report --preset last30d --group-by emailId",
|
|
595
|
+
"<%= config.bin %> report --from YYYY-MM-DD --to YYYY-MM-DD --output timeseries",
|
|
596
|
+
"<%= config.bin %> report --preset last7d --output entries --page 1",
|
|
597
|
+
"<%= config.bin %> report --preset last30d --sequence welcome-flow --event opened",
|
|
598
|
+
"<%= config.bin %> report --preset last7d --json"
|
|
599
|
+
],
|
|
600
|
+
"flags": {
|
|
601
|
+
"json": {
|
|
602
|
+
"description": "Output as JSON",
|
|
603
|
+
"name": "json",
|
|
604
|
+
"allowNo": false,
|
|
605
|
+
"type": "boolean"
|
|
606
|
+
},
|
|
607
|
+
"yes": {
|
|
608
|
+
"char": "y",
|
|
609
|
+
"description": "Skip confirmation prompts",
|
|
610
|
+
"name": "yes",
|
|
611
|
+
"allowNo": false,
|
|
612
|
+
"type": "boolean"
|
|
613
|
+
},
|
|
614
|
+
"contact": {
|
|
615
|
+
"description": "Filter by contact email (repeatable)",
|
|
616
|
+
"name": "contact",
|
|
617
|
+
"hasDynamicHelp": false,
|
|
618
|
+
"multiple": true,
|
|
619
|
+
"type": "option"
|
|
620
|
+
},
|
|
621
|
+
"email-id": {
|
|
622
|
+
"description": "Filter by email template ID (repeatable)",
|
|
623
|
+
"name": "email-id",
|
|
624
|
+
"hasDynamicHelp": false,
|
|
625
|
+
"multiple": true,
|
|
626
|
+
"type": "option"
|
|
627
|
+
},
|
|
628
|
+
"event": {
|
|
629
|
+
"description": "Filter by event type (repeatable)",
|
|
630
|
+
"name": "event",
|
|
631
|
+
"hasDynamicHelp": false,
|
|
632
|
+
"multiple": true,
|
|
633
|
+
"options": [
|
|
634
|
+
"bounced",
|
|
635
|
+
"clicked",
|
|
636
|
+
"complained",
|
|
637
|
+
"delivered",
|
|
638
|
+
"opened",
|
|
639
|
+
"sent",
|
|
640
|
+
"skipped",
|
|
641
|
+
"unsubscribed"
|
|
642
|
+
],
|
|
643
|
+
"type": "option"
|
|
644
|
+
},
|
|
645
|
+
"from": {
|
|
646
|
+
"description": "Start of time range, inclusive (YYYY-MM-DD)",
|
|
647
|
+
"exclusive": [
|
|
648
|
+
"preset"
|
|
649
|
+
],
|
|
650
|
+
"name": "from",
|
|
651
|
+
"hasDynamicHelp": false,
|
|
652
|
+
"multiple": false,
|
|
653
|
+
"type": "option"
|
|
654
|
+
},
|
|
655
|
+
"group-by": {
|
|
656
|
+
"description": "Group results by dimension",
|
|
657
|
+
"name": "group-by",
|
|
658
|
+
"default": "none",
|
|
659
|
+
"hasDynamicHelp": false,
|
|
660
|
+
"multiple": false,
|
|
661
|
+
"options": [
|
|
662
|
+
"contact",
|
|
663
|
+
"day",
|
|
664
|
+
"emailId",
|
|
665
|
+
"hour",
|
|
666
|
+
"none",
|
|
667
|
+
"sequenceId",
|
|
668
|
+
"status"
|
|
669
|
+
],
|
|
670
|
+
"type": "option"
|
|
671
|
+
},
|
|
672
|
+
"limit": {
|
|
673
|
+
"description": "Entries per page, max 200 (entries output only)",
|
|
674
|
+
"name": "limit",
|
|
675
|
+
"default": 50,
|
|
676
|
+
"hasDynamicHelp": false,
|
|
677
|
+
"multiple": false,
|
|
678
|
+
"type": "option"
|
|
679
|
+
},
|
|
680
|
+
"output": {
|
|
681
|
+
"description": "Output shape: summary | entries | timeseries",
|
|
682
|
+
"name": "output",
|
|
683
|
+
"default": "summary",
|
|
684
|
+
"hasDynamicHelp": false,
|
|
685
|
+
"multiple": false,
|
|
686
|
+
"options": [
|
|
687
|
+
"entries",
|
|
688
|
+
"summary",
|
|
689
|
+
"timeseries"
|
|
690
|
+
],
|
|
691
|
+
"type": "option"
|
|
692
|
+
},
|
|
693
|
+
"page": {
|
|
694
|
+
"description": "Page number (entries output only)",
|
|
695
|
+
"name": "page",
|
|
696
|
+
"default": 1,
|
|
697
|
+
"hasDynamicHelp": false,
|
|
698
|
+
"multiple": false,
|
|
699
|
+
"type": "option"
|
|
700
|
+
},
|
|
701
|
+
"preset": {
|
|
702
|
+
"description": "Relative time range preset",
|
|
703
|
+
"exclusive": [
|
|
704
|
+
"from",
|
|
705
|
+
"to"
|
|
706
|
+
],
|
|
707
|
+
"name": "preset",
|
|
708
|
+
"hasDynamicHelp": false,
|
|
709
|
+
"multiple": false,
|
|
710
|
+
"options": [
|
|
711
|
+
"last30d",
|
|
712
|
+
"last7d",
|
|
713
|
+
"last90d",
|
|
714
|
+
"lastMonth",
|
|
715
|
+
"thisMonth",
|
|
716
|
+
"today",
|
|
717
|
+
"yesterday"
|
|
718
|
+
],
|
|
719
|
+
"type": "option"
|
|
720
|
+
},
|
|
721
|
+
"sequence": {
|
|
722
|
+
"description": "Filter by sequence ID (repeatable)",
|
|
723
|
+
"name": "sequence",
|
|
724
|
+
"hasDynamicHelp": false,
|
|
725
|
+
"multiple": true,
|
|
726
|
+
"type": "option"
|
|
727
|
+
},
|
|
728
|
+
"to": {
|
|
729
|
+
"description": "End of time range, exclusive (YYYY-MM-DD)",
|
|
730
|
+
"exclusive": [
|
|
731
|
+
"preset"
|
|
732
|
+
],
|
|
733
|
+
"name": "to",
|
|
734
|
+
"hasDynamicHelp": false,
|
|
735
|
+
"multiple": false,
|
|
736
|
+
"type": "option"
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
"hasDynamicHelp": false,
|
|
740
|
+
"hiddenAliases": [],
|
|
741
|
+
"id": "report",
|
|
742
|
+
"pluginAlias": "@mailmodo/cli",
|
|
743
|
+
"pluginName": "@mailmodo/cli",
|
|
744
|
+
"pluginType": "core",
|
|
745
|
+
"strict": true,
|
|
746
|
+
"enableJsonFlag": false,
|
|
747
|
+
"isESM": true,
|
|
748
|
+
"relativePath": [
|
|
749
|
+
"dist",
|
|
750
|
+
"commands",
|
|
751
|
+
"report",
|
|
752
|
+
"index.js"
|
|
753
|
+
]
|
|
754
|
+
},
|
|
634
755
|
"sdk": {
|
|
635
756
|
"aliases": [],
|
|
636
757
|
"args": {},
|
|
@@ -764,17 +885,13 @@
|
|
|
764
885
|
"index.js"
|
|
765
886
|
]
|
|
766
887
|
},
|
|
767
|
-
"
|
|
888
|
+
"init": {
|
|
768
889
|
"aliases": [],
|
|
769
890
|
"args": {},
|
|
770
|
-
"description": "
|
|
891
|
+
"description": "Analyze your product and generate email sequences",
|
|
771
892
|
"examples": [
|
|
772
|
-
"<%= config.bin %>
|
|
773
|
-
"<%= config.bin %>
|
|
774
|
-
"<%= config.bin %> report --from YYYY-MM-DD --to YYYY-MM-DD --output timeseries",
|
|
775
|
-
"<%= config.bin %> report --preset last7d --output entries --page 1",
|
|
776
|
-
"<%= config.bin %> report --preset last30d --sequence welcome-flow --event opened",
|
|
777
|
-
"<%= config.bin %> report --preset last7d --json"
|
|
893
|
+
"<%= config.bin %> init",
|
|
894
|
+
"<%= config.bin %> init --url https://myapp.com --yes"
|
|
778
895
|
],
|
|
779
896
|
"flags": {
|
|
780
897
|
"json": {
|
|
@@ -790,126 +907,9 @@
|
|
|
790
907
|
"allowNo": false,
|
|
791
908
|
"type": "boolean"
|
|
792
909
|
},
|
|
793
|
-
"
|
|
794
|
-
"description": "
|
|
795
|
-
"name": "
|
|
796
|
-
"hasDynamicHelp": false,
|
|
797
|
-
"multiple": true,
|
|
798
|
-
"type": "option"
|
|
799
|
-
},
|
|
800
|
-
"email-id": {
|
|
801
|
-
"description": "Filter by email template ID (repeatable)",
|
|
802
|
-
"name": "email-id",
|
|
803
|
-
"hasDynamicHelp": false,
|
|
804
|
-
"multiple": true,
|
|
805
|
-
"type": "option"
|
|
806
|
-
},
|
|
807
|
-
"event": {
|
|
808
|
-
"description": "Filter by event type (repeatable)",
|
|
809
|
-
"name": "event",
|
|
810
|
-
"hasDynamicHelp": false,
|
|
811
|
-
"multiple": true,
|
|
812
|
-
"options": [
|
|
813
|
-
"bounced",
|
|
814
|
-
"clicked",
|
|
815
|
-
"complained",
|
|
816
|
-
"delivered",
|
|
817
|
-
"opened",
|
|
818
|
-
"sent",
|
|
819
|
-
"skipped",
|
|
820
|
-
"unsubscribed"
|
|
821
|
-
],
|
|
822
|
-
"type": "option"
|
|
823
|
-
},
|
|
824
|
-
"from": {
|
|
825
|
-
"description": "Start of time range, inclusive (YYYY-MM-DD)",
|
|
826
|
-
"exclusive": [
|
|
827
|
-
"preset"
|
|
828
|
-
],
|
|
829
|
-
"name": "from",
|
|
830
|
-
"hasDynamicHelp": false,
|
|
831
|
-
"multiple": false,
|
|
832
|
-
"type": "option"
|
|
833
|
-
},
|
|
834
|
-
"group-by": {
|
|
835
|
-
"description": "Group results by dimension",
|
|
836
|
-
"name": "group-by",
|
|
837
|
-
"default": "none",
|
|
838
|
-
"hasDynamicHelp": false,
|
|
839
|
-
"multiple": false,
|
|
840
|
-
"options": [
|
|
841
|
-
"contact",
|
|
842
|
-
"day",
|
|
843
|
-
"emailId",
|
|
844
|
-
"hour",
|
|
845
|
-
"none",
|
|
846
|
-
"sequenceId",
|
|
847
|
-
"status"
|
|
848
|
-
],
|
|
849
|
-
"type": "option"
|
|
850
|
-
},
|
|
851
|
-
"limit": {
|
|
852
|
-
"description": "Entries per page, max 200 (entries output only)",
|
|
853
|
-
"name": "limit",
|
|
854
|
-
"default": 50,
|
|
855
|
-
"hasDynamicHelp": false,
|
|
856
|
-
"multiple": false,
|
|
857
|
-
"type": "option"
|
|
858
|
-
},
|
|
859
|
-
"output": {
|
|
860
|
-
"description": "Output shape: summary | entries | timeseries",
|
|
861
|
-
"name": "output",
|
|
862
|
-
"default": "summary",
|
|
863
|
-
"hasDynamicHelp": false,
|
|
864
|
-
"multiple": false,
|
|
865
|
-
"options": [
|
|
866
|
-
"entries",
|
|
867
|
-
"summary",
|
|
868
|
-
"timeseries"
|
|
869
|
-
],
|
|
870
|
-
"type": "option"
|
|
871
|
-
},
|
|
872
|
-
"page": {
|
|
873
|
-
"description": "Page number (entries output only)",
|
|
874
|
-
"name": "page",
|
|
875
|
-
"default": 1,
|
|
876
|
-
"hasDynamicHelp": false,
|
|
877
|
-
"multiple": false,
|
|
878
|
-
"type": "option"
|
|
879
|
-
},
|
|
880
|
-
"preset": {
|
|
881
|
-
"description": "Relative time range preset",
|
|
882
|
-
"exclusive": [
|
|
883
|
-
"from",
|
|
884
|
-
"to"
|
|
885
|
-
],
|
|
886
|
-
"name": "preset",
|
|
887
|
-
"hasDynamicHelp": false,
|
|
888
|
-
"multiple": false,
|
|
889
|
-
"options": [
|
|
890
|
-
"last30d",
|
|
891
|
-
"last7d",
|
|
892
|
-
"last90d",
|
|
893
|
-
"lastMonth",
|
|
894
|
-
"thisMonth",
|
|
895
|
-
"today",
|
|
896
|
-
"yesterday"
|
|
897
|
-
],
|
|
898
|
-
"type": "option"
|
|
899
|
-
},
|
|
900
|
-
"sequence": {
|
|
901
|
-
"description": "Filter by sequence ID (repeatable)",
|
|
902
|
-
"name": "sequence",
|
|
903
|
-
"hasDynamicHelp": false,
|
|
904
|
-
"multiple": true,
|
|
905
|
-
"type": "option"
|
|
906
|
-
},
|
|
907
|
-
"to": {
|
|
908
|
-
"description": "End of time range, exclusive (YYYY-MM-DD)",
|
|
909
|
-
"exclusive": [
|
|
910
|
-
"preset"
|
|
911
|
-
],
|
|
912
|
-
"name": "to",
|
|
910
|
+
"url": {
|
|
911
|
+
"description": "Product URL to analyze",
|
|
912
|
+
"name": "url",
|
|
913
913
|
"hasDynamicHelp": false,
|
|
914
914
|
"multiple": false,
|
|
915
915
|
"type": "option"
|
|
@@ -917,7 +917,7 @@
|
|
|
917
917
|
},
|
|
918
918
|
"hasDynamicHelp": false,
|
|
919
919
|
"hiddenAliases": [],
|
|
920
|
-
"id": "
|
|
920
|
+
"id": "init",
|
|
921
921
|
"pluginAlias": "@mailmodo/cli",
|
|
922
922
|
"pluginName": "@mailmodo/cli",
|
|
923
923
|
"pluginType": "core",
|
|
@@ -927,10 +927,10 @@
|
|
|
927
927
|
"relativePath": [
|
|
928
928
|
"dist",
|
|
929
929
|
"commands",
|
|
930
|
-
"
|
|
930
|
+
"init",
|
|
931
931
|
"index.js"
|
|
932
932
|
]
|
|
933
933
|
}
|
|
934
934
|
},
|
|
935
|
-
"version": "0.0.
|
|
935
|
+
"version": "0.0.59"
|
|
936
936
|
}
|