@memberjunction/cli 6.2.0-edge.8 → 6.2.1

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.
Files changed (2) hide show
  1. package/oclif.manifest.json +690 -690
  2. package/package.json +28 -28
@@ -101,6 +101,62 @@
101
101
  "init.js"
102
102
  ]
103
103
  },
104
+ "ai": {
105
+ "aliases": [],
106
+ "args": {},
107
+ "description": "Execute AI agents and actions",
108
+ "flags": {},
109
+ "hasDynamicHelp": false,
110
+ "hidden": false,
111
+ "hiddenAliases": [],
112
+ "id": "ai",
113
+ "pluginAlias": "@memberjunction/cli",
114
+ "pluginName": "@memberjunction/cli",
115
+ "pluginType": "core",
116
+ "strict": true,
117
+ "enableJsonFlag": false,
118
+ "isESM": true,
119
+ "relativePath": [
120
+ "dist",
121
+ "commands",
122
+ "ai",
123
+ "index.js"
124
+ ]
125
+ },
126
+ "ai:usage": {
127
+ "aliases": [],
128
+ "args": {},
129
+ "description": "Show usage, flags, examples, and runtime hints for every `mj ai` command.",
130
+ "flags": {
131
+ "format": {
132
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
133
+ "name": "format",
134
+ "hasDynamicHelp": false,
135
+ "multiple": false,
136
+ "options": [
137
+ "text",
138
+ "json",
139
+ "md"
140
+ ],
141
+ "type": "option"
142
+ }
143
+ },
144
+ "hasDynamicHelp": false,
145
+ "hiddenAliases": [],
146
+ "id": "ai:usage",
147
+ "pluginAlias": "@memberjunction/cli",
148
+ "pluginName": "@memberjunction/cli",
149
+ "pluginType": "core",
150
+ "strict": true,
151
+ "enableJsonFlag": false,
152
+ "isESM": true,
153
+ "relativePath": [
154
+ "dist",
155
+ "commands",
156
+ "ai",
157
+ "usage.js"
158
+ ]
159
+ },
104
160
  "app:check-updates": {
105
161
  "aliases": [],
106
162
  "args": {},
@@ -466,62 +522,6 @@
466
522
  "usage.js"
467
523
  ]
468
524
  },
469
- "ai": {
470
- "aliases": [],
471
- "args": {},
472
- "description": "Execute AI agents and actions",
473
- "flags": {},
474
- "hasDynamicHelp": false,
475
- "hidden": false,
476
- "hiddenAliases": [],
477
- "id": "ai",
478
- "pluginAlias": "@memberjunction/cli",
479
- "pluginName": "@memberjunction/cli",
480
- "pluginType": "core",
481
- "strict": true,
482
- "enableJsonFlag": false,
483
- "isESM": true,
484
- "relativePath": [
485
- "dist",
486
- "commands",
487
- "ai",
488
- "index.js"
489
- ]
490
- },
491
- "ai:usage": {
492
- "aliases": [],
493
- "args": {},
494
- "description": "Show usage, flags, examples, and runtime hints for every `mj ai` command.",
495
- "flags": {
496
- "format": {
497
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
498
- "name": "format",
499
- "hasDynamicHelp": false,
500
- "multiple": false,
501
- "options": [
502
- "text",
503
- "json",
504
- "md"
505
- ],
506
- "type": "option"
507
- }
508
- },
509
- "hasDynamicHelp": false,
510
- "hiddenAliases": [],
511
- "id": "ai:usage",
512
- "pluginAlias": "@memberjunction/cli",
513
- "pluginName": "@memberjunction/cli",
514
- "pluginType": "core",
515
- "strict": true,
516
- "enableJsonFlag": false,
517
- "isESM": true,
518
- "relativePath": [
519
- "dist",
520
- "commands",
521
- "ai",
522
- "usage.js"
523
- ]
524
- },
525
525
  "artifacts:reclassify": {
526
526
  "aliases": [],
527
527
  "args": {},
@@ -617,65 +617,92 @@
617
617
  "usage.js"
618
618
  ]
619
619
  },
620
- "bump": {
620
+ "baseline:build": {
621
621
  "aliases": [],
622
622
  "args": {},
623
- "description": "Bumps MemberJunction dependency versions",
623
+ "description": "Generate a deterministic baseline SQL script from the END-STATE of a migrated MSSQL database.",
624
624
  "examples": [
625
- {
626
- "command": "<%= config.bin %> <%= command.id %>",
627
- "description": "Bump all @memberjunction/* dependencies in the current directory's package.json to the CLI version"
628
- },
629
- {
630
- "command": "<%= config.bin %> <%= command.id %> -rdv",
631
- "description": "Preview all recursive packages bumps without writing any changes."
632
- },
633
- {
634
- "command": "<%= config.bin %> <%= command.id %> -rqt v2.10.0 | xargs -n1 -I{} npm install --prefix {}",
635
- "description": "Recursively bump all @memberjunction/* dependencies in all packages to version v2.10.0 and output only the paths containing the updated package.json files. Pipe the output to xargs to run npm install in each directory and update the package-lock.json files as well."
636
- }
625
+ "<%= config.bin %> <%= command.id %> --out ./migrations/v5/ # auto: within-major rebaseline",
626
+ "<%= config.bin %> <%= command.id %> --source-dir ./migrations/v5 --out ./migrations/v5/",
627
+ "<%= config.bin %> <%= command.id %> --baseline-version 6.0 --out ./migrations/v6/ # explicit major-boundary",
628
+ "<%= config.bin %> <%= command.id %> --baseline-version 5.32 --database MJ_BL_Stack --out /tmp/baseline/"
637
629
  ],
638
630
  "flags": {
639
- "verbose": {
640
- "char": "v",
641
- "description": "Enable additional logging",
642
- "name": "verbose",
643
- "allowNo": false,
644
- "type": "boolean"
631
+ "baseline-version": {
632
+ "description": "Baseline version stamp in Major.Minor format (literal x is appended for patch, matching the V-file convention). Omit to auto-detect from --source-dir (within-major rebaseline mode).",
633
+ "name": "baseline-version",
634
+ "hasDynamicHelp": false,
635
+ "multiple": false,
636
+ "type": "option"
645
637
  },
646
- "recursive": {
647
- "char": "r",
648
- "description": "Bump version in current directory and all subdirectories",
649
- "name": "recursive",
650
- "allowNo": false,
651
- "type": "boolean"
638
+ "source-dir": {
639
+ "description": "Migrations source directory (e.g. ./migrations/v5). Used to auto-detect the next baseline version + timestamp when --baseline-version is omitted. Defaults to the highest migrations/v*/ directory walked up from cwd.",
640
+ "name": "source-dir",
641
+ "hasDynamicHelp": false,
642
+ "multiple": false,
643
+ "type": "option"
652
644
  },
653
- "tag": {
654
- "char": "t",
655
- "description": "Version tag to bump target for bump (e.g. v2.10.0), defaults to the CLI version",
656
- "name": "tag",
645
+ "description": {
646
+ "description": "Human-readable description embedded in the file header.",
647
+ "name": "description",
648
+ "default": "MemberJunction Baseline",
657
649
  "hasDynamicHelp": false,
658
650
  "multiple": false,
659
651
  "type": "option"
660
652
  },
661
- "quiet": {
662
- "char": "q",
663
- "description": "Only output paths for updated packages",
664
- "name": "quiet",
653
+ "database": {
654
+ "description": "Override database name (host/user/password come from MJ config).",
655
+ "name": "database",
656
+ "hasDynamicHelp": false,
657
+ "multiple": false,
658
+ "type": "option"
659
+ },
660
+ "out": {
661
+ "description": "Output directory. Filename is auto-generated.",
662
+ "name": "out",
663
+ "default": ".",
664
+ "hasDynamicHelp": false,
665
+ "multiple": false,
666
+ "type": "option"
667
+ },
668
+ "exclude-data": {
669
+ "description": "Comma-separated list of tables (schema-qualified or not) to skip data dump for.",
670
+ "name": "exclude-data",
671
+ "default": "",
672
+ "hasDynamicHelp": false,
673
+ "multiple": false,
674
+ "type": "option"
675
+ },
676
+ "batch-size": {
677
+ "description": "Rows per INSERT batch.",
678
+ "name": "batch-size",
679
+ "default": 1000,
680
+ "hasDynamicHelp": false,
681
+ "multiple": false,
682
+ "type": "option"
683
+ },
684
+ "no-data": {
685
+ "description": "Emit schema only, no data inserts.",
686
+ "name": "no-data",
665
687
  "allowNo": false,
666
688
  "type": "boolean"
667
689
  },
668
- "dry": {
669
- "char": "d",
670
- "description": "Dry run, do not write changes to package.json files",
671
- "name": "dry",
690
+ "verbose": {
691
+ "description": "Print per-object progress.",
692
+ "name": "verbose",
693
+ "allowNo": false,
694
+ "type": "boolean"
695
+ },
696
+ "dry-run": {
697
+ "description": "Print to stdout instead of writing a file.",
698
+ "name": "dry-run",
672
699
  "allowNo": false,
673
700
  "type": "boolean"
674
701
  }
675
702
  },
676
703
  "hasDynamicHelp": false,
677
704
  "hiddenAliases": [],
678
- "id": "bump",
705
+ "id": "baseline:build",
679
706
  "pluginAlias": "@memberjunction/cli",
680
707
  "pluginName": "@memberjunction/cli",
681
708
  "pluginType": "core",
@@ -685,277 +712,24 @@
685
712
  "relativePath": [
686
713
  "dist",
687
714
  "commands",
688
- "bump",
689
- "index.js"
715
+ "baseline",
716
+ "build.js"
690
717
  ]
691
718
  },
692
- "bump:usage": {
719
+ "baseline:compare": {
693
720
  "aliases": [],
694
721
  "args": {},
695
- "description": "Show usage, flags, examples, and runtime hints for every `mj bump` command.",
722
+ "description": "Deterministically compare two databases object-by-object and row-by-row.",
723
+ "examples": [
724
+ "<%= config.bin %> <%= command.id %> --left MJ_BL_Stack --right MJ_BL_New",
725
+ "<%= config.bin %> <%= command.id %> --left A --right B --row-compare counts",
726
+ "<%= config.bin %> <%= command.id %> --left A --right B --fail-on-diff --out ./diffs/"
727
+ ],
696
728
  "flags": {
697
- "format": {
698
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
699
- "name": "format",
700
- "hasDynamicHelp": false,
701
- "multiple": false,
702
- "options": [
703
- "text",
704
- "json",
705
- "md"
706
- ],
707
- "type": "option"
708
- }
709
- },
710
- "hasDynamicHelp": false,
711
- "hiddenAliases": [],
712
- "id": "bump:usage",
713
- "pluginAlias": "@memberjunction/cli",
714
- "pluginName": "@memberjunction/cli",
715
- "pluginType": "core",
716
- "strict": true,
717
- "enableJsonFlag": false,
718
- "isESM": true,
719
- "relativePath": [
720
- "dist",
721
- "commands",
722
- "bump",
723
- "usage.js"
724
- ]
725
- },
726
- "bundle": {
727
- "aliases": [],
728
- "args": {},
729
- "description": "Create a self-contained MemberJunction distribution zip for offline/air-gapped installs",
730
- "examples": [
731
- "<%= config.bin %> <%= command.id %> --out ./mj-install.zip",
732
- "<%= config.bin %> <%= command.id %> --tag v5.38.0 --out ./mj-install.zip",
733
- "<%= config.bin %> <%= command.id %> --source . --out ./mj-install.zip",
734
- "<%= config.bin %> <%= command.id %> --tag v5.38.0 --with-migrations --out ./mj-install.zip",
735
- "<%= config.bin %> <%= command.id %> --with-migrations --db-platform postgresql --out ./mj-install.zip"
736
- ],
737
- "flags": {
738
- "out": {
739
- "char": "o",
740
- "description": "Output zip path",
741
- "name": "out",
742
- "required": true,
743
- "hasDynamicHelp": false,
744
- "multiple": false,
745
- "type": "option"
746
- },
747
- "tag": {
748
- "char": "t",
749
- "description": "Release tag to bundle (e.g. v5.38.0). Defaults to the latest branch tip.",
750
- "name": "tag",
751
- "hasDynamicHelp": false,
752
- "multiple": false,
753
- "type": "option"
754
- },
755
- "source": {
756
- "description": "Bundle from a local working-tree directory instead of fetching from the repo",
757
- "name": "source",
758
- "hasDynamicHelp": false,
759
- "multiple": false,
760
- "type": "option"
761
- },
762
- "with-migrations": {
763
- "description": "Include the migration tree(s) so an air-gapped \"mj migrate\" can run offline. Ships both SQL Server and PostgreSQL trees by default.",
764
- "name": "with-migrations",
765
- "allowNo": false,
766
- "type": "boolean"
767
- },
768
- "db-platform": {
769
- "dependsOn": [
770
- "with-migrations"
771
- ],
772
- "description": "With --with-migrations, ship only this platform's migration tree instead of both",
773
- "name": "db-platform",
774
- "hasDynamicHelp": false,
775
- "multiple": false,
776
- "options": [
777
- "sqlserver",
778
- "postgresql"
779
- ],
780
- "type": "option"
781
- },
782
- "no-claude-pack": {
783
- "description": "Exclude the Claude Code pack (CLAUDE.md + .claude/) from the bundle. By default the pack is included so air-gapped installs get the same out-of-the-box Claude experience as online installs.",
784
- "name": "no-claude-pack",
785
- "allowNo": false,
786
- "type": "boolean"
787
- },
788
- "verbose": {
789
- "char": "v",
790
- "description": "Show detailed output",
791
- "name": "verbose",
792
- "allowNo": false,
793
- "type": "boolean"
794
- }
795
- },
796
- "hasDynamicHelp": false,
797
- "hiddenAliases": [],
798
- "id": "bundle",
799
- "pluginAlias": "@memberjunction/cli",
800
- "pluginName": "@memberjunction/cli",
801
- "pluginType": "core",
802
- "strict": true,
803
- "enableJsonFlag": false,
804
- "isESM": true,
805
- "relativePath": [
806
- "dist",
807
- "commands",
808
- "bundle",
809
- "index.js"
810
- ]
811
- },
812
- "bundle:usage": {
813
- "aliases": [],
814
- "args": {},
815
- "description": "Show usage, flags, examples, and runtime hints for every `mj bundle` command.",
816
- "flags": {
817
- "format": {
818
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
819
- "name": "format",
820
- "hasDynamicHelp": false,
821
- "multiple": false,
822
- "options": [
823
- "text",
824
- "json",
825
- "md"
826
- ],
827
- "type": "option"
828
- }
829
- },
830
- "hasDynamicHelp": false,
831
- "hiddenAliases": [],
832
- "id": "bundle:usage",
833
- "pluginAlias": "@memberjunction/cli",
834
- "pluginName": "@memberjunction/cli",
835
- "pluginType": "core",
836
- "strict": true,
837
- "enableJsonFlag": false,
838
- "isESM": true,
839
- "relativePath": [
840
- "dist",
841
- "commands",
842
- "bundle",
843
- "usage.js"
844
- ]
845
- },
846
- "baseline:build": {
847
- "aliases": [],
848
- "args": {},
849
- "description": "Generate a deterministic baseline SQL script from the END-STATE of a migrated MSSQL database.",
850
- "examples": [
851
- "<%= config.bin %> <%= command.id %> --out ./migrations/v5/ # auto: within-major rebaseline",
852
- "<%= config.bin %> <%= command.id %> --source-dir ./migrations/v5 --out ./migrations/v5/",
853
- "<%= config.bin %> <%= command.id %> --baseline-version 6.0 --out ./migrations/v6/ # explicit major-boundary",
854
- "<%= config.bin %> <%= command.id %> --baseline-version 5.32 --database MJ_BL_Stack --out /tmp/baseline/"
855
- ],
856
- "flags": {
857
- "baseline-version": {
858
- "description": "Baseline version stamp in Major.Minor format (literal x is appended for patch, matching the V-file convention). Omit to auto-detect from --source-dir (within-major rebaseline mode).",
859
- "name": "baseline-version",
860
- "hasDynamicHelp": false,
861
- "multiple": false,
862
- "type": "option"
863
- },
864
- "source-dir": {
865
- "description": "Migrations source directory (e.g. ./migrations/v5). Used to auto-detect the next baseline version + timestamp when --baseline-version is omitted. Defaults to the highest migrations/v*/ directory walked up from cwd.",
866
- "name": "source-dir",
867
- "hasDynamicHelp": false,
868
- "multiple": false,
869
- "type": "option"
870
- },
871
- "description": {
872
- "description": "Human-readable description embedded in the file header.",
873
- "name": "description",
874
- "default": "MemberJunction Baseline",
875
- "hasDynamicHelp": false,
876
- "multiple": false,
877
- "type": "option"
878
- },
879
- "database": {
880
- "description": "Override database name (host/user/password come from MJ config).",
881
- "name": "database",
882
- "hasDynamicHelp": false,
883
- "multiple": false,
884
- "type": "option"
885
- },
886
- "out": {
887
- "description": "Output directory. Filename is auto-generated.",
888
- "name": "out",
889
- "default": ".",
890
- "hasDynamicHelp": false,
891
- "multiple": false,
892
- "type": "option"
893
- },
894
- "exclude-data": {
895
- "description": "Comma-separated list of tables (schema-qualified or not) to skip data dump for.",
896
- "name": "exclude-data",
897
- "default": "",
898
- "hasDynamicHelp": false,
899
- "multiple": false,
900
- "type": "option"
901
- },
902
- "batch-size": {
903
- "description": "Rows per INSERT batch.",
904
- "name": "batch-size",
905
- "default": 1000,
906
- "hasDynamicHelp": false,
907
- "multiple": false,
908
- "type": "option"
909
- },
910
- "no-data": {
911
- "description": "Emit schema only, no data inserts.",
912
- "name": "no-data",
913
- "allowNo": false,
914
- "type": "boolean"
915
- },
916
- "verbose": {
917
- "description": "Print per-object progress.",
918
- "name": "verbose",
919
- "allowNo": false,
920
- "type": "boolean"
921
- },
922
- "dry-run": {
923
- "description": "Print to stdout instead of writing a file.",
924
- "name": "dry-run",
925
- "allowNo": false,
926
- "type": "boolean"
927
- }
928
- },
929
- "hasDynamicHelp": false,
930
- "hiddenAliases": [],
931
- "id": "baseline:build",
932
- "pluginAlias": "@memberjunction/cli",
933
- "pluginName": "@memberjunction/cli",
934
- "pluginType": "core",
935
- "strict": true,
936
- "enableJsonFlag": false,
937
- "isESM": true,
938
- "relativePath": [
939
- "dist",
940
- "commands",
941
- "baseline",
942
- "build.js"
943
- ]
944
- },
945
- "baseline:compare": {
946
- "aliases": [],
947
- "args": {},
948
- "description": "Deterministically compare two databases object-by-object and row-by-row.",
949
- "examples": [
950
- "<%= config.bin %> <%= command.id %> --left MJ_BL_Stack --right MJ_BL_New",
951
- "<%= config.bin %> <%= command.id %> --left A --right B --row-compare counts",
952
- "<%= config.bin %> <%= command.id %> --left A --right B --fail-on-diff --out ./diffs/"
953
- ],
954
- "flags": {
955
- "left": {
956
- "description": "Left database name (override).",
957
- "name": "left",
958
- "required": true,
729
+ "left": {
730
+ "description": "Left database name (override).",
731
+ "name": "left",
732
+ "required": true,
959
733
  "hasDynamicHelp": false,
960
734
  "multiple": false,
961
735
  "type": "option"
@@ -1215,27 +989,253 @@
1215
989
  "usage.js"
1216
990
  ]
1217
991
  },
1218
- "cache:clear": {
992
+ "bump": {
1219
993
  "aliases": [],
1220
994
  "args": {},
1221
- "description": "Clear the shared Redis cache (REDIS_URL) so every running server reloads from the database",
995
+ "description": "Bumps MemberJunction dependency versions",
1222
996
  "examples": [
1223
997
  {
1224
998
  "command": "<%= config.bin %> <%= command.id %>",
1225
- "description": "Clear RunView, dataset and metadata caches"
999
+ "description": "Bump all @memberjunction/* dependencies in the current directory's package.json to the CLI version"
1226
1000
  },
1227
1001
  {
1228
- "command": "<%= config.bin %> <%= command.id %> --dry-run",
1229
- "description": "Show the target and key counts; delete nothing"
1002
+ "command": "<%= config.bin %> <%= command.id %> -rdv",
1003
+ "description": "Preview all recursive packages bumps without writing any changes."
1230
1004
  },
1231
1005
  {
1232
- "command": "<%= config.bin %> <%= command.id %> --category RunViewCache",
1233
- "description": "Clear one category"
1006
+ "command": "<%= config.bin %> <%= command.id %> -rqt v2.10.0 | xargs -n1 -I{} npm install --prefix {}",
1007
+ "description": "Recursively bump all @memberjunction/* dependencies in all packages to version v2.10.0 and output only the paths containing the updated package.json files. Pipe the output to xargs to run npm install in each directory and update the package-lock.json files as well."
1234
1008
  }
1235
1009
  ],
1236
1010
  "flags": {
1237
- "dry-run": {
1238
- "description": "Report the target and how many keys each category holds, without deleting or notifying",
1011
+ "verbose": {
1012
+ "char": "v",
1013
+ "description": "Enable additional logging",
1014
+ "name": "verbose",
1015
+ "allowNo": false,
1016
+ "type": "boolean"
1017
+ },
1018
+ "recursive": {
1019
+ "char": "r",
1020
+ "description": "Bump version in current directory and all subdirectories",
1021
+ "name": "recursive",
1022
+ "allowNo": false,
1023
+ "type": "boolean"
1024
+ },
1025
+ "tag": {
1026
+ "char": "t",
1027
+ "description": "Version tag to bump target for bump (e.g. v2.10.0), defaults to the CLI version",
1028
+ "name": "tag",
1029
+ "hasDynamicHelp": false,
1030
+ "multiple": false,
1031
+ "type": "option"
1032
+ },
1033
+ "quiet": {
1034
+ "char": "q",
1035
+ "description": "Only output paths for updated packages",
1036
+ "name": "quiet",
1037
+ "allowNo": false,
1038
+ "type": "boolean"
1039
+ },
1040
+ "dry": {
1041
+ "char": "d",
1042
+ "description": "Dry run, do not write changes to package.json files",
1043
+ "name": "dry",
1044
+ "allowNo": false,
1045
+ "type": "boolean"
1046
+ }
1047
+ },
1048
+ "hasDynamicHelp": false,
1049
+ "hiddenAliases": [],
1050
+ "id": "bump",
1051
+ "pluginAlias": "@memberjunction/cli",
1052
+ "pluginName": "@memberjunction/cli",
1053
+ "pluginType": "core",
1054
+ "strict": true,
1055
+ "enableJsonFlag": false,
1056
+ "isESM": true,
1057
+ "relativePath": [
1058
+ "dist",
1059
+ "commands",
1060
+ "bump",
1061
+ "index.js"
1062
+ ]
1063
+ },
1064
+ "bump:usage": {
1065
+ "aliases": [],
1066
+ "args": {},
1067
+ "description": "Show usage, flags, examples, and runtime hints for every `mj bump` command.",
1068
+ "flags": {
1069
+ "format": {
1070
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
1071
+ "name": "format",
1072
+ "hasDynamicHelp": false,
1073
+ "multiple": false,
1074
+ "options": [
1075
+ "text",
1076
+ "json",
1077
+ "md"
1078
+ ],
1079
+ "type": "option"
1080
+ }
1081
+ },
1082
+ "hasDynamicHelp": false,
1083
+ "hiddenAliases": [],
1084
+ "id": "bump:usage",
1085
+ "pluginAlias": "@memberjunction/cli",
1086
+ "pluginName": "@memberjunction/cli",
1087
+ "pluginType": "core",
1088
+ "strict": true,
1089
+ "enableJsonFlag": false,
1090
+ "isESM": true,
1091
+ "relativePath": [
1092
+ "dist",
1093
+ "commands",
1094
+ "bump",
1095
+ "usage.js"
1096
+ ]
1097
+ },
1098
+ "bundle": {
1099
+ "aliases": [],
1100
+ "args": {},
1101
+ "description": "Create a self-contained MemberJunction distribution zip for offline/air-gapped installs",
1102
+ "examples": [
1103
+ "<%= config.bin %> <%= command.id %> --out ./mj-install.zip",
1104
+ "<%= config.bin %> <%= command.id %> --tag v5.38.0 --out ./mj-install.zip",
1105
+ "<%= config.bin %> <%= command.id %> --source . --out ./mj-install.zip",
1106
+ "<%= config.bin %> <%= command.id %> --tag v5.38.0 --with-migrations --out ./mj-install.zip",
1107
+ "<%= config.bin %> <%= command.id %> --with-migrations --db-platform postgresql --out ./mj-install.zip"
1108
+ ],
1109
+ "flags": {
1110
+ "out": {
1111
+ "char": "o",
1112
+ "description": "Output zip path",
1113
+ "name": "out",
1114
+ "required": true,
1115
+ "hasDynamicHelp": false,
1116
+ "multiple": false,
1117
+ "type": "option"
1118
+ },
1119
+ "tag": {
1120
+ "char": "t",
1121
+ "description": "Release tag to bundle (e.g. v5.38.0). Defaults to the latest branch tip.",
1122
+ "name": "tag",
1123
+ "hasDynamicHelp": false,
1124
+ "multiple": false,
1125
+ "type": "option"
1126
+ },
1127
+ "source": {
1128
+ "description": "Bundle from a local working-tree directory instead of fetching from the repo",
1129
+ "name": "source",
1130
+ "hasDynamicHelp": false,
1131
+ "multiple": false,
1132
+ "type": "option"
1133
+ },
1134
+ "with-migrations": {
1135
+ "description": "Include the migration tree(s) so an air-gapped \"mj migrate\" can run offline. Ships both SQL Server and PostgreSQL trees by default.",
1136
+ "name": "with-migrations",
1137
+ "allowNo": false,
1138
+ "type": "boolean"
1139
+ },
1140
+ "db-platform": {
1141
+ "dependsOn": [
1142
+ "with-migrations"
1143
+ ],
1144
+ "description": "With --with-migrations, ship only this platform's migration tree instead of both",
1145
+ "name": "db-platform",
1146
+ "hasDynamicHelp": false,
1147
+ "multiple": false,
1148
+ "options": [
1149
+ "sqlserver",
1150
+ "postgresql"
1151
+ ],
1152
+ "type": "option"
1153
+ },
1154
+ "no-claude-pack": {
1155
+ "description": "Exclude the Claude Code pack (CLAUDE.md + .claude/) from the bundle. By default the pack is included so air-gapped installs get the same out-of-the-box Claude experience as online installs.",
1156
+ "name": "no-claude-pack",
1157
+ "allowNo": false,
1158
+ "type": "boolean"
1159
+ },
1160
+ "verbose": {
1161
+ "char": "v",
1162
+ "description": "Show detailed output",
1163
+ "name": "verbose",
1164
+ "allowNo": false,
1165
+ "type": "boolean"
1166
+ }
1167
+ },
1168
+ "hasDynamicHelp": false,
1169
+ "hiddenAliases": [],
1170
+ "id": "bundle",
1171
+ "pluginAlias": "@memberjunction/cli",
1172
+ "pluginName": "@memberjunction/cli",
1173
+ "pluginType": "core",
1174
+ "strict": true,
1175
+ "enableJsonFlag": false,
1176
+ "isESM": true,
1177
+ "relativePath": [
1178
+ "dist",
1179
+ "commands",
1180
+ "bundle",
1181
+ "index.js"
1182
+ ]
1183
+ },
1184
+ "bundle:usage": {
1185
+ "aliases": [],
1186
+ "args": {},
1187
+ "description": "Show usage, flags, examples, and runtime hints for every `mj bundle` command.",
1188
+ "flags": {
1189
+ "format": {
1190
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
1191
+ "name": "format",
1192
+ "hasDynamicHelp": false,
1193
+ "multiple": false,
1194
+ "options": [
1195
+ "text",
1196
+ "json",
1197
+ "md"
1198
+ ],
1199
+ "type": "option"
1200
+ }
1201
+ },
1202
+ "hasDynamicHelp": false,
1203
+ "hiddenAliases": [],
1204
+ "id": "bundle:usage",
1205
+ "pluginAlias": "@memberjunction/cli",
1206
+ "pluginName": "@memberjunction/cli",
1207
+ "pluginType": "core",
1208
+ "strict": true,
1209
+ "enableJsonFlag": false,
1210
+ "isESM": true,
1211
+ "relativePath": [
1212
+ "dist",
1213
+ "commands",
1214
+ "bundle",
1215
+ "usage.js"
1216
+ ]
1217
+ },
1218
+ "cache:clear": {
1219
+ "aliases": [],
1220
+ "args": {},
1221
+ "description": "Clear the shared Redis cache (REDIS_URL) so every running server reloads from the database",
1222
+ "examples": [
1223
+ {
1224
+ "command": "<%= config.bin %> <%= command.id %>",
1225
+ "description": "Clear RunView, dataset and metadata caches"
1226
+ },
1227
+ {
1228
+ "command": "<%= config.bin %> <%= command.id %> --dry-run",
1229
+ "description": "Show the target and key counts; delete nothing"
1230
+ },
1231
+ {
1232
+ "command": "<%= config.bin %> <%= command.id %> --category RunViewCache",
1233
+ "description": "Clear one category"
1234
+ }
1235
+ ],
1236
+ "flags": {
1237
+ "dry-run": {
1238
+ "description": "Report the target and how many keys each category holds, without deleting or notifying",
1239
1239
  "name": "dry-run",
1240
1240
  "allowNo": false,
1241
1241
  "type": "boolean"
@@ -2968,98 +2968,106 @@
2968
2968
  "usage.js"
2969
2969
  ]
2970
2970
  },
2971
- "migrate:convert": {
2971
+ "install:claude": {
2972
2972
  "aliases": [],
2973
2973
  "args": {},
2974
- "description": "Convert T-SQL migrations to PostgreSQL",
2974
+ "description": "Install or refresh the Claude Code pack in the current directory.",
2975
2975
  "examples": [
2976
- "<%= config.bin %> migrate convert --split",
2977
- "<%= config.bin %> migrate convert --split --dry-run",
2978
- "<%= config.bin %> migrate convert --split --file V202604060452__v5.24.x__KnowledgeHub.sql",
2979
- "<%= config.bin %> migrate convert --source-dir ./migrations/v5 --output-dir ./migrations-pg/v5",
2980
- "<%= config.bin %> migrate convert --verbose"
2976
+ "<%= config.bin %> install:claude",
2977
+ "<%= config.bin %> install:claude --dry-run",
2978
+ "<%= config.bin %> install:claude --from ./local-pack",
2979
+ "<%= config.bin %> install:claude --json"
2981
2980
  ],
2982
2981
  "flags": {
2983
- "source-dir": {
2984
- "description": "Source T-SQL migrations directory",
2985
- "name": "source-dir",
2986
- "default": "./migrations/v5",
2982
+ "dir": {
2983
+ "description": "Target directory for the install",
2984
+ "name": "dir",
2985
+ "default": ".",
2987
2986
  "hasDynamicHelp": false,
2988
2987
  "multiple": false,
2989
2988
  "type": "option"
2990
2989
  },
2991
- "output-dir": {
2992
- "description": "Output PG migrations directory",
2993
- "name": "output-dir",
2994
- "default": "./migrations-pg/v5",
2990
+ "major": {
2991
+ "description": "Force a specific MJ major (default: detected from package.json)",
2992
+ "name": "major",
2995
2993
  "hasDynamicHelp": false,
2996
2994
  "multiple": false,
2997
2995
  "type": "option"
2998
2996
  },
2999
- "file": {
3000
- "description": "Convert a specific file (filename only, looked up in source-dir)",
3001
- "name": "file",
2997
+ "ref": {
2998
+ "description": "Git ref to fetch from (branch or tag). Default: main.",
2999
+ "name": "ref",
3002
3000
  "hasDynamicHelp": false,
3003
3001
  "multiple": false,
3004
3002
  "type": "option"
3005
3003
  },
3006
- "schema": {
3007
- "description": "Target schema name",
3008
- "name": "schema",
3009
- "default": "__mj",
3004
+ "from": {
3005
+ "description": "Use a local pack source instead of fetching from GitHub",
3006
+ "name": "from",
3010
3007
  "hasDynamicHelp": false,
3011
3008
  "multiple": false,
3012
3009
  "type": "option"
3013
3010
  },
3014
- "core-schema": {
3015
- "description": "MJ core schema substituted for ${mjSchema} (default __mj). Distinct from --schema, which is the app's OWN schema: an Open App migration references core as ${mjSchema} and itself as ${flyway:defaultSchema}, and for every app those differ.",
3016
- "name": "core-schema",
3017
- "default": "__mj",
3018
- "hasDynamicHelp": false,
3019
- "multiple": false,
3020
- "type": "option"
3011
+ "offline": {
3012
+ "description": "Forbid network; requires --from <path>",
3013
+ "name": "offline",
3014
+ "allowNo": false,
3015
+ "type": "boolean"
3021
3016
  },
3022
3017
  "dry-run": {
3023
- "description": "Show what would be converted without writing files",
3018
+ "description": "Print what would be written; change nothing",
3024
3019
  "name": "dry-run",
3025
3020
  "allowNo": false,
3026
3021
  "type": "boolean"
3027
3022
  },
3028
- "no-header": {
3029
- "description": "Skip PG header (extensions, schema, implicit cast)",
3030
- "name": "no-header",
3023
+ "yes": {
3024
+ "char": "y",
3025
+ "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
3026
+ "name": "yes",
3031
3027
  "allowNo": false,
3032
3028
  "type": "boolean"
3033
3029
  },
3034
- "verbose": {
3035
- "char": "v",
3036
- "description": "Show per-statement progress",
3037
- "name": "verbose",
3030
+ "force": {
3031
+ "description": "Overwrite user-customized commands/skills (saves .bak files)",
3032
+ "name": "force",
3038
3033
  "allowNo": false,
3039
3034
  "type": "boolean"
3040
3035
  },
3041
- "split": {
3042
- "description": "Split-and-regenerate (the standard path): transpile only hand-written DDL via the AST dialect; CodeGen objects are regenerated by `mj codegen` and mj-sync metadata re-seeded by `mj sync push`; every conversion gap is surfaced and fails the run unless --allow-gaps.",
3043
- "name": "split",
3036
+ "skip-commands": {
3037
+ "description": "Skip seeding .claude/commands/",
3038
+ "name": "skip-commands",
3044
3039
  "allowNo": false,
3045
3040
  "type": "boolean"
3046
3041
  },
3047
- "allow-gaps": {
3048
- "description": "Exit 0 even when migrations have conversion gaps — with --split: hand-authoring needed or unhandled statements; on the legacy path: \"-- Could not parse\" / \"-- ERROR converting batch\" markers in the output. Gaps are still embedded as comments and listed in the summary.",
3049
- "name": "allow-gaps",
3042
+ "skip-skills": {
3043
+ "description": "Skip seeding .claude/skills/",
3044
+ "name": "skip-skills",
3050
3045
  "allowNo": false,
3051
3046
  "type": "boolean"
3052
3047
  },
3053
- "bake-codegen": {
3054
- "description": "With --split: bake native PG CodeGen objects inline per migration (Path C), so the set deploys with `mj migrate` alone — no `mj codegen` step. Requires a LIVE working PG database (DB_PLATFORM=postgresql + PG_* env, same as `mj codegen`) seeded to the state just BEFORE the migrations being converted (typically the latest baseline); the converter brings it forward in committed order as it bakes. Not compatible with --dry-run.",
3055
- "name": "bake-codegen",
3048
+ "skip-settings": {
3049
+ "description": "Skip merging .claude/settings.json",
3050
+ "name": "skip-settings",
3051
+ "allowNo": false,
3052
+ "type": "boolean"
3053
+ },
3054
+ "json": {
3055
+ "description": "Output as JSON (matches plan §7.5 schema)",
3056
+ "name": "json",
3057
+ "allowNo": false,
3058
+ "type": "boolean"
3059
+ },
3060
+ "verbose": {
3061
+ "char": "v",
3062
+ "description": "Show progress messages from the fetcher and merger",
3063
+ "name": "verbose",
3056
3064
  "allowNo": false,
3057
3065
  "type": "boolean"
3058
3066
  }
3059
3067
  },
3060
3068
  "hasDynamicHelp": false,
3061
3069
  "hiddenAliases": [],
3062
- "id": "migrate:convert",
3070
+ "id": "install:claude",
3063
3071
  "pluginAlias": "@memberjunction/cli",
3064
3072
  "pluginName": "@memberjunction/cli",
3065
3073
  "pluginType": "core",
@@ -3069,63 +3077,118 @@
3069
3077
  "relativePath": [
3070
3078
  "dist",
3071
3079
  "commands",
3072
- "migrate",
3073
- "convert.js"
3080
+ "install",
3081
+ "claude.js"
3074
3082
  ]
3075
3083
  },
3076
- "migrate:create": {
3084
+ "install": {
3077
3085
  "aliases": [],
3078
- "args": {
3079
- "description": {
3080
- "description": "Short description (will be converted to PascalCase with underscores)",
3081
- "name": "description",
3082
- "required": true
3083
- }
3084
- },
3085
- "description": "Scaffold a new migration file for the current database platform",
3086
+ "args": {},
3087
+ "description": "Install MemberJunction from a GitHub release",
3086
3088
  "examples": [
3087
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\"",
3088
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --version 5.25 --platform postgresql",
3089
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --dir ./migrations/v5"
3089
+ "<%= config.bin %> <%= command.id %>",
3090
+ "<%= config.bin %> <%= command.id %> -t v4.3.0",
3091
+ "<%= config.bin %> <%= command.id %> --dry-run",
3092
+ "<%= config.bin %> <%= command.id %> --yes"
3090
3093
  ],
3091
3094
  "flags": {
3092
- "version": {
3093
- "char": "v",
3094
- "description": "Migration version tag, e.g. \"5.25\" (default: parsed from repo baseline or \"0.0\")",
3095
- "name": "version",
3095
+ "tag": {
3096
+ "char": "t",
3097
+ "description": "Release tag to install (e.g. v4.3.0). If omitted, shows a version picker.",
3098
+ "name": "tag",
3096
3099
  "hasDynamicHelp": false,
3097
3100
  "multiple": false,
3098
3101
  "type": "option"
3099
3102
  },
3100
- "platform": {
3101
- "char": "p",
3102
- "description": "Override platform: sqlserver | postgresql (default: config.dbPlatform)",
3103
- "name": "platform",
3103
+ "dir": {
3104
+ "description": "Target directory for the installation",
3105
+ "name": "dir",
3106
+ "default": ".",
3104
3107
  "hasDynamicHelp": false,
3105
3108
  "multiple": false,
3106
- "options": [
3107
- "sqlserver",
3108
- "postgresql"
3109
- ],
3110
3109
  "type": "option"
3111
3110
  },
3112
- "dir": {
3113
- "description": "Output directory (default: ./migrations/v5 or ./migrations-pg/v5)",
3114
- "name": "dir",
3111
+ "config": {
3112
+ "char": "c",
3113
+ "description": "Path to JSON config file with install settings (database, auth, ports, etc.)",
3114
+ "name": "config",
3115
3115
  "hasDynamicHelp": false,
3116
3116
  "multiple": false,
3117
3117
  "type": "option"
3118
3118
  },
3119
- "x-x": {
3120
- "description": "Use {version}.x.x suffix instead of {version}.x (e.g. 5.25.x instead of 5.25.x)",
3121
- "name": "x-x",
3119
+ "legacy": {
3120
+ "description": "Use the legacy interactive installer (ZIP-only distribution)",
3121
+ "hidden": true,
3122
+ "name": "legacy",
3123
+ "allowNo": false,
3124
+ "type": "boolean"
3125
+ },
3126
+ "dry-run": {
3127
+ "description": "Show the install plan without executing it",
3128
+ "name": "dry-run",
3129
+ "allowNo": false,
3130
+ "type": "boolean"
3131
+ },
3132
+ "yes": {
3133
+ "char": "y",
3134
+ "description": "Non-interactive mode: auto-select latest version and accept defaults",
3135
+ "name": "yes",
3136
+ "allowNo": false,
3137
+ "type": "boolean"
3138
+ },
3139
+ "verbose": {
3140
+ "char": "v",
3141
+ "description": "Show detailed output",
3142
+ "name": "verbose",
3143
+ "allowNo": false,
3144
+ "type": "boolean"
3145
+ },
3146
+ "skip-db": {
3147
+ "description": "Skip database provisioning phases",
3148
+ "name": "skip-db",
3149
+ "allowNo": false,
3150
+ "type": "boolean"
3151
+ },
3152
+ "skip-start": {
3153
+ "description": "Skip service startup and smoke tests",
3154
+ "name": "skip-start",
3155
+ "allowNo": false,
3156
+ "type": "boolean"
3157
+ },
3158
+ "no-resume": {
3159
+ "description": "Ignore any existing checkpoint and start fresh",
3160
+ "name": "no-resume",
3161
+ "allowNo": false,
3162
+ "type": "boolean"
3163
+ },
3164
+ "fast": {
3165
+ "description": "Fast mode: skip smoke test and optimize post-codegen steps. Re-run without --fast if you encounter issues.",
3166
+ "name": "fast",
3167
+ "allowNo": false,
3168
+ "type": "boolean"
3169
+ },
3170
+ "overwrite-config": {
3171
+ "description": "Overwrite existing config files (.env, mj.config.cjs, environment.ts) instead of preserving them",
3172
+ "name": "overwrite-config",
3173
+ "allowNo": false,
3174
+ "type": "boolean"
3175
+ },
3176
+ "monorepo": {
3177
+ "description": "Install the full MemberJunction source repository instead of the lightweight distribution. Use this for MJ framework development.",
3178
+ "name": "monorepo",
3179
+ "allowNo": false,
3180
+ "type": "boolean"
3181
+ },
3182
+ "no-claude-pack": {
3183
+ "description": "Exclude the Claude Code pack (CLAUDE.md + .claude/ tree) from the scaffold. By default the pack ships with the install so opening Claude Code in your new MJ project gives you the curated MJ-aware experience immediately.",
3184
+ "name": "no-claude-pack",
3122
3185
  "allowNo": false,
3123
3186
  "type": "boolean"
3124
3187
  }
3125
3188
  },
3126
3189
  "hasDynamicHelp": false,
3127
3190
  "hiddenAliases": [],
3128
- "id": "migrate:create",
3191
+ "id": "install",
3129
3192
  "pluginAlias": "@memberjunction/cli",
3130
3193
  "pluginName": "@memberjunction/cli",
3131
3194
  "pluginType": "core",
@@ -3135,66 +3198,31 @@
3135
3198
  "relativePath": [
3136
3199
  "dist",
3137
3200
  "commands",
3138
- "migrate",
3139
- "create.js"
3201
+ "install",
3202
+ "index.js"
3140
3203
  ]
3141
3204
  },
3142
- "migrate": {
3205
+ "install:usage": {
3143
3206
  "aliases": [],
3144
3207
  "args": {},
3145
- "description": "Migrate MemberJunction database to latest version. Open App migrates also run the core metadata-heal procs (same work as R__RefreshMetadata) scoped to the app schema, on SQL Server and PostgreSQL. Each database request may run for up to 30 minutes by default; set MJ_MIGRATION_REQUEST_TIMEOUT (milliseconds) or dbRequestTimeout in mj.config.cjs to change it.",
3146
- "examples": [
3147
- "<%= config.bin %> <%= command.id %>\n",
3148
- "<%= config.bin %> <%= command.id %> --schema __BCSaaS --dir ./migrations/v1\n",
3149
- "<%= config.bin %> <%= command.id %> --schema __BCSaaS --tag v1.0.0\n"
3150
- ],
3208
+ "description": "Show usage, flags, examples, and runtime hints for every `mj install` command.",
3151
3209
  "flags": {
3152
- "verbose": {
3153
- "char": "v",
3154
- "description": "Enable additional logging",
3155
- "name": "verbose",
3156
- "allowNo": false,
3157
- "type": "boolean"
3158
- },
3159
- "tag": {
3160
- "char": "t",
3161
- "description": "Version tag to use for running remote migrations",
3162
- "name": "tag",
3163
- "hasDynamicHelp": false,
3164
- "multiple": false,
3165
- "type": "option"
3166
- },
3167
- "schema": {
3168
- "char": "s",
3169
- "description": "Target schema (overrides coreSchema from config)",
3170
- "name": "schema",
3171
- "hasDynamicHelp": false,
3172
- "multiple": false,
3173
- "type": "option"
3174
- },
3175
- "dir": {
3176
- "description": "Migration source directory (overrides migrationsLocation from config)",
3177
- "name": "dir",
3210
+ "format": {
3211
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
3212
+ "name": "format",
3178
3213
  "hasDynamicHelp": false,
3179
3214
  "multiple": false,
3215
+ "options": [
3216
+ "text",
3217
+ "json",
3218
+ "md"
3219
+ ],
3180
3220
  "type": "option"
3181
- },
3182
- "check-connection": {
3183
- "description": "Verify the database connection (including TLS) and exit without migrating",
3184
- "name": "check-connection",
3185
- "allowNo": false,
3186
- "type": "boolean"
3187
- },
3188
- "skip-cache-clear": {
3189
- "description": "Do not clear the shared Redis cache (REDIS_URL) after migrating. Also: MJ_SKIP_SHARED_CACHE_CLEAR=1",
3190
- "name": "skip-cache-clear",
3191
- "allowNo": false,
3192
- "type": "boolean"
3193
3221
  }
3194
3222
  },
3195
3223
  "hasDynamicHelp": false,
3196
3224
  "hiddenAliases": [],
3197
- "id": "migrate",
3225
+ "id": "install:usage",
3198
3226
  "pluginAlias": "@memberjunction/cli",
3199
3227
  "pluginName": "@memberjunction/cli",
3200
3228
  "pluginType": "core",
@@ -3204,17 +3232,20 @@
3204
3232
  "relativePath": [
3205
3233
  "dist",
3206
3234
  "commands",
3207
- "migrate",
3208
- "index.js"
3235
+ "install",
3236
+ "usage.js"
3209
3237
  ]
3210
3238
  },
3211
- "migrate:rebake": {
3239
+ "migrate:convert": {
3212
3240
  "aliases": [],
3213
3241
  "args": {},
3214
- "description": "Re-bake the post-baseline PG migration set with inline native CodeGen",
3242
+ "description": "Convert T-SQL migrations to PostgreSQL",
3215
3243
  "examples": [
3216
- "<%= config.bin %> migrate rebake",
3217
- "<%= config.bin %> migrate rebake --baseline-floor V202605291452 --dry-run"
3244
+ "<%= config.bin %> migrate convert --split",
3245
+ "<%= config.bin %> migrate convert --split --dry-run",
3246
+ "<%= config.bin %> migrate convert --split --file V202604060452__v5.24.x__KnowledgeHub.sql",
3247
+ "<%= config.bin %> migrate convert --source-dir ./migrations/v5 --output-dir ./migrations-pg/v5",
3248
+ "<%= config.bin %> migrate convert --verbose"
3218
3249
  ],
3219
3250
  "flags": {
3220
3251
  "source-dir": {
@@ -3226,13 +3257,20 @@
3226
3257
  "type": "option"
3227
3258
  },
3228
3259
  "output-dir": {
3229
- "description": "PG migrations directory (committed files read here + baked output written here)",
3260
+ "description": "Output PG migrations directory",
3230
3261
  "name": "output-dir",
3231
3262
  "default": "./migrations-pg/v5",
3232
3263
  "hasDynamicHelp": false,
3233
3264
  "multiple": false,
3234
3265
  "type": "option"
3235
3266
  },
3267
+ "file": {
3268
+ "description": "Convert a specific file (filename only, looked up in source-dir)",
3269
+ "name": "file",
3270
+ "hasDynamicHelp": false,
3271
+ "multiple": false,
3272
+ "type": "option"
3273
+ },
3236
3274
  "schema": {
3237
3275
  "description": "Target schema name",
3238
3276
  "name": "schema",
@@ -3249,23 +3287,47 @@
3249
3287
  "multiple": false,
3250
3288
  "type": "option"
3251
3289
  },
3252
- "baseline-floor": {
3253
- "description": "Re-bake migrations strictly AFTER this version key (default: the latest B* in output-dir)",
3254
- "name": "baseline-floor",
3255
- "hasDynamicHelp": false,
3256
- "multiple": false,
3257
- "type": "option"
3258
- },
3259
3290
  "dry-run": {
3260
- "description": "Report what would be re-baked without writing files",
3291
+ "description": "Show what would be converted without writing files",
3261
3292
  "name": "dry-run",
3262
3293
  "allowNo": false,
3263
3294
  "type": "boolean"
3295
+ },
3296
+ "no-header": {
3297
+ "description": "Skip PG header (extensions, schema, implicit cast)",
3298
+ "name": "no-header",
3299
+ "allowNo": false,
3300
+ "type": "boolean"
3301
+ },
3302
+ "verbose": {
3303
+ "char": "v",
3304
+ "description": "Show per-statement progress",
3305
+ "name": "verbose",
3306
+ "allowNo": false,
3307
+ "type": "boolean"
3308
+ },
3309
+ "split": {
3310
+ "description": "Split-and-regenerate (the standard path): transpile only hand-written DDL via the AST dialect; CodeGen objects are regenerated by `mj codegen` and mj-sync metadata re-seeded by `mj sync push`; every conversion gap is surfaced and fails the run unless --allow-gaps.",
3311
+ "name": "split",
3312
+ "allowNo": false,
3313
+ "type": "boolean"
3314
+ },
3315
+ "allow-gaps": {
3316
+ "description": "Exit 0 even when migrations have conversion gaps — with --split: hand-authoring needed or unhandled statements; on the legacy path: \"-- Could not parse\" / \"-- ERROR converting batch\" markers in the output. Gaps are still embedded as comments and listed in the summary.",
3317
+ "name": "allow-gaps",
3318
+ "allowNo": false,
3319
+ "type": "boolean"
3320
+ },
3321
+ "bake-codegen": {
3322
+ "description": "With --split: bake native PG CodeGen objects inline per migration (Path C), so the set deploys with `mj migrate` alone — no `mj codegen` step. Requires a LIVE working PG database (DB_PLATFORM=postgresql + PG_* env, same as `mj codegen`) seeded to the state just BEFORE the migrations being converted (typically the latest baseline); the converter brings it forward in committed order as it bakes. Not compatible with --dry-run.",
3323
+ "name": "bake-codegen",
3324
+ "allowNo": false,
3325
+ "type": "boolean"
3264
3326
  }
3265
3327
  },
3266
3328
  "hasDynamicHelp": false,
3267
3329
  "hiddenAliases": [],
3268
- "id": "migrate:rebake",
3330
+ "id": "migrate:convert",
3269
3331
  "pluginAlias": "@memberjunction/cli",
3270
3332
  "pluginName": "@memberjunction/cli",
3271
3333
  "pluginType": "core",
@@ -3276,30 +3338,62 @@
3276
3338
  "dist",
3277
3339
  "commands",
3278
3340
  "migrate",
3279
- "rebake.js"
3341
+ "convert.js"
3280
3342
  ]
3281
3343
  },
3282
- "migrate:usage": {
3344
+ "migrate:create": {
3283
3345
  "aliases": [],
3284
- "args": {},
3285
- "description": "Show usage, flags, examples, and runtime hints for every `mj migrate` command.",
3346
+ "args": {
3347
+ "description": {
3348
+ "description": "Short description (will be converted to PascalCase with underscores)",
3349
+ "name": "description",
3350
+ "required": true
3351
+ }
3352
+ },
3353
+ "description": "Scaffold a new migration file for the current database platform",
3354
+ "examples": [
3355
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\"",
3356
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --version 5.25 --platform postgresql",
3357
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --dir ./migrations/v5"
3358
+ ],
3286
3359
  "flags": {
3287
- "format": {
3288
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
3289
- "name": "format",
3360
+ "version": {
3361
+ "char": "v",
3362
+ "description": "Migration version tag, e.g. \"5.25\" (default: parsed from repo baseline or \"0.0\")",
3363
+ "name": "version",
3364
+ "hasDynamicHelp": false,
3365
+ "multiple": false,
3366
+ "type": "option"
3367
+ },
3368
+ "platform": {
3369
+ "char": "p",
3370
+ "description": "Override platform: sqlserver | postgresql (default: config.dbPlatform)",
3371
+ "name": "platform",
3290
3372
  "hasDynamicHelp": false,
3291
3373
  "multiple": false,
3292
3374
  "options": [
3293
- "text",
3294
- "json",
3295
- "md"
3375
+ "sqlserver",
3376
+ "postgresql"
3296
3377
  ],
3297
3378
  "type": "option"
3379
+ },
3380
+ "dir": {
3381
+ "description": "Output directory (default: ./migrations/v5 or ./migrations-pg/v5)",
3382
+ "name": "dir",
3383
+ "hasDynamicHelp": false,
3384
+ "multiple": false,
3385
+ "type": "option"
3386
+ },
3387
+ "x-x": {
3388
+ "description": "Use {version}.x.x suffix instead of {version}.x (e.g. 5.25.x instead of 5.25.x)",
3389
+ "name": "x-x",
3390
+ "allowNo": false,
3391
+ "type": "boolean"
3298
3392
  }
3299
3393
  },
3300
3394
  "hasDynamicHelp": false,
3301
3395
  "hiddenAliases": [],
3302
- "id": "migrate:usage",
3396
+ "id": "migrate:create",
3303
3397
  "pluginAlias": "@memberjunction/cli",
3304
3398
  "pluginName": "@memberjunction/cli",
3305
3399
  "pluginType": "core",
@@ -3310,109 +3404,65 @@
3310
3404
  "dist",
3311
3405
  "commands",
3312
3406
  "migrate",
3313
- "usage.js"
3407
+ "create.js"
3314
3408
  ]
3315
3409
  },
3316
- "install:claude": {
3410
+ "migrate": {
3317
3411
  "aliases": [],
3318
3412
  "args": {},
3319
- "description": "Install or refresh the Claude Code pack in the current directory.",
3413
+ "description": "Migrate MemberJunction database to latest version. Open App migrates also run the core metadata-heal procs (same work as R__RefreshMetadata) scoped to the app schema, on SQL Server and PostgreSQL. Each database request may run for up to 30 minutes by default; set MJ_MIGRATION_REQUEST_TIMEOUT (milliseconds) or dbRequestTimeout in mj.config.cjs to change it.",
3320
3414
  "examples": [
3321
- "<%= config.bin %> install:claude",
3322
- "<%= config.bin %> install:claude --dry-run",
3323
- "<%= config.bin %> install:claude --from ./local-pack",
3324
- "<%= config.bin %> install:claude --json"
3415
+ "<%= config.bin %> <%= command.id %>\n",
3416
+ "<%= config.bin %> <%= command.id %> --schema __BCSaaS --dir ./migrations/v1\n",
3417
+ "<%= config.bin %> <%= command.id %> --schema __BCSaaS --tag v1.0.0\n"
3325
3418
  ],
3326
3419
  "flags": {
3327
- "dir": {
3328
- "description": "Target directory for the install",
3329
- "name": "dir",
3330
- "default": ".",
3331
- "hasDynamicHelp": false,
3332
- "multiple": false,
3333
- "type": "option"
3420
+ "verbose": {
3421
+ "char": "v",
3422
+ "description": "Enable additional logging",
3423
+ "name": "verbose",
3424
+ "allowNo": false,
3425
+ "type": "boolean"
3334
3426
  },
3335
- "major": {
3336
- "description": "Force a specific MJ major (default: detected from package.json)",
3337
- "name": "major",
3427
+ "tag": {
3428
+ "char": "t",
3429
+ "description": "Version tag to use for running remote migrations",
3430
+ "name": "tag",
3338
3431
  "hasDynamicHelp": false,
3339
3432
  "multiple": false,
3340
3433
  "type": "option"
3341
3434
  },
3342
- "ref": {
3343
- "description": "Git ref to fetch from (branch or tag). Default: main.",
3344
- "name": "ref",
3435
+ "schema": {
3436
+ "char": "s",
3437
+ "description": "Target schema (overrides coreSchema from config)",
3438
+ "name": "schema",
3345
3439
  "hasDynamicHelp": false,
3346
3440
  "multiple": false,
3347
3441
  "type": "option"
3348
3442
  },
3349
- "from": {
3350
- "description": "Use a local pack source instead of fetching from GitHub",
3351
- "name": "from",
3443
+ "dir": {
3444
+ "description": "Migration source directory (overrides migrationsLocation from config)",
3445
+ "name": "dir",
3352
3446
  "hasDynamicHelp": false,
3353
3447
  "multiple": false,
3354
3448
  "type": "option"
3355
3449
  },
3356
- "offline": {
3357
- "description": "Forbid network; requires --from <path>",
3358
- "name": "offline",
3359
- "allowNo": false,
3360
- "type": "boolean"
3361
- },
3362
- "dry-run": {
3363
- "description": "Print what would be written; change nothing",
3364
- "name": "dry-run",
3365
- "allowNo": false,
3366
- "type": "boolean"
3367
- },
3368
- "yes": {
3369
- "char": "y",
3370
- "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
3371
- "name": "yes",
3372
- "allowNo": false,
3373
- "type": "boolean"
3374
- },
3375
- "force": {
3376
- "description": "Overwrite user-customized commands/skills (saves .bak files)",
3377
- "name": "force",
3378
- "allowNo": false,
3379
- "type": "boolean"
3380
- },
3381
- "skip-commands": {
3382
- "description": "Skip seeding .claude/commands/",
3383
- "name": "skip-commands",
3384
- "allowNo": false,
3385
- "type": "boolean"
3386
- },
3387
- "skip-skills": {
3388
- "description": "Skip seeding .claude/skills/",
3389
- "name": "skip-skills",
3390
- "allowNo": false,
3391
- "type": "boolean"
3392
- },
3393
- "skip-settings": {
3394
- "description": "Skip merging .claude/settings.json",
3395
- "name": "skip-settings",
3396
- "allowNo": false,
3397
- "type": "boolean"
3398
- },
3399
- "json": {
3400
- "description": "Output as JSON (matches plan §7.5 schema)",
3401
- "name": "json",
3450
+ "check-connection": {
3451
+ "description": "Verify the database connection (including TLS) and exit without migrating",
3452
+ "name": "check-connection",
3402
3453
  "allowNo": false,
3403
3454
  "type": "boolean"
3404
3455
  },
3405
- "verbose": {
3406
- "char": "v",
3407
- "description": "Show progress messages from the fetcher and merger",
3408
- "name": "verbose",
3456
+ "skip-cache-clear": {
3457
+ "description": "Do not clear the shared Redis cache (REDIS_URL) after migrating. Also: MJ_SKIP_SHARED_CACHE_CLEAR=1",
3458
+ "name": "skip-cache-clear",
3409
3459
  "allowNo": false,
3410
3460
  "type": "boolean"
3411
3461
  }
3412
3462
  },
3413
3463
  "hasDynamicHelp": false,
3414
3464
  "hiddenAliases": [],
3415
- "id": "install:claude",
3465
+ "id": "migrate",
3416
3466
  "pluginAlias": "@memberjunction/cli",
3417
3467
  "pluginName": "@memberjunction/cli",
3418
3468
  "pluginType": "core",
@@ -3422,118 +3472,68 @@
3422
3472
  "relativePath": [
3423
3473
  "dist",
3424
3474
  "commands",
3425
- "install",
3426
- "claude.js"
3475
+ "migrate",
3476
+ "index.js"
3427
3477
  ]
3428
3478
  },
3429
- "install": {
3479
+ "migrate:rebake": {
3430
3480
  "aliases": [],
3431
3481
  "args": {},
3432
- "description": "Install MemberJunction from a GitHub release",
3482
+ "description": "Re-bake the post-baseline PG migration set with inline native CodeGen",
3433
3483
  "examples": [
3434
- "<%= config.bin %> <%= command.id %>",
3435
- "<%= config.bin %> <%= command.id %> -t v4.3.0",
3436
- "<%= config.bin %> <%= command.id %> --dry-run",
3437
- "<%= config.bin %> <%= command.id %> --yes"
3484
+ "<%= config.bin %> migrate rebake",
3485
+ "<%= config.bin %> migrate rebake --baseline-floor V202605291452 --dry-run"
3438
3486
  ],
3439
3487
  "flags": {
3440
- "tag": {
3441
- "char": "t",
3442
- "description": "Release tag to install (e.g. v4.3.0). If omitted, shows a version picker.",
3443
- "name": "tag",
3488
+ "source-dir": {
3489
+ "description": "Source T-SQL migrations directory",
3490
+ "name": "source-dir",
3491
+ "default": "./migrations/v5",
3444
3492
  "hasDynamicHelp": false,
3445
3493
  "multiple": false,
3446
3494
  "type": "option"
3447
3495
  },
3448
- "dir": {
3449
- "description": "Target directory for the installation",
3450
- "name": "dir",
3451
- "default": ".",
3496
+ "output-dir": {
3497
+ "description": "PG migrations directory (committed files read here + baked output written here)",
3498
+ "name": "output-dir",
3499
+ "default": "./migrations-pg/v5",
3452
3500
  "hasDynamicHelp": false,
3453
3501
  "multiple": false,
3454
3502
  "type": "option"
3455
3503
  },
3456
- "config": {
3457
- "char": "c",
3458
- "description": "Path to JSON config file with install settings (database, auth, ports, etc.)",
3459
- "name": "config",
3504
+ "schema": {
3505
+ "description": "Target schema name",
3506
+ "name": "schema",
3507
+ "default": "__mj",
3460
3508
  "hasDynamicHelp": false,
3461
3509
  "multiple": false,
3462
3510
  "type": "option"
3463
3511
  },
3464
- "legacy": {
3465
- "description": "Use the legacy interactive installer (ZIP-only distribution)",
3466
- "hidden": true,
3467
- "name": "legacy",
3468
- "allowNo": false,
3469
- "type": "boolean"
3512
+ "core-schema": {
3513
+ "description": "MJ core schema substituted for ${mjSchema} (default __mj). Distinct from --schema, which is the app's OWN schema: an Open App migration references core as ${mjSchema} and itself as ${flyway:defaultSchema}, and for every app those differ.",
3514
+ "name": "core-schema",
3515
+ "default": "__mj",
3516
+ "hasDynamicHelp": false,
3517
+ "multiple": false,
3518
+ "type": "option"
3519
+ },
3520
+ "baseline-floor": {
3521
+ "description": "Re-bake migrations strictly AFTER this version key (default: the latest B* in output-dir)",
3522
+ "name": "baseline-floor",
3523
+ "hasDynamicHelp": false,
3524
+ "multiple": false,
3525
+ "type": "option"
3470
3526
  },
3471
3527
  "dry-run": {
3472
- "description": "Show the install plan without executing it",
3528
+ "description": "Report what would be re-baked without writing files",
3473
3529
  "name": "dry-run",
3474
3530
  "allowNo": false,
3475
3531
  "type": "boolean"
3476
- },
3477
- "yes": {
3478
- "char": "y",
3479
- "description": "Non-interactive mode: auto-select latest version and accept defaults",
3480
- "name": "yes",
3481
- "allowNo": false,
3482
- "type": "boolean"
3483
- },
3484
- "verbose": {
3485
- "char": "v",
3486
- "description": "Show detailed output",
3487
- "name": "verbose",
3488
- "allowNo": false,
3489
- "type": "boolean"
3490
- },
3491
- "skip-db": {
3492
- "description": "Skip database provisioning phases",
3493
- "name": "skip-db",
3494
- "allowNo": false,
3495
- "type": "boolean"
3496
- },
3497
- "skip-start": {
3498
- "description": "Skip service startup and smoke tests",
3499
- "name": "skip-start",
3500
- "allowNo": false,
3501
- "type": "boolean"
3502
- },
3503
- "no-resume": {
3504
- "description": "Ignore any existing checkpoint and start fresh",
3505
- "name": "no-resume",
3506
- "allowNo": false,
3507
- "type": "boolean"
3508
- },
3509
- "fast": {
3510
- "description": "Fast mode: skip smoke test and optimize post-codegen steps. Re-run without --fast if you encounter issues.",
3511
- "name": "fast",
3512
- "allowNo": false,
3513
- "type": "boolean"
3514
- },
3515
- "overwrite-config": {
3516
- "description": "Overwrite existing config files (.env, mj.config.cjs, environment.ts) instead of preserving them",
3517
- "name": "overwrite-config",
3518
- "allowNo": false,
3519
- "type": "boolean"
3520
- },
3521
- "monorepo": {
3522
- "description": "Install the full MemberJunction source repository instead of the lightweight distribution. Use this for MJ framework development.",
3523
- "name": "monorepo",
3524
- "allowNo": false,
3525
- "type": "boolean"
3526
- },
3527
- "no-claude-pack": {
3528
- "description": "Exclude the Claude Code pack (CLAUDE.md + .claude/ tree) from the scaffold. By default the pack ships with the install so opening Claude Code in your new MJ project gives you the curated MJ-aware experience immediately.",
3529
- "name": "no-claude-pack",
3530
- "allowNo": false,
3531
- "type": "boolean"
3532
3532
  }
3533
3533
  },
3534
3534
  "hasDynamicHelp": false,
3535
3535
  "hiddenAliases": [],
3536
- "id": "install",
3536
+ "id": "migrate:rebake",
3537
3537
  "pluginAlias": "@memberjunction/cli",
3538
3538
  "pluginName": "@memberjunction/cli",
3539
3539
  "pluginType": "core",
@@ -3543,14 +3543,14 @@
3543
3543
  "relativePath": [
3544
3544
  "dist",
3545
3545
  "commands",
3546
- "install",
3547
- "index.js"
3546
+ "migrate",
3547
+ "rebake.js"
3548
3548
  ]
3549
3549
  },
3550
- "install:usage": {
3550
+ "migrate:usage": {
3551
3551
  "aliases": [],
3552
3552
  "args": {},
3553
- "description": "Show usage, flags, examples, and runtime hints for every `mj install` command.",
3553
+ "description": "Show usage, flags, examples, and runtime hints for every `mj migrate` command.",
3554
3554
  "flags": {
3555
3555
  "format": {
3556
3556
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -3567,7 +3567,7 @@
3567
3567
  },
3568
3568
  "hasDynamicHelp": false,
3569
3569
  "hiddenAliases": [],
3570
- "id": "install:usage",
3570
+ "id": "migrate:usage",
3571
3571
  "pluginAlias": "@memberjunction/cli",
3572
3572
  "pluginName": "@memberjunction/cli",
3573
3573
  "pluginType": "core",
@@ -3577,7 +3577,7 @@
3577
3577
  "relativePath": [
3578
3578
  "dist",
3579
3579
  "commands",
3580
- "install",
3580
+ "migrate",
3581
3581
  "usage.js"
3582
3582
  ]
3583
3583
  },
@@ -8703,5 +8703,5 @@
8703
8703
  ]
8704
8704
  }
8705
8705
  },
8706
- "version": "6.2.0-edge.8"
8706
+ "version": "6.2.1"
8707
8707
  }