@memberjunction/cli 6.2.0-edge.0 → 6.2.0-edge.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 (197) hide show
  1. package/dist/baseline/cli-helpers.d.ts +4 -0
  2. package/dist/baseline/cli-helpers.d.ts.map +1 -1
  3. package/dist/baseline/cli-helpers.js +18 -10
  4. package/dist/baseline/cli-helpers.js.map +1 -1
  5. package/dist/baseline/comparator.d.ts +5 -3
  6. package/dist/baseline/comparator.d.ts.map +1 -1
  7. package/dist/baseline/comparator.js +142 -138
  8. package/dist/baseline/comparator.js.map +1 -1
  9. package/dist/baseline/connection.d.ts +8 -6
  10. package/dist/baseline/connection.d.ts.map +1 -1
  11. package/dist/baseline/connection.js +16 -12
  12. package/dist/baseline/connection.js.map +1 -1
  13. package/dist/baseline/data-dumper.d.ts +7 -3
  14. package/dist/baseline/data-dumper.d.ts.map +1 -1
  15. package/dist/baseline/data-dumper.js +33 -25
  16. package/dist/baseline/data-dumper.js.map +1 -1
  17. package/dist/baseline/emitter.d.ts +5 -3
  18. package/dist/baseline/emitter.d.ts.map +1 -1
  19. package/dist/baseline/emitter.js +114 -110
  20. package/dist/baseline/emitter.js.map +1 -1
  21. package/dist/baseline/index.d.ts +7 -7
  22. package/dist/baseline/index.d.ts.map +1 -1
  23. package/dist/baseline/index.js +7 -7
  24. package/dist/baseline/index.js.map +1 -1
  25. package/dist/baseline/introspector-mssql.d.ts +2 -0
  26. package/dist/baseline/introspector-mssql.d.ts.map +1 -1
  27. package/dist/baseline/introspector-mssql.js +68 -64
  28. package/dist/baseline/introspector-mssql.js.map +1 -1
  29. package/dist/baseline/introspector-postgres.d.ts +2 -0
  30. package/dist/baseline/introspector-postgres.d.ts.map +1 -1
  31. package/dist/baseline/introspector-postgres.js +34 -30
  32. package/dist/baseline/introspector-postgres.js.map +1 -1
  33. package/dist/baseline/report.d.ts +4 -0
  34. package/dist/baseline/report.d.ts.map +1 -1
  35. package/dist/baseline/report.js +25 -17
  36. package/dist/baseline/report.js.map +1 -1
  37. package/dist/baseline/types.d.ts +71 -71
  38. package/dist/baseline/util.d.ts +54 -6
  39. package/dist/baseline/util.d.ts.map +1 -1
  40. package/dist/baseline/util.js +112 -36
  41. package/dist/baseline/util.js.map +1 -1
  42. package/dist/commands/ai/actions/list.js +7 -7
  43. package/dist/commands/ai/actions/run.js +7 -7
  44. package/dist/commands/ai/agents/list.js +7 -7
  45. package/dist/commands/ai/agents/run.js +9 -9
  46. package/dist/commands/ai/audit/agent-run.js +7 -7
  47. package/dist/commands/ai/prompts/run.js +7 -7
  48. package/dist/commands/app/check-updates.js +5 -5
  49. package/dist/commands/app/disable.js +2 -2
  50. package/dist/commands/app/enable.js +2 -2
  51. package/dist/commands/app/info.js +2 -2
  52. package/dist/commands/app/install.js +2 -2
  53. package/dist/commands/app/list.js +2 -2
  54. package/dist/commands/app/remove.js +4 -4
  55. package/dist/commands/app/upgrade.js +2 -2
  56. package/dist/commands/artifacts/reclassify.js +2 -2
  57. package/dist/commands/baseline/build.js +31 -31
  58. package/dist/commands/baseline/build.js.map +1 -1
  59. package/dist/commands/baseline/compare.js +36 -36
  60. package/dist/commands/baseline/roundtrip.js +56 -54
  61. package/dist/commands/baseline/roundtrip.js.map +1 -1
  62. package/dist/commands/bundle/index.js +4 -4
  63. package/dist/commands/clean/index.js +3 -3
  64. package/dist/commands/codegen/manifest.d.ts +2 -0
  65. package/dist/commands/codegen/manifest.d.ts.map +1 -1
  66. package/dist/commands/codegen/manifest.js +8 -4
  67. package/dist/commands/codegen/manifest.js.map +1 -1
  68. package/dist/commands/dev/workspace/index.d.ts +2 -0
  69. package/dist/commands/dev/workspace/index.d.ts.map +1 -1
  70. package/dist/commands/dev/workspace/index.js +8 -4
  71. package/dist/commands/dev/workspace/index.js.map +1 -1
  72. package/dist/commands/install/claude.d.ts +2 -0
  73. package/dist/commands/install/claude.d.ts.map +1 -1
  74. package/dist/commands/install/claude.js +11 -7
  75. package/dist/commands/install/claude.js.map +1 -1
  76. package/dist/commands/install/index.js +3 -3
  77. package/dist/commands/migrate/convert.d.ts +21 -0
  78. package/dist/commands/migrate/convert.d.ts.map +1 -1
  79. package/dist/commands/migrate/convert.js +22 -6
  80. package/dist/commands/migrate/convert.js.map +1 -1
  81. package/dist/commands/migrate/create.js +2 -2
  82. package/dist/commands/migrate/index.js +16 -16
  83. package/dist/commands/sync/file-reset.js +2 -2
  84. package/dist/commands/sync/init.js +3 -3
  85. package/dist/commands/test/compare.js +6 -6
  86. package/dist/commands/test/history.js +6 -6
  87. package/dist/commands/test/list.js +6 -6
  88. package/dist/commands/test/regression/build.js +5 -5
  89. package/dist/commands/test/regression/compare.js +3 -3
  90. package/dist/commands/test/regression/down.js +4 -4
  91. package/dist/commands/test/regression/export.js +4 -4
  92. package/dist/commands/test/regression/gen-forms.js +3 -3
  93. package/dist/commands/test/regression/remote.js +10 -10
  94. package/dist/commands/test/regression/up.js +6 -6
  95. package/dist/commands/test/run.js +6 -6
  96. package/dist/commands/test/suite.js +6 -6
  97. package/dist/commands/test/validate.js +6 -6
  98. package/dist/commands/translate-sql/index.js +25 -25
  99. package/dist/commands/update/claude.js +7 -7
  100. package/dist/commands/usage.js +4 -4
  101. package/dist/config.d.ts +175 -1
  102. package/dist/config.d.ts.map +1 -1
  103. package/dist/config.js +23 -9
  104. package/dist/config.js.map +1 -1
  105. package/dist/hooks/postrun.js +2 -2
  106. package/dist/hooks/prerun.js +2 -2
  107. package/dist/hooks/prerun.js.map +1 -1
  108. package/dist/lib/claude-pack/ManagedBlockEditor.d.ts +6 -0
  109. package/dist/lib/claude-pack/ManagedBlockEditor.d.ts.map +1 -1
  110. package/dist/lib/claude-pack/ManagedBlockEditor.js +18 -6
  111. package/dist/lib/claude-pack/ManagedBlockEditor.js.map +1 -1
  112. package/dist/lib/claude-pack/PackFetcher.d.ts +8 -3
  113. package/dist/lib/claude-pack/PackFetcher.d.ts.map +1 -1
  114. package/dist/lib/claude-pack/PackFetcher.js +26 -18
  115. package/dist/lib/claude-pack/PackFetcher.js.map +1 -1
  116. package/dist/lib/claude-pack/PackInstaller.d.ts +6 -2
  117. package/dist/lib/claude-pack/PackInstaller.d.ts.map +1 -1
  118. package/dist/lib/claude-pack/PackInstaller.js +19 -13
  119. package/dist/lib/claude-pack/PackInstaller.js.map +1 -1
  120. package/dist/lib/claude-pack/PackMerger.d.ts +8 -0
  121. package/dist/lib/claude-pack/PackMerger.d.ts.map +1 -1
  122. package/dist/lib/claude-pack/PackMerger.js +63 -57
  123. package/dist/lib/claude-pack/PackMerger.js.map +1 -1
  124. package/dist/lib/claude-pack/PackOutputFormatter.d.ts +4 -0
  125. package/dist/lib/claude-pack/PackOutputFormatter.d.ts.map +1 -1
  126. package/dist/lib/claude-pack/PackOutputFormatter.js +10 -2
  127. package/dist/lib/claude-pack/PackOutputFormatter.js.map +1 -1
  128. package/dist/lib/claude-pack/PackPaths.d.ts +12 -0
  129. package/dist/lib/claude-pack/PackPaths.d.ts.map +1 -1
  130. package/dist/lib/claude-pack/PackPaths.js +31 -7
  131. package/dist/lib/claude-pack/PackPaths.js.map +1 -1
  132. package/dist/lib/claude-pack/PackTypes.d.ts +18 -14
  133. package/dist/lib/claude-pack/PackTypes.d.ts.map +1 -1
  134. package/dist/lib/claude-pack/PackTypes.js +11 -3
  135. package/dist/lib/claude-pack/PackTypes.js.map +1 -1
  136. package/dist/lib/claude-pack/SettingsMerger.d.ts +10 -0
  137. package/dist/lib/claude-pack/SettingsMerger.d.ts.map +1 -1
  138. package/dist/lib/claude-pack/SettingsMerger.js +36 -16
  139. package/dist/lib/claude-pack/SettingsMerger.js.map +1 -1
  140. package/dist/lib/cli-plugins.d.ts +2 -0
  141. package/dist/lib/cli-plugins.d.ts.map +1 -1
  142. package/dist/lib/cli-plugins.js +8 -4
  143. package/dist/lib/cli-plugins.js.map +1 -1
  144. package/dist/lib/db-preflight.d.ts +2 -0
  145. package/dist/lib/db-preflight.d.ts.map +1 -1
  146. package/dist/lib/db-preflight.js +12 -8
  147. package/dist/lib/db-preflight.js.map +1 -1
  148. package/dist/lib/db-version.d.ts +2 -0
  149. package/dist/lib/db-version.d.ts.map +1 -1
  150. package/dist/lib/db-version.js +5 -1
  151. package/dist/lib/db-version.js.map +1 -1
  152. package/dist/lib/derived-usage.d.ts +14 -8
  153. package/dist/lib/derived-usage.d.ts.map +1 -1
  154. package/dist/lib/derived-usage.js +30 -18
  155. package/dist/lib/derived-usage.js.map +1 -1
  156. package/dist/lib/domain-profiles.d.ts +4 -2
  157. package/dist/lib/domain-profiles.d.ts.map +1 -1
  158. package/dist/lib/domain-profiles.js +53 -49
  159. package/dist/lib/domain-profiles.js.map +1 -1
  160. package/dist/lib/domain-usage-command.js +4 -4
  161. package/dist/lib/dynamic-packages.d.ts +4 -2
  162. package/dist/lib/dynamic-packages.d.ts.map +1 -1
  163. package/dist/lib/dynamic-packages.js +9 -5
  164. package/dist/lib/dynamic-packages.js.map +1 -1
  165. package/dist/lib/format-compat.d.ts +9 -7
  166. package/dist/lib/format-compat.d.ts.map +1 -1
  167. package/dist/lib/format-compat.js +12 -8
  168. package/dist/lib/format-compat.js.map +1 -1
  169. package/dist/lib/interactive-guard.d.ts +16 -0
  170. package/dist/lib/interactive-guard.d.ts.map +1 -1
  171. package/dist/lib/interactive-guard.js +18 -6
  172. package/dist/lib/interactive-guard.js.map +1 -1
  173. package/dist/lib/migration-fetch.d.ts +16 -4
  174. package/dist/lib/migration-fetch.d.ts.map +1 -1
  175. package/dist/lib/migration-fetch.js +30 -18
  176. package/dist/lib/migration-fetch.js.map +1 -1
  177. package/dist/lib/regression/docker-helpers.d.ts +24 -0
  178. package/dist/lib/regression/docker-helpers.d.ts.map +1 -1
  179. package/dist/lib/regression/docker-helpers.js +46 -10
  180. package/dist/lib/regression/docker-helpers.js.map +1 -1
  181. package/dist/lib/usage-render.d.ts +6 -0
  182. package/dist/lib/usage-render.d.ts.map +1 -1
  183. package/dist/lib/usage-render.js +15 -3
  184. package/dist/lib/usage-render.js.map +1 -1
  185. package/dist/translate-sql/groundTruth.d.ts +3 -3
  186. package/dist/translate-sql/groundTruth.js +40 -40
  187. package/dist/translate-sql/reportGenerator.d.ts +7 -7
  188. package/dist/translate-sql/reportGenerator.js +18 -18
  189. package/dist/translate-sql/ruleTranslator.d.ts +3 -3
  190. package/dist/translate-sql/ruleTranslator.js +8 -8
  191. package/dist/translate-sql/ruleTranslator.js.map +1 -1
  192. package/dist/utils/open-app-context.d.ts +21 -0
  193. package/dist/utils/open-app-context.d.ts.map +1 -1
  194. package/dist/utils/open-app-context.js +26 -10
  195. package/dist/utils/open-app-context.js.map +1 -1
  196. package/oclif.manifest.json +1185 -1185
  197. package/package.json +22 -22
@@ -521,6 +521,101 @@
521
521
  "usage.js"
522
522
  ]
523
523
  },
524
+ "artifacts:reclassify": {
525
+ "aliases": [],
526
+ "args": {},
527
+ "description": "Upgrade-recovery utility for v5.35 artifact unification. Re-evaluates rows whose TypeID is the deleted JSON fallback but whose actual content does not parse as JSON. Normally a no-op: the v5.35 backfill migration handles this automatically. This command is only relevant when the migration ran BEFORE the artifact-type metadata (Generic Text / Generic Binary) was pushed via `mj sync push`, in which case the migration prints a notice telling you to run this. Reports \"no candidates\" once everything is reconciled. Dry-run by default; --apply writes through Record Changes.",
528
+ "examples": [
529
+ "<%= config.bin %> <%= command.id %>",
530
+ "<%= config.bin %> <%= command.id %> --apply --limit 50"
531
+ ],
532
+ "flags": {
533
+ "conversation-id": {
534
+ "description": "Scope to artifacts attached to the given conversation.",
535
+ "name": "conversation-id",
536
+ "hasDynamicHelp": false,
537
+ "multiple": false,
538
+ "type": "option"
539
+ },
540
+ "since": {
541
+ "description": "Scope to artifacts created on/after this ISO date.",
542
+ "name": "since",
543
+ "hasDynamicHelp": false,
544
+ "multiple": false,
545
+ "type": "option"
546
+ },
547
+ "limit": {
548
+ "description": "Maximum number of rows to inspect.",
549
+ "name": "limit",
550
+ "default": 100,
551
+ "hasDynamicHelp": false,
552
+ "multiple": false,
553
+ "type": "option"
554
+ },
555
+ "apply": {
556
+ "description": "Write changes. Without this flag, this command only reports what it would do.",
557
+ "name": "apply",
558
+ "allowNo": false,
559
+ "type": "boolean"
560
+ },
561
+ "verbose": {
562
+ "char": "v",
563
+ "description": "Print every candidate row, not just the summary.",
564
+ "name": "verbose",
565
+ "allowNo": false,
566
+ "type": "boolean"
567
+ }
568
+ },
569
+ "hasDynamicHelp": false,
570
+ "hiddenAliases": [],
571
+ "id": "artifacts:reclassify",
572
+ "pluginAlias": "@memberjunction/cli",
573
+ "pluginName": "@memberjunction/cli",
574
+ "pluginType": "core",
575
+ "strict": true,
576
+ "enableJsonFlag": false,
577
+ "isESM": true,
578
+ "relativePath": [
579
+ "dist",
580
+ "commands",
581
+ "artifacts",
582
+ "reclassify.js"
583
+ ]
584
+ },
585
+ "artifacts:usage": {
586
+ "aliases": [],
587
+ "args": {},
588
+ "description": "Show usage, flags, examples, and runtime hints for every `mj artifacts` command.",
589
+ "flags": {
590
+ "format": {
591
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
592
+ "name": "format",
593
+ "hasDynamicHelp": false,
594
+ "multiple": false,
595
+ "options": [
596
+ "text",
597
+ "json",
598
+ "md"
599
+ ],
600
+ "type": "option"
601
+ }
602
+ },
603
+ "hasDynamicHelp": false,
604
+ "hiddenAliases": [],
605
+ "id": "artifacts:usage",
606
+ "pluginAlias": "@memberjunction/cli",
607
+ "pluginName": "@memberjunction/cli",
608
+ "pluginType": "core",
609
+ "strict": true,
610
+ "enableJsonFlag": false,
611
+ "isESM": true,
612
+ "relativePath": [
613
+ "dist",
614
+ "commands",
615
+ "artifacts",
616
+ "usage.js"
617
+ ]
618
+ },
524
619
  "baseline:build": {
525
620
  "aliases": [],
526
621
  "args": {},
@@ -893,101 +988,6 @@
893
988
  "usage.js"
894
989
  ]
895
990
  },
896
- "artifacts:reclassify": {
897
- "aliases": [],
898
- "args": {},
899
- "description": "Upgrade-recovery utility for v5.35 artifact unification. Re-evaluates rows whose TypeID is the deleted JSON fallback but whose actual content does not parse as JSON. Normally a no-op: the v5.35 backfill migration handles this automatically. This command is only relevant when the migration ran BEFORE the artifact-type metadata (Generic Text / Generic Binary) was pushed via `mj sync push`, in which case the migration prints a notice telling you to run this. Reports \"no candidates\" once everything is reconciled. Dry-run by default; --apply writes through Record Changes.",
900
- "examples": [
901
- "<%= config.bin %> <%= command.id %>",
902
- "<%= config.bin %> <%= command.id %> --apply --limit 50"
903
- ],
904
- "flags": {
905
- "conversation-id": {
906
- "description": "Scope to artifacts attached to the given conversation.",
907
- "name": "conversation-id",
908
- "hasDynamicHelp": false,
909
- "multiple": false,
910
- "type": "option"
911
- },
912
- "since": {
913
- "description": "Scope to artifacts created on/after this ISO date.",
914
- "name": "since",
915
- "hasDynamicHelp": false,
916
- "multiple": false,
917
- "type": "option"
918
- },
919
- "limit": {
920
- "description": "Maximum number of rows to inspect.",
921
- "name": "limit",
922
- "default": 100,
923
- "hasDynamicHelp": false,
924
- "multiple": false,
925
- "type": "option"
926
- },
927
- "apply": {
928
- "description": "Write changes. Without this flag, this command only reports what it would do.",
929
- "name": "apply",
930
- "allowNo": false,
931
- "type": "boolean"
932
- },
933
- "verbose": {
934
- "char": "v",
935
- "description": "Print every candidate row, not just the summary.",
936
- "name": "verbose",
937
- "allowNo": false,
938
- "type": "boolean"
939
- }
940
- },
941
- "hasDynamicHelp": false,
942
- "hiddenAliases": [],
943
- "id": "artifacts:reclassify",
944
- "pluginAlias": "@memberjunction/cli",
945
- "pluginName": "@memberjunction/cli",
946
- "pluginType": "core",
947
- "strict": true,
948
- "enableJsonFlag": false,
949
- "isESM": true,
950
- "relativePath": [
951
- "dist",
952
- "commands",
953
- "artifacts",
954
- "reclassify.js"
955
- ]
956
- },
957
- "artifacts:usage": {
958
- "aliases": [],
959
- "args": {},
960
- "description": "Show usage, flags, examples, and runtime hints for every `mj artifacts` command.",
961
- "flags": {
962
- "format": {
963
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
964
- "name": "format",
965
- "hasDynamicHelp": false,
966
- "multiple": false,
967
- "options": [
968
- "text",
969
- "json",
970
- "md"
971
- ],
972
- "type": "option"
973
- }
974
- },
975
- "hasDynamicHelp": false,
976
- "hiddenAliases": [],
977
- "id": "artifacts:usage",
978
- "pluginAlias": "@memberjunction/cli",
979
- "pluginName": "@memberjunction/cli",
980
- "pluginType": "core",
981
- "strict": true,
982
- "enableJsonFlag": false,
983
- "isESM": true,
984
- "relativePath": [
985
- "dist",
986
- "commands",
987
- "artifacts",
988
- "usage.js"
989
- ]
990
- },
991
991
  "bump": {
992
992
  "aliases": [],
993
993
  "args": {},
@@ -1509,20 +1509,6 @@
1509
1509
  "aliases": [],
1510
1510
  "args": {},
1511
1511
  "description": "Run the full MemberJunction code generation pipeline.\n\nAnalyzes your database schema, updates MemberJunction metadata, and generates\nsynchronized code across the stack: SQL objects, TypeScript entities, Angular\nforms, GraphQL resolvers, Action subclasses, and DB schema JSON.\n\nUse --skipdb to regenerate code from existing metadata only; --skipfiles to run\ndatabase-side operations only. --force-advanced-gen re-runs the LLM-driven\nadvanced generation for ALL entities (bypasses changed-entity scoping).",
1512
- "examples": [
1513
- {
1514
- "command": "<%= config.bin %> <%= command.id %>",
1515
- "description": "Run the full code generation pipeline"
1516
- },
1517
- {
1518
- "command": "<%= config.bin %> <%= command.id %> --skipdb",
1519
- "description": "Regenerate code files without touching the database"
1520
- },
1521
- {
1522
- "command": "<%= config.bin %> <%= command.id %> --format=json",
1523
- "description": "Emit a machine-readable result for an agent"
1524
- }
1525
- ],
1526
1512
  "flags": {
1527
1513
  "format": {
1528
1514
  "description": "Output format: text (human), json (machine-readable), md (Markdown-fenced). Defaults to text on a terminal and json when stdout is piped.",
@@ -1610,6 +1596,20 @@
1610
1596
  "pluginType": "core",
1611
1597
  "strict": true,
1612
1598
  "enableJsonFlag": false,
1599
+ "Examples": [
1600
+ {
1601
+ "command": "<%= config.bin %> <%= command.id %>",
1602
+ "description": "Run the full code generation pipeline"
1603
+ },
1604
+ {
1605
+ "command": "<%= config.bin %> <%= command.id %> --skipdb",
1606
+ "description": "Regenerate code files without touching the database"
1607
+ },
1608
+ {
1609
+ "command": "<%= config.bin %> <%= command.id %> --format=json",
1610
+ "description": "Emit a machine-readable result for an agent"
1611
+ }
1612
+ ],
1613
1613
  "Usage": {
1614
1614
  "domain": "codegen",
1615
1615
  "command": "codegen",
@@ -2751,98 +2751,37 @@
2751
2751
  "usage.js"
2752
2752
  ]
2753
2753
  },
2754
- "migrate:convert": {
2754
+ "plugin:add": {
2755
2755
  "aliases": [],
2756
- "args": {},
2757
- "description": "Convert T-SQL migrations to PostgreSQL",
2756
+ "args": {
2757
+ "package": {
2758
+ "description": "Plugin entry-point specifier (package name, subpath, or relative path)",
2759
+ "name": "package",
2760
+ "required": true
2761
+ }
2762
+ },
2763
+ "description": "Register a CLI plugin package in mj-cli-plugins.json so `mj` loads it at startup.",
2758
2764
  "examples": [
2759
- "<%= config.bin %> migrate convert --split",
2760
- "<%= config.bin %> migrate convert --split --dry-run",
2761
- "<%= config.bin %> migrate convert --split --file V202604060452__v5.24.x__KnowledgeHub.sql",
2762
- "<%= config.bin %> migrate convert --source-dir ./migrations/v5 --output-dir ./migrations-pg/v5",
2763
- "<%= config.bin %> migrate convert --verbose"
2765
+ "<%= config.bin %> <%= command.id %> @my-org/mj-plugin/plugins",
2766
+ "<%= config.bin %> <%= command.id %> ./local-plugins/my-tool"
2764
2767
  ],
2765
2768
  "flags": {
2766
- "source-dir": {
2767
- "description": "Source T-SQL migrations directory",
2768
- "name": "source-dir",
2769
- "default": "./migrations/v5",
2770
- "hasDynamicHelp": false,
2771
- "multiple": false,
2772
- "type": "option"
2773
- },
2774
- "output-dir": {
2775
- "description": "Output PG migrations directory",
2776
- "name": "output-dir",
2777
- "default": "./migrations-pg/v5",
2769
+ "format": {
2770
+ "description": "Output format",
2771
+ "name": "format",
2772
+ "default": "text",
2778
2773
  "hasDynamicHelp": false,
2779
2774
  "multiple": false,
2775
+ "options": [
2776
+ "text",
2777
+ "json"
2778
+ ],
2780
2779
  "type": "option"
2781
- },
2782
- "file": {
2783
- "description": "Convert a specific file (filename only, looked up in source-dir)",
2784
- "name": "file",
2785
- "hasDynamicHelp": false,
2786
- "multiple": false,
2787
- "type": "option"
2788
- },
2789
- "schema": {
2790
- "description": "Target schema name",
2791
- "name": "schema",
2792
- "default": "__mj",
2793
- "hasDynamicHelp": false,
2794
- "multiple": false,
2795
- "type": "option"
2796
- },
2797
- "core-schema": {
2798
- "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.",
2799
- "name": "core-schema",
2800
- "default": "__mj",
2801
- "hasDynamicHelp": false,
2802
- "multiple": false,
2803
- "type": "option"
2804
- },
2805
- "dry-run": {
2806
- "description": "Show what would be converted without writing files",
2807
- "name": "dry-run",
2808
- "allowNo": false,
2809
- "type": "boolean"
2810
- },
2811
- "no-header": {
2812
- "description": "Skip PG header (extensions, schema, implicit cast)",
2813
- "name": "no-header",
2814
- "allowNo": false,
2815
- "type": "boolean"
2816
- },
2817
- "verbose": {
2818
- "char": "v",
2819
- "description": "Show per-statement progress",
2820
- "name": "verbose",
2821
- "allowNo": false,
2822
- "type": "boolean"
2823
- },
2824
- "split": {
2825
- "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.",
2826
- "name": "split",
2827
- "allowNo": false,
2828
- "type": "boolean"
2829
- },
2830
- "allow-gaps": {
2831
- "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.",
2832
- "name": "allow-gaps",
2833
- "allowNo": false,
2834
- "type": "boolean"
2835
- },
2836
- "bake-codegen": {
2837
- "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.",
2838
- "name": "bake-codegen",
2839
- "allowNo": false,
2840
- "type": "boolean"
2841
2780
  }
2842
2781
  },
2843
2782
  "hasDynamicHelp": false,
2844
2783
  "hiddenAliases": [],
2845
- "id": "migrate:convert",
2784
+ "id": "plugin:add",
2846
2785
  "pluginAlias": "@memberjunction/cli",
2847
2786
  "pluginName": "@memberjunction/cli",
2848
2787
  "pluginType": "core",
@@ -2852,63 +2791,31 @@
2852
2791
  "relativePath": [
2853
2792
  "dist",
2854
2793
  "commands",
2855
- "migrate",
2856
- "convert.js"
2794
+ "plugin",
2795
+ "add.js"
2857
2796
  ]
2858
2797
  },
2859
- "migrate:create": {
2798
+ "plugin:usage": {
2860
2799
  "aliases": [],
2861
- "args": {
2862
- "description": {
2863
- "description": "Short description (will be converted to PascalCase with underscores)",
2864
- "name": "description",
2865
- "required": true
2866
- }
2867
- },
2868
- "description": "Scaffold a new migration file for the current database platform",
2869
- "examples": [
2870
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\"",
2871
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --version 5.25 --platform postgresql",
2872
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --dir ./migrations/v5"
2873
- ],
2800
+ "args": {},
2801
+ "description": "Show usage, flags, examples, and runtime hints for every `mj plugin` command.",
2874
2802
  "flags": {
2875
- "version": {
2876
- "char": "v",
2877
- "description": "Migration version tag, e.g. \"5.25\" (default: parsed from repo baseline or \"0.0\")",
2878
- "name": "version",
2879
- "hasDynamicHelp": false,
2880
- "multiple": false,
2881
- "type": "option"
2882
- },
2883
- "platform": {
2884
- "char": "p",
2885
- "description": "Override platform: sqlserver | postgresql (default: config.dbPlatform)",
2886
- "name": "platform",
2803
+ "format": {
2804
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
2805
+ "name": "format",
2887
2806
  "hasDynamicHelp": false,
2888
2807
  "multiple": false,
2889
2808
  "options": [
2890
- "sqlserver",
2891
- "postgresql"
2809
+ "text",
2810
+ "json",
2811
+ "md"
2892
2812
  ],
2893
2813
  "type": "option"
2894
- },
2895
- "dir": {
2896
- "description": "Output directory (default: ./migrations/v5 or ./migrations-pg/v5)",
2897
- "name": "dir",
2898
- "hasDynamicHelp": false,
2899
- "multiple": false,
2900
- "type": "option"
2901
- },
2902
- "x-x": {
2903
- "description": "Use {version}.x.x suffix instead of {version}.x (e.g. 5.25.x instead of 5.25.x)",
2904
- "name": "x-x",
2905
- "allowNo": false,
2906
- "type": "boolean"
2907
2814
  }
2908
2815
  },
2909
2816
  "hasDynamicHelp": false,
2910
2817
  "hiddenAliases": [],
2911
- "id": "migrate:create",
2818
+ "id": "plugin:usage",
2912
2819
  "pluginAlias": "@memberjunction/cli",
2913
2820
  "pluginName": "@memberjunction/cli",
2914
2821
  "pluginType": "core",
@@ -2918,60 +2825,40 @@
2918
2825
  "relativePath": [
2919
2826
  "dist",
2920
2827
  "commands",
2921
- "migrate",
2922
- "create.js"
2828
+ "plugin",
2829
+ "usage.js"
2923
2830
  ]
2924
2831
  },
2925
- "migrate": {
2832
+ "querygen:export": {
2926
2833
  "aliases": [],
2927
2834
  "args": {},
2928
- "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.",
2835
+ "description": "Export queries from database to metadata files",
2929
2836
  "examples": [
2930
- "<%= config.bin %> <%= command.id %>\n",
2931
- "<%= config.bin %> <%= command.id %> --schema __BCSaaS --dir ./migrations/v1\n",
2932
- "<%= config.bin %> <%= command.id %> --schema __BCSaaS --tag v1.0.0\n"
2837
+ "<%= config.bin %> <%= command.id %>",
2838
+ "<%= config.bin %> <%= command.id %> --output ./metadata/queries",
2839
+ "<%= config.bin %> <%= command.id %> --verbose"
2933
2840
  ],
2934
2841
  "flags": {
2935
- "verbose": {
2936
- "char": "v",
2937
- "description": "Enable additional logging",
2938
- "name": "verbose",
2939
- "allowNo": false,
2940
- "type": "boolean"
2941
- },
2942
- "tag": {
2943
- "char": "t",
2944
- "description": "Version tag to use for running remote migrations",
2945
- "name": "tag",
2946
- "hasDynamicHelp": false,
2947
- "multiple": false,
2948
- "type": "option"
2949
- },
2950
- "schema": {
2951
- "char": "s",
2952
- "description": "Target schema (overrides coreSchema from config)",
2953
- "name": "schema",
2954
- "hasDynamicHelp": false,
2955
- "multiple": false,
2956
- "type": "option"
2957
- },
2958
- "dir": {
2959
- "description": "Migration source directory (overrides migrationsLocation from config)",
2960
- "name": "dir",
2842
+ "output": {
2843
+ "char": "o",
2844
+ "description": "Output directory",
2845
+ "name": "output",
2846
+ "default": "./metadata/queries",
2961
2847
  "hasDynamicHelp": false,
2962
2848
  "multiple": false,
2963
2849
  "type": "option"
2964
2850
  },
2965
- "check-connection": {
2966
- "description": "Verify the database connection (including TLS) and exit without migrating",
2967
- "name": "check-connection",
2851
+ "verbose": {
2852
+ "char": "v",
2853
+ "description": "Verbose output",
2854
+ "name": "verbose",
2968
2855
  "allowNo": false,
2969
2856
  "type": "boolean"
2970
2857
  }
2971
2858
  },
2972
2859
  "hasDynamicHelp": false,
2973
2860
  "hiddenAliases": [],
2974
- "id": "migrate",
2861
+ "id": "querygen:export",
2975
2862
  "pluginAlias": "@memberjunction/cli",
2976
2863
  "pluginName": "@memberjunction/cli",
2977
2864
  "pluginType": "core",
@@ -2981,285 +2868,59 @@
2981
2868
  "relativePath": [
2982
2869
  "dist",
2983
2870
  "commands",
2984
- "migrate",
2985
- "index.js"
2871
+ "querygen",
2872
+ "export.js"
2986
2873
  ]
2987
2874
  },
2988
- "migrate:rebake": {
2875
+ "querygen:generate": {
2989
2876
  "aliases": [],
2990
2877
  "args": {},
2991
- "description": "Re-bake the post-baseline PG migration set with inline native CodeGen",
2878
+ "description": "Generate SQL query templates for entities using AI",
2992
2879
  "examples": [
2993
- "<%= config.bin %> migrate rebake",
2994
- "<%= config.bin %> migrate rebake --baseline-floor V202605291452 --dry-run"
2880
+ "<%= config.bin %> <%= command.id %>",
2881
+ "<%= config.bin %> <%= command.id %> --entities \"Customers,Orders\"",
2882
+ "<%= config.bin %> <%= command.id %> --max-entities 5 --verbose",
2883
+ "<%= config.bin %> <%= command.id %> --mode database"
2995
2884
  ],
2996
2885
  "flags": {
2997
- "source-dir": {
2998
- "description": "Source T-SQL migrations directory",
2999
- "name": "source-dir",
3000
- "default": "./migrations/v5",
2886
+ "entities": {
2887
+ "char": "e",
2888
+ "description": "Specific entities to generate queries for (comma-separated)",
2889
+ "name": "entities",
3001
2890
  "hasDynamicHelp": false,
3002
2891
  "multiple": false,
3003
2892
  "type": "option"
3004
2893
  },
3005
- "output-dir": {
3006
- "description": "PG migrations directory (committed files read here + baked output written here)",
3007
- "name": "output-dir",
3008
- "default": "./migrations-pg/v5",
2894
+ "exclude-entities": {
2895
+ "char": "x",
2896
+ "description": "Entities to exclude (comma-separated)",
2897
+ "name": "exclude-entities",
3009
2898
  "hasDynamicHelp": false,
3010
2899
  "multiple": false,
3011
2900
  "type": "option"
3012
2901
  },
3013
- "schema": {
3014
- "description": "Target schema name",
3015
- "name": "schema",
3016
- "default": "__mj",
2902
+ "exclude-schemas": {
2903
+ "char": "s",
2904
+ "description": "Schemas to exclude (comma-separated)",
2905
+ "name": "exclude-schemas",
3017
2906
  "hasDynamicHelp": false,
3018
2907
  "multiple": false,
3019
2908
  "type": "option"
3020
2909
  },
3021
- "core-schema": {
3022
- "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.",
3023
- "name": "core-schema",
3024
- "default": "__mj",
2910
+ "max-entities": {
2911
+ "char": "m",
2912
+ "description": "Max entities per group",
2913
+ "name": "max-entities",
2914
+ "default": 3,
3025
2915
  "hasDynamicHelp": false,
3026
2916
  "multiple": false,
3027
2917
  "type": "option"
3028
2918
  },
3029
- "baseline-floor": {
3030
- "description": "Re-bake migrations strictly AFTER this version key (default: the latest B* in output-dir)",
3031
- "name": "baseline-floor",
3032
- "hasDynamicHelp": false,
3033
- "multiple": false,
3034
- "type": "option"
3035
- },
3036
- "dry-run": {
3037
- "description": "Report what would be re-baked without writing files",
3038
- "name": "dry-run",
3039
- "allowNo": false,
3040
- "type": "boolean"
3041
- }
3042
- },
3043
- "hasDynamicHelp": false,
3044
- "hiddenAliases": [],
3045
- "id": "migrate:rebake",
3046
- "pluginAlias": "@memberjunction/cli",
3047
- "pluginName": "@memberjunction/cli",
3048
- "pluginType": "core",
3049
- "strict": true,
3050
- "enableJsonFlag": false,
3051
- "isESM": true,
3052
- "relativePath": [
3053
- "dist",
3054
- "commands",
3055
- "migrate",
3056
- "rebake.js"
3057
- ]
3058
- },
3059
- "migrate:usage": {
3060
- "aliases": [],
3061
- "args": {},
3062
- "description": "Show usage, flags, examples, and runtime hints for every `mj migrate` command.",
3063
- "flags": {
3064
- "format": {
3065
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
3066
- "name": "format",
3067
- "hasDynamicHelp": false,
3068
- "multiple": false,
3069
- "options": [
3070
- "text",
3071
- "json",
3072
- "md"
3073
- ],
3074
- "type": "option"
3075
- }
3076
- },
3077
- "hasDynamicHelp": false,
3078
- "hiddenAliases": [],
3079
- "id": "migrate:usage",
3080
- "pluginAlias": "@memberjunction/cli",
3081
- "pluginName": "@memberjunction/cli",
3082
- "pluginType": "core",
3083
- "strict": true,
3084
- "enableJsonFlag": false,
3085
- "isESM": true,
3086
- "relativePath": [
3087
- "dist",
3088
- "commands",
3089
- "migrate",
3090
- "usage.js"
3091
- ]
3092
- },
3093
- "plugin:add": {
3094
- "aliases": [],
3095
- "args": {
3096
- "package": {
3097
- "description": "Plugin entry-point specifier (package name, subpath, or relative path)",
3098
- "name": "package",
3099
- "required": true
3100
- }
3101
- },
3102
- "description": "Register a CLI plugin package in mj-cli-plugins.json so `mj` loads it at startup.",
3103
- "examples": [
3104
- "<%= config.bin %> <%= command.id %> @my-org/mj-plugin/plugins",
3105
- "<%= config.bin %> <%= command.id %> ./local-plugins/my-tool"
3106
- ],
3107
- "flags": {
3108
- "format": {
3109
- "description": "Output format",
3110
- "name": "format",
3111
- "default": "text",
3112
- "hasDynamicHelp": false,
3113
- "multiple": false,
3114
- "options": [
3115
- "text",
3116
- "json"
3117
- ],
3118
- "type": "option"
3119
- }
3120
- },
3121
- "hasDynamicHelp": false,
3122
- "hiddenAliases": [],
3123
- "id": "plugin:add",
3124
- "pluginAlias": "@memberjunction/cli",
3125
- "pluginName": "@memberjunction/cli",
3126
- "pluginType": "core",
3127
- "strict": true,
3128
- "enableJsonFlag": false,
3129
- "isESM": true,
3130
- "relativePath": [
3131
- "dist",
3132
- "commands",
3133
- "plugin",
3134
- "add.js"
3135
- ]
3136
- },
3137
- "plugin:usage": {
3138
- "aliases": [],
3139
- "args": {},
3140
- "description": "Show usage, flags, examples, and runtime hints for every `mj plugin` command.",
3141
- "flags": {
3142
- "format": {
3143
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
3144
- "name": "format",
3145
- "hasDynamicHelp": false,
3146
- "multiple": false,
3147
- "options": [
3148
- "text",
3149
- "json",
3150
- "md"
3151
- ],
3152
- "type": "option"
3153
- }
3154
- },
3155
- "hasDynamicHelp": false,
3156
- "hiddenAliases": [],
3157
- "id": "plugin:usage",
3158
- "pluginAlias": "@memberjunction/cli",
3159
- "pluginName": "@memberjunction/cli",
3160
- "pluginType": "core",
3161
- "strict": true,
3162
- "enableJsonFlag": false,
3163
- "isESM": true,
3164
- "relativePath": [
3165
- "dist",
3166
- "commands",
3167
- "plugin",
3168
- "usage.js"
3169
- ]
3170
- },
3171
- "querygen:export": {
3172
- "aliases": [],
3173
- "args": {},
3174
- "description": "Export queries from database to metadata files",
3175
- "examples": [
3176
- "<%= config.bin %> <%= command.id %>",
3177
- "<%= config.bin %> <%= command.id %> --output ./metadata/queries",
3178
- "<%= config.bin %> <%= command.id %> --verbose"
3179
- ],
3180
- "flags": {
3181
- "output": {
3182
- "char": "o",
3183
- "description": "Output directory",
3184
- "name": "output",
3185
- "default": "./metadata/queries",
3186
- "hasDynamicHelp": false,
3187
- "multiple": false,
3188
- "type": "option"
3189
- },
3190
- "verbose": {
3191
- "char": "v",
3192
- "description": "Verbose output",
3193
- "name": "verbose",
3194
- "allowNo": false,
3195
- "type": "boolean"
3196
- }
3197
- },
3198
- "hasDynamicHelp": false,
3199
- "hiddenAliases": [],
3200
- "id": "querygen:export",
3201
- "pluginAlias": "@memberjunction/cli",
3202
- "pluginName": "@memberjunction/cli",
3203
- "pluginType": "core",
3204
- "strict": true,
3205
- "enableJsonFlag": false,
3206
- "isESM": true,
3207
- "relativePath": [
3208
- "dist",
3209
- "commands",
3210
- "querygen",
3211
- "export.js"
3212
- ]
3213
- },
3214
- "querygen:generate": {
3215
- "aliases": [],
3216
- "args": {},
3217
- "description": "Generate SQL query templates for entities using AI",
3218
- "examples": [
3219
- "<%= config.bin %> <%= command.id %>",
3220
- "<%= config.bin %> <%= command.id %> --entities \"Customers,Orders\"",
3221
- "<%= config.bin %> <%= command.id %> --max-entities 5 --verbose",
3222
- "<%= config.bin %> <%= command.id %> --mode database"
3223
- ],
3224
- "flags": {
3225
- "entities": {
3226
- "char": "e",
3227
- "description": "Specific entities to generate queries for (comma-separated)",
3228
- "name": "entities",
3229
- "hasDynamicHelp": false,
3230
- "multiple": false,
3231
- "type": "option"
3232
- },
3233
- "exclude-entities": {
3234
- "char": "x",
3235
- "description": "Entities to exclude (comma-separated)",
3236
- "name": "exclude-entities",
3237
- "hasDynamicHelp": false,
3238
- "multiple": false,
3239
- "type": "option"
3240
- },
3241
- "exclude-schemas": {
3242
- "char": "s",
3243
- "description": "Schemas to exclude (comma-separated)",
3244
- "name": "exclude-schemas",
3245
- "hasDynamicHelp": false,
3246
- "multiple": false,
3247
- "type": "option"
3248
- },
3249
- "max-entities": {
3250
- "char": "m",
3251
- "description": "Max entities per group",
3252
- "name": "max-entities",
3253
- "default": 3,
3254
- "hasDynamicHelp": false,
3255
- "multiple": false,
3256
- "type": "option"
3257
- },
3258
- "target-groups": {
3259
- "char": "t",
3260
- "description": "Target number of entity groups to generate",
3261
- "name": "target-groups",
3262
- "default": 75,
2919
+ "target-groups": {
2920
+ "char": "t",
2921
+ "description": "Target number of entity groups to generate",
2922
+ "name": "target-groups",
2923
+ "default": 75,
3263
2924
  "hasDynamicHelp": false,
3264
2925
  "multiple": false,
3265
2926
  "type": "option"
@@ -4002,11 +3663,6 @@
4002
3663
  "aliases": [],
4003
3664
  "args": {},
4004
3665
  "description": "Pull metadata from database to local files",
4005
- "examples": [
4006
- "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Prompts\"",
4007
- "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Agents\" --merge-strategy=overwrite",
4008
- "<%= config.bin %> <%= command.id %> --entity=\"Templates\" --dry-run --verbose"
4009
- ],
4010
3666
  "flags": {
4011
3667
  "format": {
4012
3668
  "description": "Output format: text (human), json (machine-readable), md (Markdown-fenced). Defaults to text on a terminal and json when stdout is piped.",
@@ -4163,6 +3819,11 @@
4163
3819
  "pluginType": "core",
4164
3820
  "strict": true,
4165
3821
  "enableJsonFlag": false,
3822
+ "Examples": [
3823
+ "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Prompts\"",
3824
+ "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Agents\" --merge-strategy=overwrite",
3825
+ "<%= config.bin %> <%= command.id %> --entity=\"Templates\" --dry-run --verbose"
3826
+ ],
4166
3827
  "Usage": {
4167
3828
  "domain": "sync",
4168
3829
  "command": "sync:pull",
@@ -4217,12 +3878,6 @@
4217
3878
  "aliases": [],
4218
3879
  "args": {},
4219
3880
  "description": "Push local file changes to the database",
4220
- "examples": [
4221
- "<%= config.bin %> <%= command.id %>",
4222
- "<%= config.bin %> <%= command.id %> --dry-run",
4223
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4224
- "<%= config.bin %> <%= command.id %> --ci --format=json"
4225
- ],
4226
3881
  "flags": {
4227
3882
  "format": {
4228
3883
  "description": "Output format: text (human), json (machine-readable), md (Markdown-fenced). Defaults to text on a terminal and json when stdout is piped.",
@@ -4343,6 +3998,12 @@
4343
3998
  "pluginType": "core",
4344
3999
  "strict": true,
4345
4000
  "enableJsonFlag": false,
4001
+ "Examples": [
4002
+ "<%= config.bin %> <%= command.id %>",
4003
+ "<%= config.bin %> <%= command.id %> --dry-run",
4004
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4005
+ "<%= config.bin %> <%= command.id %> --ci --format=json"
4006
+ ],
4346
4007
  "Usage": {
4347
4008
  "domain": "sync",
4348
4009
  "command": "sync:push",
@@ -4427,29 +4088,383 @@
4427
4088
  },
4428
4089
  "verbose": {
4429
4090
  "char": "v",
4430
- "description": "Show detailed field-level differences",
4091
+ "description": "Show detailed field-level differences",
4092
+ "name": "verbose",
4093
+ "allowNo": false,
4094
+ "type": "boolean"
4095
+ },
4096
+ "include": {
4097
+ "description": "Only process these directories (comma-separated, supports patterns)",
4098
+ "name": "include",
4099
+ "hasDynamicHelp": false,
4100
+ "multiple": false,
4101
+ "type": "option"
4102
+ },
4103
+ "exclude": {
4104
+ "description": "Skip these directories (comma-separated, supports patterns)",
4105
+ "name": "exclude",
4106
+ "hasDynamicHelp": false,
4107
+ "multiple": false,
4108
+ "type": "option"
4109
+ }
4110
+ },
4111
+ "hasDynamicHelp": false,
4112
+ "hiddenAliases": [],
4113
+ "id": "sync:status",
4114
+ "pluginAlias": "@memberjunction/cli",
4115
+ "pluginName": "@memberjunction/cli",
4116
+ "pluginType": "core",
4117
+ "strict": true,
4118
+ "enableJsonFlag": false,
4119
+ "isESM": true,
4120
+ "relativePath": [
4121
+ "dist",
4122
+ "commands",
4123
+ "sync",
4124
+ "status.js"
4125
+ ]
4126
+ },
4127
+ "sync:usage": {
4128
+ "aliases": [],
4129
+ "args": {},
4130
+ "description": "Show usage, flags, examples, and runtime hints for every `mj sync` command.",
4131
+ "flags": {
4132
+ "format": {
4133
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4134
+ "name": "format",
4135
+ "hasDynamicHelp": false,
4136
+ "multiple": false,
4137
+ "options": [
4138
+ "text",
4139
+ "json",
4140
+ "md"
4141
+ ],
4142
+ "type": "option"
4143
+ }
4144
+ },
4145
+ "hasDynamicHelp": false,
4146
+ "hiddenAliases": [],
4147
+ "id": "sync:usage",
4148
+ "pluginAlias": "@memberjunction/cli",
4149
+ "pluginName": "@memberjunction/cli",
4150
+ "pluginType": "core",
4151
+ "strict": true,
4152
+ "enableJsonFlag": false,
4153
+ "isESM": true,
4154
+ "relativePath": [
4155
+ "dist",
4156
+ "commands",
4157
+ "sync",
4158
+ "usage.js"
4159
+ ]
4160
+ },
4161
+ "sync:validate": {
4162
+ "aliases": [],
4163
+ "args": {},
4164
+ "description": "Validate metadata files",
4165
+ "examples": [
4166
+ "<%= config.bin %> <%= command.id %>",
4167
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4168
+ "<%= config.bin %> <%= command.id %> --save-report",
4169
+ "<%= config.bin %> <%= command.id %> --verbose"
4170
+ ],
4171
+ "flags": {
4172
+ "dir": {
4173
+ "description": "Specific entity directory to validate",
4174
+ "name": "dir",
4175
+ "hasDynamicHelp": false,
4176
+ "multiple": false,
4177
+ "type": "option"
4178
+ },
4179
+ "verbose": {
4180
+ "char": "v",
4181
+ "description": "Show detailed validation output",
4182
+ "name": "verbose",
4183
+ "allowNo": false,
4184
+ "type": "boolean"
4185
+ },
4186
+ "save-report": {
4187
+ "description": "Save validation report as markdown file",
4188
+ "name": "save-report",
4189
+ "allowNo": false,
4190
+ "type": "boolean"
4191
+ },
4192
+ "output": {
4193
+ "description": "Output file path for validation report (default: validation-report.md)",
4194
+ "name": "output",
4195
+ "hasDynamicHelp": false,
4196
+ "multiple": false,
4197
+ "type": "option"
4198
+ }
4199
+ },
4200
+ "hasDynamicHelp": false,
4201
+ "hiddenAliases": [],
4202
+ "id": "sync:validate",
4203
+ "pluginAlias": "@memberjunction/cli",
4204
+ "pluginName": "@memberjunction/cli",
4205
+ "pluginType": "core",
4206
+ "strict": true,
4207
+ "enableJsonFlag": false,
4208
+ "isESM": true,
4209
+ "relativePath": [
4210
+ "dist",
4211
+ "commands",
4212
+ "sync",
4213
+ "validate.js"
4214
+ ]
4215
+ },
4216
+ "sync:watch": {
4217
+ "aliases": [],
4218
+ "args": {},
4219
+ "description": "Watch for file changes and sync automatically",
4220
+ "examples": [
4221
+ "<%= config.bin %> <%= command.id %>",
4222
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4223
+ "<%= config.bin %> <%= command.id %> --debounce=1000",
4224
+ "<%= config.bin %> <%= command.id %> --no-validate"
4225
+ ],
4226
+ "flags": {
4227
+ "dir": {
4228
+ "description": "Specific entity directory to watch",
4229
+ "name": "dir",
4230
+ "hasDynamicHelp": false,
4231
+ "multiple": false,
4232
+ "type": "option"
4233
+ },
4234
+ "debounce": {
4235
+ "description": "Debounce delay in milliseconds (default: 500)",
4236
+ "name": "debounce",
4237
+ "hasDynamicHelp": false,
4238
+ "multiple": false,
4239
+ "type": "option"
4240
+ },
4241
+ "no-validate": {
4242
+ "description": "Skip validation before sync",
4243
+ "name": "no-validate",
4244
+ "allowNo": false,
4245
+ "type": "boolean"
4246
+ },
4247
+ "verbose": {
4248
+ "char": "v",
4249
+ "description": "Show detailed output",
4250
+ "name": "verbose",
4251
+ "allowNo": false,
4252
+ "type": "boolean"
4253
+ }
4254
+ },
4255
+ "hasDynamicHelp": false,
4256
+ "hiddenAliases": [],
4257
+ "id": "sync:watch",
4258
+ "pluginAlias": "@memberjunction/cli",
4259
+ "pluginName": "@memberjunction/cli",
4260
+ "pluginType": "core",
4261
+ "strict": true,
4262
+ "enableJsonFlag": false,
4263
+ "isESM": true,
4264
+ "relativePath": [
4265
+ "dist",
4266
+ "commands",
4267
+ "sync",
4268
+ "watch.js"
4269
+ ]
4270
+ },
4271
+ "test:compare": {
4272
+ "aliases": [],
4273
+ "args": {
4274
+ "runId1": {
4275
+ "description": "First test run ID to compare",
4276
+ "name": "runId1",
4277
+ "required": false
4278
+ },
4279
+ "runId2": {
4280
+ "description": "Second test run ID to compare",
4281
+ "name": "runId2",
4282
+ "required": false
4283
+ }
4284
+ },
4285
+ "description": "Compare test runs for regression detection",
4286
+ "examples": [
4287
+ "<%= config.bin %> <%= command.id %>",
4288
+ "<%= config.bin %> <%= command.id %> --latest",
4289
+ "<%= config.bin %> <%= command.id %> <run-id-1> <run-id-2>",
4290
+ "<%= config.bin %> <%= command.id %> -v 5.17.0 -v 5.18.0",
4291
+ "<%= config.bin %> <%= command.id %> -c abc1234 -c def5678",
4292
+ "<%= config.bin %> <%= command.id %> --from-json baseline.json latest.json",
4293
+ "<%= config.bin %> <%= command.id %> --latest --format=markdown --output=report.md"
4294
+ ],
4295
+ "flags": {
4296
+ "version": {
4297
+ "char": "v",
4298
+ "description": "Compare runs by version",
4299
+ "name": "version",
4300
+ "hasDynamicHelp": false,
4301
+ "multiple": true,
4302
+ "type": "option"
4303
+ },
4304
+ "commit": {
4305
+ "char": "c",
4306
+ "description": "Compare runs by git commit",
4307
+ "name": "commit",
4308
+ "hasDynamicHelp": false,
4309
+ "multiple": true,
4310
+ "type": "option"
4311
+ },
4312
+ "diff-only": {
4313
+ "description": "Show only differences",
4314
+ "name": "diff-only",
4315
+ "allowNo": false,
4316
+ "type": "boolean"
4317
+ },
4318
+ "latest": {
4319
+ "char": "l",
4320
+ "description": "Compare the two most recent completed suite runs",
4321
+ "name": "latest",
4322
+ "allowNo": false,
4323
+ "type": "boolean"
4324
+ },
4325
+ "from-json": {
4326
+ "description": "Compare two results.json files directly (no DB). Pass twice: --from-json PREV --from-json CURR",
4327
+ "name": "from-json",
4328
+ "hasDynamicHelp": false,
4329
+ "multiple": true,
4330
+ "type": "option"
4331
+ },
4332
+ "format": {
4333
+ "char": "f",
4334
+ "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
4335
+ "name": "format",
4336
+ "hasDynamicHelp": false,
4337
+ "multiple": false,
4338
+ "options": [
4339
+ "text",
4340
+ "json",
4341
+ "md",
4342
+ "human",
4343
+ "console",
4344
+ "markdown",
4345
+ "compact",
4346
+ "table"
4347
+ ],
4348
+ "type": "option"
4349
+ },
4350
+ "output": {
4351
+ "char": "o",
4352
+ "description": "Output file path",
4353
+ "name": "output",
4354
+ "hasDynamicHelp": false,
4355
+ "multiple": false,
4356
+ "type": "option"
4357
+ },
4358
+ "verbose": {
4359
+ "description": "Show detailed information",
4360
+ "name": "verbose",
4361
+ "allowNo": false,
4362
+ "type": "boolean"
4363
+ },
4364
+ "tag": {
4365
+ "description": "Filter suite runs by tag (matches against MJTestSuiteRunEntity.Tags). Useful for isolating runs from a specific source environment in an archive MJ. DB mode only — --from-json ignores this flag.",
4366
+ "name": "tag",
4367
+ "hasDynamicHelp": false,
4368
+ "multiple": false,
4369
+ "type": "option"
4370
+ }
4371
+ },
4372
+ "hasDynamicHelp": false,
4373
+ "hiddenAliases": [],
4374
+ "id": "test:compare",
4375
+ "pluginAlias": "@memberjunction/cli",
4376
+ "pluginName": "@memberjunction/cli",
4377
+ "pluginType": "core",
4378
+ "strict": true,
4379
+ "enableJsonFlag": false,
4380
+ "isESM": true,
4381
+ "relativePath": [
4382
+ "dist",
4383
+ "commands",
4384
+ "test",
4385
+ "compare.js"
4386
+ ]
4387
+ },
4388
+ "test:history": {
4389
+ "aliases": [],
4390
+ "args": {},
4391
+ "description": "View test execution history",
4392
+ "examples": [
4393
+ "<%= config.bin %> <%= command.id %>",
4394
+ "<%= config.bin %> <%= command.id %> --test=<test-id>",
4395
+ "<%= config.bin %> <%= command.id %> --suite=<suite-id>",
4396
+ "<%= config.bin %> <%= command.id %> --since=\"2024-01-01\"",
4397
+ "<%= config.bin %> <%= command.id %> --limit=50"
4398
+ ],
4399
+ "flags": {
4400
+ "test": {
4401
+ "char": "t",
4402
+ "description": "Filter by test ID",
4403
+ "name": "test",
4404
+ "hasDynamicHelp": false,
4405
+ "multiple": false,
4406
+ "type": "option"
4407
+ },
4408
+ "recent": {
4409
+ "char": "r",
4410
+ "description": "Number of recent runs to show",
4411
+ "name": "recent",
4412
+ "hasDynamicHelp": false,
4413
+ "multiple": false,
4414
+ "type": "option"
4415
+ },
4416
+ "from": {
4417
+ "description": "Show history from date (YYYY-MM-DD)",
4418
+ "name": "from",
4419
+ "hasDynamicHelp": false,
4420
+ "multiple": false,
4421
+ "type": "option"
4422
+ },
4423
+ "status": {
4424
+ "char": "s",
4425
+ "description": "Filter by status",
4426
+ "name": "status",
4427
+ "hasDynamicHelp": false,
4428
+ "multiple": false,
4429
+ "type": "option"
4430
+ },
4431
+ "format": {
4432
+ "char": "f",
4433
+ "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
4434
+ "name": "format",
4435
+ "hasDynamicHelp": false,
4436
+ "multiple": false,
4437
+ "options": [
4438
+ "text",
4439
+ "json",
4440
+ "md",
4441
+ "human",
4442
+ "console",
4443
+ "markdown",
4444
+ "compact",
4445
+ "table"
4446
+ ],
4447
+ "type": "option"
4448
+ },
4449
+ "output": {
4450
+ "char": "o",
4451
+ "description": "Output file path",
4452
+ "name": "output",
4453
+ "hasDynamicHelp": false,
4454
+ "multiple": false,
4455
+ "type": "option"
4456
+ },
4457
+ "verbose": {
4458
+ "char": "v",
4459
+ "description": "Show detailed information",
4431
4460
  "name": "verbose",
4432
4461
  "allowNo": false,
4433
4462
  "type": "boolean"
4434
- },
4435
- "include": {
4436
- "description": "Only process these directories (comma-separated, supports patterns)",
4437
- "name": "include",
4438
- "hasDynamicHelp": false,
4439
- "multiple": false,
4440
- "type": "option"
4441
- },
4442
- "exclude": {
4443
- "description": "Skip these directories (comma-separated, supports patterns)",
4444
- "name": "exclude",
4445
- "hasDynamicHelp": false,
4446
- "multiple": false,
4447
- "type": "option"
4448
4463
  }
4449
4464
  },
4450
4465
  "hasDynamicHelp": false,
4451
4466
  "hiddenAliases": [],
4452
- "id": "sync:status",
4467
+ "id": "test:history",
4453
4468
  "pluginAlias": "@memberjunction/cli",
4454
4469
  "pluginName": "@memberjunction/cli",
4455
4470
  "pluginType": "core",
@@ -4459,31 +4474,26 @@
4459
4474
  "relativePath": [
4460
4475
  "dist",
4461
4476
  "commands",
4462
- "sync",
4463
- "status.js"
4477
+ "test",
4478
+ "history.js"
4464
4479
  ]
4465
4480
  },
4466
- "sync:usage": {
4481
+ "test": {
4467
4482
  "aliases": [],
4468
4483
  "args": {},
4469
- "description": "Show usage, flags, examples, and runtime hints for every `mj sync` command.",
4470
- "flags": {
4471
- "format": {
4472
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4473
- "name": "format",
4474
- "hasDynamicHelp": false,
4475
- "multiple": false,
4476
- "options": [
4477
- "text",
4478
- "json",
4479
- "md"
4480
- ],
4481
- "type": "option"
4482
- }
4483
- },
4484
+ "description": "MemberJunction Testing Framework - Execute and manage tests",
4485
+ "examples": [
4486
+ "<%= config.bin %> <%= command.id %> run <test-id>",
4487
+ "<%= config.bin %> <%= command.id %> run --name=\"Active Members Count\"",
4488
+ "<%= config.bin %> <%= command.id %> suite <suite-id>",
4489
+ "<%= config.bin %> <%= command.id %> list",
4490
+ "<%= config.bin %> <%= command.id %> list --suites",
4491
+ "<%= config.bin %> <%= command.id %> validate --all"
4492
+ ],
4493
+ "flags": {},
4484
4494
  "hasDynamicHelp": false,
4485
4495
  "hiddenAliases": [],
4486
- "id": "sync:usage",
4496
+ "id": "test",
4487
4497
  "pluginAlias": "@memberjunction/cli",
4488
4498
  "pluginName": "@memberjunction/cli",
4489
4499
  "pluginType": "core",
@@ -4493,99 +4503,87 @@
4493
4503
  "relativePath": [
4494
4504
  "dist",
4495
4505
  "commands",
4496
- "sync",
4497
- "usage.js"
4506
+ "test",
4507
+ "index.js"
4498
4508
  ]
4499
4509
  },
4500
- "sync:validate": {
4510
+ "test:list": {
4501
4511
  "aliases": [],
4502
4512
  "args": {},
4503
- "description": "Validate metadata files",
4513
+ "description": "List available tests, suites, and types",
4504
4514
  "examples": [
4505
4515
  "<%= config.bin %> <%= command.id %>",
4506
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4507
- "<%= config.bin %> <%= command.id %> --save-report",
4508
- "<%= config.bin %> <%= command.id %> --verbose"
4516
+ "<%= config.bin %> <%= command.id %> --suites",
4517
+ "<%= config.bin %> <%= command.id %> --types",
4518
+ "<%= config.bin %> <%= command.id %> --type=agent-eval",
4519
+ "<%= config.bin %> <%= command.id %> --tag=smoke",
4520
+ "<%= config.bin %> <%= command.id %> --status=active --verbose"
4509
4521
  ],
4510
4522
  "flags": {
4511
- "dir": {
4512
- "description": "Specific entity directory to validate",
4513
- "name": "dir",
4514
- "hasDynamicHelp": false,
4515
- "multiple": false,
4516
- "type": "option"
4517
- },
4518
- "verbose": {
4519
- "char": "v",
4520
- "description": "Show detailed validation output",
4521
- "name": "verbose",
4523
+ "suites": {
4524
+ "description": "List test suites instead of tests",
4525
+ "name": "suites",
4522
4526
  "allowNo": false,
4523
4527
  "type": "boolean"
4524
4528
  },
4525
- "save-report": {
4526
- "description": "Save validation report as markdown file",
4527
- "name": "save-report",
4529
+ "types": {
4530
+ "description": "List test types",
4531
+ "name": "types",
4528
4532
  "allowNo": false,
4529
4533
  "type": "boolean"
4530
4534
  },
4531
- "output": {
4532
- "description": "Output file path for validation report (default: validation-report.md)",
4533
- "name": "output",
4535
+ "type": {
4536
+ "char": "t",
4537
+ "description": "Filter by test type",
4538
+ "name": "type",
4534
4539
  "hasDynamicHelp": false,
4535
4540
  "multiple": false,
4536
4541
  "type": "option"
4537
- }
4538
- },
4539
- "hasDynamicHelp": false,
4540
- "hiddenAliases": [],
4541
- "id": "sync:validate",
4542
- "pluginAlias": "@memberjunction/cli",
4543
- "pluginName": "@memberjunction/cli",
4544
- "pluginType": "core",
4545
- "strict": true,
4546
- "enableJsonFlag": false,
4547
- "isESM": true,
4548
- "relativePath": [
4549
- "dist",
4550
- "commands",
4551
- "sync",
4552
- "validate.js"
4553
- ]
4554
- },
4555
- "sync:watch": {
4556
- "aliases": [],
4557
- "args": {},
4558
- "description": "Watch for file changes and sync automatically",
4559
- "examples": [
4560
- "<%= config.bin %> <%= command.id %>",
4561
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4562
- "<%= config.bin %> <%= command.id %> --debounce=1000",
4563
- "<%= config.bin %> <%= command.id %> --no-validate"
4564
- ],
4565
- "flags": {
4566
- "dir": {
4567
- "description": "Specific entity directory to watch",
4568
- "name": "dir",
4542
+ },
4543
+ "tag": {
4544
+ "description": "Filter by tag",
4545
+ "name": "tag",
4569
4546
  "hasDynamicHelp": false,
4570
4547
  "multiple": false,
4571
4548
  "type": "option"
4572
4549
  },
4573
- "debounce": {
4574
- "description": "Debounce delay in milliseconds (default: 500)",
4575
- "name": "debounce",
4550
+ "status": {
4551
+ "char": "s",
4552
+ "description": "Filter by status",
4553
+ "name": "status",
4576
4554
  "hasDynamicHelp": false,
4577
4555
  "multiple": false,
4578
4556
  "type": "option"
4579
4557
  },
4580
- "no-validate": {
4581
- "description": "Skip validation before sync",
4582
- "name": "no-validate",
4583
- "allowNo": false,
4584
- "type": "boolean"
4558
+ "format": {
4559
+ "char": "f",
4560
+ "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
4561
+ "name": "format",
4562
+ "hasDynamicHelp": false,
4563
+ "multiple": false,
4564
+ "options": [
4565
+ "text",
4566
+ "json",
4567
+ "md",
4568
+ "human",
4569
+ "console",
4570
+ "markdown",
4571
+ "compact",
4572
+ "table"
4573
+ ],
4574
+ "type": "option"
4575
+ },
4576
+ "output": {
4577
+ "char": "o",
4578
+ "description": "Output file path",
4579
+ "name": "output",
4580
+ "hasDynamicHelp": false,
4581
+ "multiple": false,
4582
+ "type": "option"
4585
4583
  },
4586
4584
  "verbose": {
4587
4585
  "char": "v",
4588
- "description": "Show detailed output",
4586
+ "description": "Show detailed information",
4589
4587
  "name": "verbose",
4590
4588
  "allowNo": false,
4591
4589
  "type": "boolean"
@@ -4593,7 +4591,7 @@
4593
4591
  },
4594
4592
  "hasDynamicHelp": false,
4595
4593
  "hiddenAliases": [],
4596
- "id": "sync:watch",
4594
+ "id": "test:list",
4597
4595
  "pluginAlias": "@memberjunction/cli",
4598
4596
  "pluginName": "@memberjunction/cli",
4599
4597
  "pluginType": "core",
@@ -4603,69 +4601,42 @@
4603
4601
  "relativePath": [
4604
4602
  "dist",
4605
4603
  "commands",
4606
- "sync",
4607
- "watch.js"
4604
+ "test",
4605
+ "list.js"
4608
4606
  ]
4609
4607
  },
4610
- "test:compare": {
4608
+ "test:run": {
4611
4609
  "aliases": [],
4612
4610
  "args": {
4613
- "runId1": {
4614
- "description": "First test run ID to compare",
4615
- "name": "runId1",
4616
- "required": false
4617
- },
4618
- "runId2": {
4619
- "description": "Second test run ID to compare",
4620
- "name": "runId2",
4611
+ "testId": {
4612
+ "description": "Test ID to execute",
4613
+ "name": "testId",
4621
4614
  "required": false
4622
4615
  }
4623
4616
  },
4624
- "description": "Compare test runs for regression detection",
4617
+ "description": "Execute a single test by ID or name",
4625
4618
  "examples": [
4626
- "<%= config.bin %> <%= command.id %>",
4627
- "<%= config.bin %> <%= command.id %> --latest",
4628
- "<%= config.bin %> <%= command.id %> <run-id-1> <run-id-2>",
4629
- "<%= config.bin %> <%= command.id %> -v 5.17.0 -v 5.18.0",
4630
- "<%= config.bin %> <%= command.id %> -c abc1234 -c def5678",
4631
- "<%= config.bin %> <%= command.id %> --from-json baseline.json latest.json",
4632
- "<%= config.bin %> <%= command.id %> --latest --format=markdown --output=report.md"
4619
+ "<%= config.bin %> <%= command.id %> <test-id>",
4620
+ "<%= config.bin %> <%= command.id %> --name=\"Active Members Count\"",
4621
+ "<%= config.bin %> <%= command.id %> <test-id> --environment=staging",
4622
+ "<%= config.bin %> <%= command.id %> <test-id> --format=json --output=results.json",
4623
+ "<%= config.bin %> <%= command.id %> <test-id> --dry-run"
4633
4624
  ],
4634
4625
  "flags": {
4635
- "version": {
4636
- "char": "v",
4637
- "description": "Compare runs by version",
4638
- "name": "version",
4639
- "hasDynamicHelp": false,
4640
- "multiple": true,
4641
- "type": "option"
4642
- },
4643
- "commit": {
4644
- "char": "c",
4645
- "description": "Compare runs by git commit",
4646
- "name": "commit",
4626
+ "name": {
4627
+ "char": "n",
4628
+ "description": "Test name to execute",
4629
+ "name": "name",
4647
4630
  "hasDynamicHelp": false,
4648
- "multiple": true,
4631
+ "multiple": false,
4649
4632
  "type": "option"
4650
4633
  },
4651
- "diff-only": {
4652
- "description": "Show only differences",
4653
- "name": "diff-only",
4654
- "allowNo": false,
4655
- "type": "boolean"
4656
- },
4657
- "latest": {
4658
- "char": "l",
4659
- "description": "Compare the two most recent completed suite runs",
4660
- "name": "latest",
4661
- "allowNo": false,
4662
- "type": "boolean"
4663
- },
4664
- "from-json": {
4665
- "description": "Compare two results.json files directly (no DB). Pass twice: --from-json PREV --from-json CURR",
4666
- "name": "from-json",
4634
+ "environment": {
4635
+ "char": "e",
4636
+ "description": "Environment context (dev, staging, prod)",
4637
+ "name": "environment",
4667
4638
  "hasDynamicHelp": false,
4668
- "multiple": true,
4639
+ "multiple": false,
4669
4640
  "type": "option"
4670
4641
  },
4671
4642
  "format": {
@@ -4694,15 +4665,29 @@
4694
4665
  "multiple": false,
4695
4666
  "type": "option"
4696
4667
  },
4668
+ "dry-run": {
4669
+ "description": "Validate without executing",
4670
+ "name": "dry-run",
4671
+ "allowNo": false,
4672
+ "type": "boolean"
4673
+ },
4697
4674
  "verbose": {
4698
- "description": "Show detailed information",
4675
+ "char": "v",
4676
+ "description": "Show detailed execution information",
4699
4677
  "name": "verbose",
4700
4678
  "allowNo": false,
4701
4679
  "type": "boolean"
4702
4680
  },
4703
- "tag": {
4704
- "description": "Filter suite runs by tag (matches against MJTestSuiteRunEntity.Tags). Useful for isolating runs from a specific source environment in an archive MJ. DB mode only — --from-json ignores this flag.",
4705
- "name": "tag",
4681
+ "checks-module": {
4682
+ "description": "Module specifier (package name or path) side-effect-imported before the run so its integration check bundles register on the IntegrationCheckRegistry. Durable form: mj.config.cjs `testing.checkModules` (this repo loads '@memberjunction/integration-test-suite' that way).",
4683
+ "name": "checks-module",
4684
+ "hasDynamicHelp": false,
4685
+ "multiple": false,
4686
+ "type": "option"
4687
+ },
4688
+ "oracles-module": {
4689
+ "description": "Path to a JS/TS module that exports custom IOracle classes or instances. Each export is registered on the engine before the test runs — used by non-MJ adopters to plug app-specific oracle types without modifying TestingFramework.",
4690
+ "name": "oracles-module",
4706
4691
  "hasDynamicHelp": false,
4707
4692
  "multiple": false,
4708
4693
  "type": "option"
@@ -4710,7 +4695,7 @@
4710
4695
  },
4711
4696
  "hasDynamicHelp": false,
4712
4697
  "hiddenAliases": [],
4713
- "id": "test:compare",
4698
+ "id": "test:run",
4714
4699
  "pluginAlias": "@memberjunction/cli",
4715
4700
  "pluginName": "@memberjunction/cli",
4716
4701
  "pluginType": "core",
@@ -4721,48 +4706,91 @@
4721
4706
  "dist",
4722
4707
  "commands",
4723
4708
  "test",
4724
- "compare.js"
4709
+ "run.js"
4725
4710
  ]
4726
4711
  },
4727
- "test:history": {
4712
+ "test:scripts": {
4728
4713
  "aliases": [],
4729
4714
  "args": {},
4730
- "description": "View test execution history",
4715
+ "description": "Review and promote recorded replay scripts. A run that re-derives a test which already had a script stores the new one as pending rather than replacing what replay uses, so a UI change never rewrites the suite unnoticed. This is where you see the drift and decide.",
4731
4716
  "examples": [
4732
4717
  "<%= config.bin %> <%= command.id %>",
4733
- "<%= config.bin %> <%= command.id %> --test=<test-id>",
4734
- "<%= config.bin %> <%= command.id %> --suite=<suite-id>",
4735
- "<%= config.bin %> <%= command.id %> --since=\"2024-01-01\"",
4736
- "<%= config.bin %> <%= command.id %> --limit=50"
4718
+ "<%= config.bin %> <%= command.id %> --test \"T042 - Filter Grid\"",
4719
+ "<%= config.bin %> <%= command.id %> --promote --test \"T042 - Filter Grid\"",
4720
+ "<%= config.bin %> <%= command.id %> --promote --yes",
4721
+ "<%= config.bin %> <%= command.id %> --discard --test \"T042 - Filter Grid\""
4737
4722
  ],
4738
4723
  "flags": {
4739
4724
  "test": {
4740
- "char": "t",
4741
- "description": "Filter by test ID",
4725
+ "description": "Limit to one test, by name or ID",
4742
4726
  "name": "test",
4743
4727
  "hasDynamicHelp": false,
4744
4728
  "multiple": false,
4745
4729
  "type": "option"
4746
4730
  },
4747
- "recent": {
4748
- "char": "r",
4749
- "description": "Number of recent runs to show",
4750
- "name": "recent",
4751
- "hasDynamicHelp": false,
4752
- "multiple": false,
4753
- "type": "option"
4731
+ "promote": {
4732
+ "description": "Promote the pending script(s) into the slot replay uses",
4733
+ "exclusive": [
4734
+ "discard"
4735
+ ],
4736
+ "name": "promote",
4737
+ "allowNo": false,
4738
+ "type": "boolean"
4754
4739
  },
4755
- "from": {
4756
- "description": "Show history from date (YYYY-MM-DD)",
4757
- "name": "from",
4758
- "hasDynamicHelp": false,
4759
- "multiple": false,
4760
- "type": "option"
4740
+ "discard": {
4741
+ "description": "Drop the pending script(s), keeping the promoted one",
4742
+ "exclusive": [
4743
+ "promote"
4744
+ ],
4745
+ "name": "discard",
4746
+ "allowNo": false,
4747
+ "type": "boolean"
4761
4748
  },
4762
- "status": {
4763
- "char": "s",
4764
- "description": "Filter by status",
4765
- "name": "status",
4749
+ "yes": {
4750
+ "char": "y",
4751
+ "description": "Confirm a bulk --promote/--discard that was not narrowed with --test",
4752
+ "name": "yes",
4753
+ "allowNo": false,
4754
+ "type": "boolean"
4755
+ }
4756
+ },
4757
+ "hasDynamicHelp": false,
4758
+ "hiddenAliases": [],
4759
+ "id": "test:scripts",
4760
+ "pluginAlias": "@memberjunction/cli",
4761
+ "pluginName": "@memberjunction/cli",
4762
+ "pluginType": "core",
4763
+ "strict": true,
4764
+ "enableJsonFlag": false,
4765
+ "isESM": true,
4766
+ "relativePath": [
4767
+ "dist",
4768
+ "commands",
4769
+ "test",
4770
+ "scripts.js"
4771
+ ]
4772
+ },
4773
+ "test:suite": {
4774
+ "aliases": [],
4775
+ "args": {
4776
+ "suiteId": {
4777
+ "description": "Test suite ID to execute",
4778
+ "name": "suiteId",
4779
+ "required": false
4780
+ }
4781
+ },
4782
+ "description": "Execute a test suite",
4783
+ "examples": [
4784
+ "<%= config.bin %> <%= command.id %> <suite-id>",
4785
+ "<%= config.bin %> <%= command.id %> --name=\"Agent Quality Suite\"",
4786
+ "<%= config.bin %> <%= command.id %> <suite-id> --format=json",
4787
+ "<%= config.bin %> <%= command.id %> <suite-id> --output=suite-results.json"
4788
+ ],
4789
+ "flags": {
4790
+ "name": {
4791
+ "char": "n",
4792
+ "description": "Test suite name to execute",
4793
+ "name": "name",
4766
4794
  "hasDynamicHelp": false,
4767
4795
  "multiple": false,
4768
4796
  "type": "option"
@@ -4795,15 +4823,60 @@
4795
4823
  },
4796
4824
  "verbose": {
4797
4825
  "char": "v",
4798
- "description": "Show detailed information",
4826
+ "description": "Show detailed execution information",
4799
4827
  "name": "verbose",
4800
4828
  "allowNo": false,
4801
4829
  "type": "boolean"
4830
+ },
4831
+ "delay": {
4832
+ "char": "d",
4833
+ "description": "Delay in milliseconds between test executions (avoids Auth0 rate limits)",
4834
+ "name": "delay",
4835
+ "default": 0,
4836
+ "hasDynamicHelp": false,
4837
+ "multiple": false,
4838
+ "type": "option"
4839
+ },
4840
+ "parallel": {
4841
+ "char": "p",
4842
+ "description": "Run tests in parallel with shared browser sessions",
4843
+ "name": "parallel",
4844
+ "allowNo": false,
4845
+ "type": "boolean"
4846
+ },
4847
+ "max-parallel": {
4848
+ "description": "Maximum number of parallel workers (default 4)",
4849
+ "name": "max-parallel",
4850
+ "default": 4,
4851
+ "hasDynamicHelp": false,
4852
+ "multiple": false,
4853
+ "type": "option"
4854
+ },
4855
+ "flaky-check": {
4856
+ "description": "Run each test N times to detect flakiness (variance > 0.3 or mixed pass/fail = flaky). Recommended: 3 or 5",
4857
+ "name": "flaky-check",
4858
+ "hasDynamicHelp": false,
4859
+ "multiple": false,
4860
+ "type": "option"
4861
+ },
4862
+ "checks-module": {
4863
+ "description": "Module specifier (package name or path) side-effect-imported before the run so its integration check bundles register on the IntegrationCheckRegistry. Durable form: mj.config.cjs `testing.checkModules` (this repo loads '@memberjunction/integration-test-suite' that way).",
4864
+ "name": "checks-module",
4865
+ "hasDynamicHelp": false,
4866
+ "multiple": false,
4867
+ "type": "option"
4868
+ },
4869
+ "oracles-module": {
4870
+ "description": "Path to a JS/TS module that exports custom IOracle classes or instances. Each export is registered on the engine before the suite runs — used by non-MJ adopters to plug app-specific oracle types without modifying TestingFramework.",
4871
+ "name": "oracles-module",
4872
+ "hasDynamicHelp": false,
4873
+ "multiple": false,
4874
+ "type": "option"
4802
4875
  }
4803
4876
  },
4804
4877
  "hasDynamicHelp": false,
4805
4878
  "hiddenAliases": [],
4806
- "id": "test:history",
4879
+ "id": "test:suite",
4807
4880
  "pluginAlias": "@memberjunction/cli",
4808
4881
  "pluginName": "@memberjunction/cli",
4809
4882
  "pluginType": "core",
@@ -4814,25 +4887,30 @@
4814
4887
  "dist",
4815
4888
  "commands",
4816
4889
  "test",
4817
- "history.js"
4890
+ "suite.js"
4818
4891
  ]
4819
4892
  },
4820
- "test": {
4893
+ "test:usage": {
4821
4894
  "aliases": [],
4822
4895
  "args": {},
4823
- "description": "MemberJunction Testing Framework - Execute and manage tests",
4824
- "examples": [
4825
- "<%= config.bin %> <%= command.id %> run <test-id>",
4826
- "<%= config.bin %> <%= command.id %> run --name=\"Active Members Count\"",
4827
- "<%= config.bin %> <%= command.id %> suite <suite-id>",
4828
- "<%= config.bin %> <%= command.id %> list",
4829
- "<%= config.bin %> <%= command.id %> list --suites",
4830
- "<%= config.bin %> <%= command.id %> validate --all"
4831
- ],
4832
- "flags": {},
4896
+ "description": "Show usage, flags, examples, and runtime hints for every `mj test` command.",
4897
+ "flags": {
4898
+ "format": {
4899
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4900
+ "name": "format",
4901
+ "hasDynamicHelp": false,
4902
+ "multiple": false,
4903
+ "options": [
4904
+ "text",
4905
+ "json",
4906
+ "md"
4907
+ ],
4908
+ "type": "option"
4909
+ }
4910
+ },
4833
4911
  "hasDynamicHelp": false,
4834
4912
  "hiddenAliases": [],
4835
- "id": "test",
4913
+ "id": "test:usage",
4836
4914
  "pluginAlias": "@memberjunction/cli",
4837
4915
  "pluginName": "@memberjunction/cli",
4838
4916
  "pluginType": "core",
@@ -4843,57 +4921,48 @@
4843
4921
  "dist",
4844
4922
  "commands",
4845
4923
  "test",
4846
- "index.js"
4924
+ "usage.js"
4847
4925
  ]
4848
4926
  },
4849
- "test:list": {
4927
+ "test:validate": {
4850
4928
  "aliases": [],
4851
- "args": {},
4852
- "description": "List available tests, suites, and types",
4929
+ "args": {
4930
+ "testId": {
4931
+ "description": "Test ID to validate",
4932
+ "name": "testId",
4933
+ "required": false
4934
+ }
4935
+ },
4936
+ "description": "Validate test definitions without executing",
4853
4937
  "examples": [
4854
- "<%= config.bin %> <%= command.id %>",
4855
- "<%= config.bin %> <%= command.id %> --suites",
4856
- "<%= config.bin %> <%= command.id %> --types",
4938
+ "<%= config.bin %> <%= command.id %> <test-id>",
4939
+ "<%= config.bin %> <%= command.id %> --all",
4857
4940
  "<%= config.bin %> <%= command.id %> --type=agent-eval",
4858
- "<%= config.bin %> <%= command.id %> --tag=smoke",
4859
- "<%= config.bin %> <%= command.id %> --status=active --verbose"
4941
+ "<%= config.bin %> <%= command.id %> --all --save-report",
4942
+ "<%= config.bin %> <%= command.id %> --all --output=validation-report.md"
4860
4943
  ],
4861
4944
  "flags": {
4862
- "suites": {
4863
- "description": "List test suites instead of tests",
4864
- "name": "suites",
4865
- "allowNo": false,
4866
- "type": "boolean"
4867
- },
4868
- "types": {
4869
- "description": "List test types",
4870
- "name": "types",
4945
+ "all": {
4946
+ "char": "a",
4947
+ "description": "Validate all tests",
4948
+ "name": "all",
4871
4949
  "allowNo": false,
4872
4950
  "type": "boolean"
4873
4951
  },
4874
4952
  "type": {
4875
- "char": "t",
4876
- "description": "Filter by test type",
4877
- "name": "type",
4878
- "hasDynamicHelp": false,
4879
- "multiple": false,
4880
- "type": "option"
4881
- },
4882
- "tag": {
4883
- "description": "Filter by tag",
4884
- "name": "tag",
4885
- "hasDynamicHelp": false,
4886
- "multiple": false,
4887
- "type": "option"
4888
- },
4889
- "status": {
4890
- "char": "s",
4891
- "description": "Filter by status",
4892
- "name": "status",
4953
+ "char": "t",
4954
+ "description": "Validate tests by type",
4955
+ "name": "type",
4893
4956
  "hasDynamicHelp": false,
4894
4957
  "multiple": false,
4895
4958
  "type": "option"
4896
4959
  },
4960
+ "save-report": {
4961
+ "description": "Save validation report to file",
4962
+ "name": "save-report",
4963
+ "allowNo": false,
4964
+ "type": "boolean"
4965
+ },
4897
4966
  "format": {
4898
4967
  "char": "f",
4899
4968
  "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
@@ -4930,7 +4999,7 @@
4930
4999
  },
4931
5000
  "hasDynamicHelp": false,
4932
5001
  "hiddenAliases": [],
4933
- "id": "test:list",
5002
+ "id": "test:validate",
4934
5003
  "pluginAlias": "@memberjunction/cli",
4935
5004
  "pluginName": "@memberjunction/cli",
4936
5005
  "pluginType": "core",
@@ -4941,100 +5010,95 @@
4941
5010
  "dist",
4942
5011
  "commands",
4943
5012
  "test",
4944
- "list.js"
5013
+ "validate.js"
4945
5014
  ]
4946
5015
  },
4947
- "test:run": {
5016
+ "translate-sql": {
4948
5017
  "aliases": [],
4949
- "args": {
4950
- "testId": {
4951
- "description": "Test ID to execute",
4952
- "name": "testId",
4953
- "required": false
4954
- }
4955
- },
4956
- "description": "Execute a single test by ID or name",
5018
+ "args": {},
5019
+ "description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
4957
5020
  "examples": [
4958
- "<%= config.bin %> <%= command.id %> <test-id>",
4959
- "<%= config.bin %> <%= command.id %> --name=\"Active Members Count\"",
4960
- "<%= config.bin %> <%= command.id %> <test-id> --environment=staging",
4961
- "<%= config.bin %> <%= command.id %> <test-id> --format=json --output=results.json",
4962
- "<%= config.bin %> <%= command.id %> <test-id> --dry-run"
5021
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
5022
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
5023
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --sql \"SELECT TOP 10 [Name] FROM [Users]\"",
5024
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope all --output ./reports"
4963
5025
  ],
4964
5026
  "flags": {
4965
- "name": {
4966
- "char": "n",
4967
- "description": "Test name to execute",
4968
- "name": "name",
5027
+ "from": {
5028
+ "description": "Source SQL dialect",
5029
+ "name": "from",
5030
+ "required": true,
4969
5031
  "hasDynamicHelp": false,
4970
5032
  "multiple": false,
5033
+ "options": [
5034
+ "sqlserver",
5035
+ "postgresql"
5036
+ ],
4971
5037
  "type": "option"
4972
5038
  },
4973
- "environment": {
4974
- "char": "e",
4975
- "description": "Environment context (dev, staging, prod)",
4976
- "name": "environment",
5039
+ "to": {
5040
+ "description": "Target SQL dialect",
5041
+ "name": "to",
5042
+ "required": true,
4977
5043
  "hasDynamicHelp": false,
4978
5044
  "multiple": false,
5045
+ "options": [
5046
+ "sqlserver",
5047
+ "postgresql"
5048
+ ],
4979
5049
  "type": "option"
4980
5050
  },
4981
- "format": {
4982
- "char": "f",
4983
- "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
4984
- "name": "format",
5051
+ "scope": {
5052
+ "description": "What to scan for translation",
5053
+ "name": "scope",
5054
+ "default": "all",
4985
5055
  "hasDynamicHelp": false,
4986
5056
  "multiple": false,
4987
5057
  "options": [
4988
- "text",
4989
- "json",
4990
- "md",
4991
- "human",
4992
- "console",
4993
- "markdown",
4994
- "compact",
4995
- "table"
5058
+ "queries",
5059
+ "views",
5060
+ "filters",
5061
+ "all"
4996
5062
  ],
4997
5063
  "type": "option"
4998
5064
  },
4999
- "output": {
5000
- "char": "o",
5001
- "description": "Output file path",
5002
- "name": "output",
5065
+ "sql": {
5066
+ "description": "Translate a single SQL fragment (inline mode)",
5067
+ "name": "sql",
5003
5068
  "hasDynamicHelp": false,
5004
5069
  "multiple": false,
5005
5070
  "type": "option"
5006
5071
  },
5007
5072
  "dry-run": {
5008
- "description": "Validate without executing",
5073
+ "description": "Show what would be translated without making changes",
5009
5074
  "name": "dry-run",
5010
5075
  "allowNo": false,
5011
5076
  "type": "boolean"
5012
5077
  },
5013
- "verbose": {
5014
- "char": "v",
5015
- "description": "Show detailed execution information",
5016
- "name": "verbose",
5078
+ "review": {
5079
+ "description": "Generate review report only (no writes to database)",
5080
+ "name": "review",
5017
5081
  "allowNo": false,
5018
5082
  "type": "boolean"
5019
5083
  },
5020
- "checks-module": {
5021
- "description": "Module specifier (package name or path) side-effect-imported before the run so its integration check bundles register on the IntegrationCheckRegistry. Durable form: mj.config.cjs `testing.checkModules` (this repo loads '@memberjunction/integration-test-suite' that way).",
5022
- "name": "checks-module",
5084
+ "output": {
5085
+ "char": "o",
5086
+ "description": "Output directory for the translation report",
5087
+ "name": "output",
5023
5088
  "hasDynamicHelp": false,
5024
5089
  "multiple": false,
5025
5090
  "type": "option"
5026
5091
  },
5027
- "oracles-module": {
5028
- "description": "Path to a JS/TS module that exports custom IOracle classes or instances. Each export is registered on the engine before the test runs — used by non-MJ adopters to plug app-specific oracle types without modifying TestingFramework.",
5029
- "name": "oracles-module",
5030
- "hasDynamicHelp": false,
5031
- "multiple": false,
5032
- "type": "option"
5092
+ "force": {
5093
+ "description": "Re-translate even if platform variants already exist",
5094
+ "name": "force",
5095
+ "allowNo": false,
5096
+ "type": "boolean"
5033
5097
  }
5034
5098
  },
5035
5099
  "hasDynamicHelp": false,
5036
5100
  "hiddenAliases": [],
5037
- "id": "test:run",
5101
+ "id": "translate-sql",
5038
5102
  "pluginAlias": "@memberjunction/cli",
5039
5103
  "pluginName": "@memberjunction/cli",
5040
5104
  "pluginType": "core",
@@ -5044,58 +5108,31 @@
5044
5108
  "relativePath": [
5045
5109
  "dist",
5046
5110
  "commands",
5047
- "test",
5048
- "run.js"
5111
+ "translate-sql",
5112
+ "index.js"
5049
5113
  ]
5050
5114
  },
5051
- "test:scripts": {
5115
+ "translate-sql:usage": {
5052
5116
  "aliases": [],
5053
5117
  "args": {},
5054
- "description": "Review and promote recorded replay scripts. A run that re-derives a test which already had a script stores the new one as pending rather than replacing what replay uses, so a UI change never rewrites the suite unnoticed. This is where you see the drift and decide.",
5055
- "examples": [
5056
- "<%= config.bin %> <%= command.id %>",
5057
- "<%= config.bin %> <%= command.id %> --test \"T042 - Filter Grid\"",
5058
- "<%= config.bin %> <%= command.id %> --promote --test \"T042 - Filter Grid\"",
5059
- "<%= config.bin %> <%= command.id %> --promote --yes",
5060
- "<%= config.bin %> <%= command.id %> --discard --test \"T042 - Filter Grid\""
5061
- ],
5118
+ "description": "Show usage, flags, examples, and runtime hints for every `mj translate-sql` command.",
5062
5119
  "flags": {
5063
- "test": {
5064
- "description": "Limit to one test, by name or ID",
5065
- "name": "test",
5120
+ "format": {
5121
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
5122
+ "name": "format",
5066
5123
  "hasDynamicHelp": false,
5067
5124
  "multiple": false,
5068
- "type": "option"
5069
- },
5070
- "promote": {
5071
- "description": "Promote the pending script(s) into the slot replay uses",
5072
- "exclusive": [
5073
- "discard"
5074
- ],
5075
- "name": "promote",
5076
- "allowNo": false,
5077
- "type": "boolean"
5078
- },
5079
- "discard": {
5080
- "description": "Drop the pending script(s), keeping the promoted one",
5081
- "exclusive": [
5082
- "promote"
5125
+ "options": [
5126
+ "text",
5127
+ "json",
5128
+ "md"
5083
5129
  ],
5084
- "name": "discard",
5085
- "allowNo": false,
5086
- "type": "boolean"
5087
- },
5088
- "yes": {
5089
- "char": "y",
5090
- "description": "Confirm a bulk --promote/--discard that was not narrowed with --test",
5091
- "name": "yes",
5092
- "allowNo": false,
5093
- "type": "boolean"
5130
+ "type": "option"
5094
5131
  }
5095
5132
  },
5096
5133
  "hasDynamicHelp": false,
5097
5134
  "hiddenAliases": [],
5098
- "id": "test:scripts",
5135
+ "id": "translate-sql:usage",
5099
5136
  "pluginAlias": "@memberjunction/cli",
5100
5137
  "pluginName": "@memberjunction/cli",
5101
5138
  "pluginType": "core",
@@ -5105,117 +5142,135 @@
5105
5142
  "relativePath": [
5106
5143
  "dist",
5107
5144
  "commands",
5108
- "test",
5109
- "scripts.js"
5145
+ "translate-sql",
5146
+ "usage.js"
5110
5147
  ]
5111
5148
  },
5112
- "test:suite": {
5149
+ "update:claude": {
5113
5150
  "aliases": [],
5114
- "args": {
5115
- "suiteId": {
5116
- "description": "Test suite ID to execute",
5117
- "name": "suiteId",
5118
- "required": false
5119
- }
5120
- },
5121
- "description": "Execute a test suite",
5151
+ "args": {},
5152
+ "description": "Update the Claude Code pack in the current directory.",
5122
5153
  "examples": [
5123
- "<%= config.bin %> <%= command.id %> <suite-id>",
5124
- "<%= config.bin %> <%= command.id %> --name=\"Agent Quality Suite\"",
5125
- "<%= config.bin %> <%= command.id %> <suite-id> --format=json",
5126
- "<%= config.bin %> <%= command.id %> <suite-id> --output=suite-results.json"
5154
+ "<%= config.bin %> update:claude",
5155
+ "<%= config.bin %> update:claude --check",
5156
+ "<%= config.bin %> update:claude --refresh-commands",
5157
+ "<%= config.bin %> update:claude --allow-major",
5158
+ "<%= config.bin %> update:claude --json"
5127
5159
  ],
5128
5160
  "flags": {
5129
- "name": {
5130
- "char": "n",
5131
- "description": "Test suite name to execute",
5132
- "name": "name",
5133
- "hasDynamicHelp": false,
5134
- "multiple": false,
5135
- "type": "option"
5136
- },
5137
- "format": {
5138
- "char": "f",
5139
- "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
5140
- "name": "format",
5141
- "hasDynamicHelp": false,
5142
- "multiple": false,
5143
- "options": [
5144
- "text",
5145
- "json",
5146
- "md",
5147
- "human",
5148
- "console",
5149
- "markdown",
5150
- "compact",
5151
- "table"
5152
- ],
5153
- "type": "option"
5154
- },
5155
- "output": {
5156
- "char": "o",
5157
- "description": "Output file path",
5158
- "name": "output",
5159
- "hasDynamicHelp": false,
5160
- "multiple": false,
5161
- "type": "option"
5162
- },
5163
- "verbose": {
5164
- "char": "v",
5165
- "description": "Show detailed execution information",
5166
- "name": "verbose",
5167
- "allowNo": false,
5168
- "type": "boolean"
5169
- },
5170
- "delay": {
5171
- "char": "d",
5172
- "description": "Delay in milliseconds between test executions (avoids Auth0 rate limits)",
5173
- "name": "delay",
5174
- "default": 0,
5175
- "hasDynamicHelp": false,
5176
- "multiple": false,
5177
- "type": "option"
5178
- },
5179
- "parallel": {
5180
- "char": "p",
5181
- "description": "Run tests in parallel with shared browser sessions",
5182
- "name": "parallel",
5183
- "allowNo": false,
5184
- "type": "boolean"
5185
- },
5186
- "max-parallel": {
5187
- "description": "Maximum number of parallel workers (default 4)",
5188
- "name": "max-parallel",
5189
- "default": 4,
5161
+ "dir": {
5162
+ "description": "Target directory",
5163
+ "name": "dir",
5164
+ "default": ".",
5190
5165
  "hasDynamicHelp": false,
5191
5166
  "multiple": false,
5192
5167
  "type": "option"
5193
5168
  },
5194
- "flaky-check": {
5195
- "description": "Run each test N times to detect flakiness (variance > 0.3 or mixed pass/fail = flaky). Recommended: 3 or 5",
5196
- "name": "flaky-check",
5169
+ "major": {
5170
+ "description": "Force a specific MJ major (default: detected from package.json)",
5171
+ "name": "major",
5197
5172
  "hasDynamicHelp": false,
5198
5173
  "multiple": false,
5199
5174
  "type": "option"
5200
5175
  },
5201
- "checks-module": {
5202
- "description": "Module specifier (package name or path) side-effect-imported before the run so its integration check bundles register on the IntegrationCheckRegistry. Durable form: mj.config.cjs `testing.checkModules` (this repo loads '@memberjunction/integration-test-suite' that way).",
5203
- "name": "checks-module",
5176
+ "ref": {
5177
+ "description": "Git ref to fetch from (branch or tag). Default: main.",
5178
+ "name": "ref",
5204
5179
  "hasDynamicHelp": false,
5205
5180
  "multiple": false,
5206
5181
  "type": "option"
5207
5182
  },
5208
- "oracles-module": {
5209
- "description": "Path to a JS/TS module that exports custom IOracle classes or instances. Each export is registered on the engine before the suite runs — used by non-MJ adopters to plug app-specific oracle types without modifying TestingFramework.",
5210
- "name": "oracles-module",
5183
+ "from": {
5184
+ "description": "Use a local pack source instead of fetching from GitHub",
5185
+ "name": "from",
5211
5186
  "hasDynamicHelp": false,
5212
5187
  "multiple": false,
5213
5188
  "type": "option"
5189
+ },
5190
+ "offline": {
5191
+ "description": "Forbid network; requires --from <path>",
5192
+ "name": "offline",
5193
+ "allowNo": false,
5194
+ "type": "boolean"
5195
+ },
5196
+ "dry-run": {
5197
+ "description": "Print what would be written; change nothing",
5198
+ "name": "dry-run",
5199
+ "allowNo": false,
5200
+ "type": "boolean"
5201
+ },
5202
+ "yes": {
5203
+ "char": "y",
5204
+ "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
5205
+ "name": "yes",
5206
+ "allowNo": false,
5207
+ "type": "boolean"
5208
+ },
5209
+ "force": {
5210
+ "description": "Overwrite user-customized commands/skills (saves .bak files)",
5211
+ "name": "force",
5212
+ "allowNo": false,
5213
+ "type": "boolean"
5214
+ },
5215
+ "skip-commands": {
5216
+ "description": "Skip seeding .claude/commands/",
5217
+ "name": "skip-commands",
5218
+ "allowNo": false,
5219
+ "type": "boolean"
5220
+ },
5221
+ "skip-skills": {
5222
+ "description": "Skip seeding .claude/skills/",
5223
+ "name": "skip-skills",
5224
+ "allowNo": false,
5225
+ "type": "boolean"
5226
+ },
5227
+ "skip-settings": {
5228
+ "description": "Skip merging .claude/settings.json",
5229
+ "name": "skip-settings",
5230
+ "allowNo": false,
5231
+ "type": "boolean"
5232
+ },
5233
+ "check": {
5234
+ "description": "Compare local pack version to remote without writing anything",
5235
+ "name": "check",
5236
+ "allowNo": false,
5237
+ "type": "boolean"
5238
+ },
5239
+ "refresh-commands": {
5240
+ "description": "Force-resync .claude/commands/* from the pack (saves .bak files)",
5241
+ "name": "refresh-commands",
5242
+ "allowNo": false,
5243
+ "type": "boolean"
5244
+ },
5245
+ "refresh-skills": {
5246
+ "description": "Force-resync .claude/skills/** from the pack (saves .bak files)",
5247
+ "name": "refresh-skills",
5248
+ "allowNo": false,
5249
+ "type": "boolean"
5250
+ },
5251
+ "allow-major": {
5252
+ "description": "Allow the remote pack's major to differ from local MJ's major",
5253
+ "name": "allow-major",
5254
+ "allowNo": false,
5255
+ "type": "boolean"
5256
+ },
5257
+ "json": {
5258
+ "description": "Output as JSON (matches plan §7.5 schema)",
5259
+ "name": "json",
5260
+ "allowNo": false,
5261
+ "type": "boolean"
5262
+ },
5263
+ "verbose": {
5264
+ "char": "v",
5265
+ "description": "Show progress messages",
5266
+ "name": "verbose",
5267
+ "allowNo": false,
5268
+ "type": "boolean"
5214
5269
  }
5215
5270
  },
5216
5271
  "hasDynamicHelp": false,
5217
5272
  "hiddenAliases": [],
5218
- "id": "test:suite",
5273
+ "id": "update:claude",
5219
5274
  "pluginAlias": "@memberjunction/cli",
5220
5275
  "pluginName": "@memberjunction/cli",
5221
5276
  "pluginType": "core",
@@ -5225,14 +5280,14 @@
5225
5280
  "relativePath": [
5226
5281
  "dist",
5227
5282
  "commands",
5228
- "test",
5229
- "suite.js"
5283
+ "update",
5284
+ "claude.js"
5230
5285
  ]
5231
5286
  },
5232
- "test:usage": {
5287
+ "update:usage": {
5233
5288
  "aliases": [],
5234
5289
  "args": {},
5235
- "description": "Show usage, flags, examples, and runtime hints for every `mj test` command.",
5290
+ "description": "Show usage, flags, examples, and runtime hints for every `mj update` command.",
5236
5291
  "flags": {
5237
5292
  "format": {
5238
5293
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -5249,7 +5304,7 @@
5249
5304
  },
5250
5305
  "hasDynamicHelp": false,
5251
5306
  "hiddenAliases": [],
5252
- "id": "test:usage",
5307
+ "id": "update:usage",
5253
5308
  "pluginAlias": "@memberjunction/cli",
5254
5309
  "pluginName": "@memberjunction/cli",
5255
5310
  "pluginType": "core",
@@ -5259,86 +5314,102 @@
5259
5314
  "relativePath": [
5260
5315
  "dist",
5261
5316
  "commands",
5262
- "test",
5317
+ "update",
5263
5318
  "usage.js"
5264
5319
  ]
5265
5320
  },
5266
- "test:validate": {
5321
+ "migrate:convert": {
5267
5322
  "aliases": [],
5268
- "args": {
5269
- "testId": {
5270
- "description": "Test ID to validate",
5271
- "name": "testId",
5272
- "required": false
5273
- }
5274
- },
5275
- "description": "Validate test definitions without executing",
5323
+ "args": {},
5324
+ "description": "Convert T-SQL migrations to PostgreSQL",
5276
5325
  "examples": [
5277
- "<%= config.bin %> <%= command.id %> <test-id>",
5278
- "<%= config.bin %> <%= command.id %> --all",
5279
- "<%= config.bin %> <%= command.id %> --type=agent-eval",
5280
- "<%= config.bin %> <%= command.id %> --all --save-report",
5281
- "<%= config.bin %> <%= command.id %> --all --output=validation-report.md"
5326
+ "<%= config.bin %> migrate convert --split",
5327
+ "<%= config.bin %> migrate convert --split --dry-run",
5328
+ "<%= config.bin %> migrate convert --split --file V202604060452__v5.24.x__KnowledgeHub.sql",
5329
+ "<%= config.bin %> migrate convert --source-dir ./migrations/v5 --output-dir ./migrations-pg/v5",
5330
+ "<%= config.bin %> migrate convert --verbose"
5282
5331
  ],
5283
5332
  "flags": {
5284
- "all": {
5285
- "char": "a",
5286
- "description": "Validate all tests",
5287
- "name": "all",
5288
- "allowNo": false,
5289
- "type": "boolean"
5333
+ "source-dir": {
5334
+ "description": "Source T-SQL migrations directory",
5335
+ "name": "source-dir",
5336
+ "default": "./migrations/v5",
5337
+ "hasDynamicHelp": false,
5338
+ "multiple": false,
5339
+ "type": "option"
5290
5340
  },
5291
- "type": {
5292
- "char": "t",
5293
- "description": "Validate tests by type",
5294
- "name": "type",
5341
+ "output-dir": {
5342
+ "description": "Output PG migrations directory",
5343
+ "name": "output-dir",
5344
+ "default": "./migrations-pg/v5",
5295
5345
  "hasDynamicHelp": false,
5296
5346
  "multiple": false,
5297
5347
  "type": "option"
5298
5348
  },
5299
- "save-report": {
5300
- "description": "Save validation report to file",
5301
- "name": "save-report",
5302
- "allowNo": false,
5303
- "type": "boolean"
5349
+ "file": {
5350
+ "description": "Convert a specific file (filename only, looked up in source-dir)",
5351
+ "name": "file",
5352
+ "hasDynamicHelp": false,
5353
+ "multiple": false,
5354
+ "type": "option"
5304
5355
  },
5305
- "format": {
5306
- "char": "f",
5307
- "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
5308
- "name": "format",
5356
+ "schema": {
5357
+ "description": "Target schema name",
5358
+ "name": "schema",
5359
+ "default": "__mj",
5309
5360
  "hasDynamicHelp": false,
5310
5361
  "multiple": false,
5311
- "options": [
5312
- "text",
5313
- "json",
5314
- "md",
5315
- "human",
5316
- "console",
5317
- "markdown",
5318
- "compact",
5319
- "table"
5320
- ],
5321
5362
  "type": "option"
5322
5363
  },
5323
- "output": {
5324
- "char": "o",
5325
- "description": "Output file path",
5326
- "name": "output",
5364
+ "core-schema": {
5365
+ "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.",
5366
+ "name": "core-schema",
5367
+ "default": "__mj",
5327
5368
  "hasDynamicHelp": false,
5328
5369
  "multiple": false,
5329
5370
  "type": "option"
5330
5371
  },
5372
+ "dry-run": {
5373
+ "description": "Show what would be converted without writing files",
5374
+ "name": "dry-run",
5375
+ "allowNo": false,
5376
+ "type": "boolean"
5377
+ },
5378
+ "no-header": {
5379
+ "description": "Skip PG header (extensions, schema, implicit cast)",
5380
+ "name": "no-header",
5381
+ "allowNo": false,
5382
+ "type": "boolean"
5383
+ },
5331
5384
  "verbose": {
5332
5385
  "char": "v",
5333
- "description": "Show detailed information",
5386
+ "description": "Show per-statement progress",
5334
5387
  "name": "verbose",
5335
5388
  "allowNo": false,
5336
5389
  "type": "boolean"
5390
+ },
5391
+ "split": {
5392
+ "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.",
5393
+ "name": "split",
5394
+ "allowNo": false,
5395
+ "type": "boolean"
5396
+ },
5397
+ "allow-gaps": {
5398
+ "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.",
5399
+ "name": "allow-gaps",
5400
+ "allowNo": false,
5401
+ "type": "boolean"
5402
+ },
5403
+ "bake-codegen": {
5404
+ "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.",
5405
+ "name": "bake-codegen",
5406
+ "allowNo": false,
5407
+ "type": "boolean"
5337
5408
  }
5338
5409
  },
5339
5410
  "hasDynamicHelp": false,
5340
5411
  "hiddenAliases": [],
5341
- "id": "test:validate",
5412
+ "id": "migrate:convert",
5342
5413
  "pluginAlias": "@memberjunction/cli",
5343
5414
  "pluginName": "@memberjunction/cli",
5344
5415
  "pluginType": "core",
@@ -5348,37 +5419,38 @@
5348
5419
  "relativePath": [
5349
5420
  "dist",
5350
5421
  "commands",
5351
- "test",
5352
- "validate.js"
5422
+ "migrate",
5423
+ "convert.js"
5353
5424
  ]
5354
5425
  },
5355
- "translate-sql": {
5426
+ "migrate:create": {
5356
5427
  "aliases": [],
5357
- "args": {},
5358
- "description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
5428
+ "args": {
5429
+ "description": {
5430
+ "description": "Short description (will be converted to PascalCase with underscores)",
5431
+ "name": "description",
5432
+ "required": true
5433
+ }
5434
+ },
5435
+ "description": "Scaffold a new migration file for the current database platform",
5359
5436
  "examples": [
5360
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
5361
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
5362
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --sql \"SELECT TOP 10 [Name] FROM [Users]\"",
5363
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope all --output ./reports"
5437
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\"",
5438
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --version 5.25 --platform postgresql",
5439
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --dir ./migrations/v5"
5364
5440
  ],
5365
5441
  "flags": {
5366
- "from": {
5367
- "description": "Source SQL dialect",
5368
- "name": "from",
5369
- "required": true,
5442
+ "version": {
5443
+ "char": "v",
5444
+ "description": "Migration version tag, e.g. \"5.25\" (default: parsed from repo baseline or \"0.0\")",
5445
+ "name": "version",
5370
5446
  "hasDynamicHelp": false,
5371
5447
  "multiple": false,
5372
- "options": [
5373
- "sqlserver",
5374
- "postgresql"
5375
- ],
5376
5448
  "type": "option"
5377
5449
  },
5378
- "to": {
5379
- "description": "Target SQL dialect",
5380
- "name": "to",
5381
- "required": true,
5450
+ "platform": {
5451
+ "char": "p",
5452
+ "description": "Override platform: sqlserver | postgresql (default: config.dbPlatform)",
5453
+ "name": "platform",
5382
5454
  "hasDynamicHelp": false,
5383
5455
  "multiple": false,
5384
5456
  "options": [
@@ -5387,57 +5459,23 @@
5387
5459
  ],
5388
5460
  "type": "option"
5389
5461
  },
5390
- "scope": {
5391
- "description": "What to scan for translation",
5392
- "name": "scope",
5393
- "default": "all",
5394
- "hasDynamicHelp": false,
5395
- "multiple": false,
5396
- "options": [
5397
- "queries",
5398
- "views",
5399
- "filters",
5400
- "all"
5401
- ],
5402
- "type": "option"
5403
- },
5404
- "sql": {
5405
- "description": "Translate a single SQL fragment (inline mode)",
5406
- "name": "sql",
5407
- "hasDynamicHelp": false,
5408
- "multiple": false,
5409
- "type": "option"
5410
- },
5411
- "dry-run": {
5412
- "description": "Show what would be translated without making changes",
5413
- "name": "dry-run",
5414
- "allowNo": false,
5415
- "type": "boolean"
5416
- },
5417
- "review": {
5418
- "description": "Generate review report only (no writes to database)",
5419
- "name": "review",
5420
- "allowNo": false,
5421
- "type": "boolean"
5422
- },
5423
- "output": {
5424
- "char": "o",
5425
- "description": "Output directory for the translation report",
5426
- "name": "output",
5462
+ "dir": {
5463
+ "description": "Output directory (default: ./migrations/v5 or ./migrations-pg/v5)",
5464
+ "name": "dir",
5427
5465
  "hasDynamicHelp": false,
5428
5466
  "multiple": false,
5429
5467
  "type": "option"
5430
5468
  },
5431
- "force": {
5432
- "description": "Re-translate even if platform variants already exist",
5433
- "name": "force",
5469
+ "x-x": {
5470
+ "description": "Use {version}.x.x suffix instead of {version}.x (e.g. 5.25.x instead of 5.25.x)",
5471
+ "name": "x-x",
5434
5472
  "allowNo": false,
5435
5473
  "type": "boolean"
5436
5474
  }
5437
5475
  },
5438
5476
  "hasDynamicHelp": false,
5439
5477
  "hiddenAliases": [],
5440
- "id": "translate-sql",
5478
+ "id": "migrate:create",
5441
5479
  "pluginAlias": "@memberjunction/cli",
5442
5480
  "pluginName": "@memberjunction/cli",
5443
5481
  "pluginType": "core",
@@ -5447,31 +5485,60 @@
5447
5485
  "relativePath": [
5448
5486
  "dist",
5449
5487
  "commands",
5450
- "translate-sql",
5451
- "index.js"
5488
+ "migrate",
5489
+ "create.js"
5452
5490
  ]
5453
5491
  },
5454
- "translate-sql:usage": {
5492
+ "migrate": {
5455
5493
  "aliases": [],
5456
5494
  "args": {},
5457
- "description": "Show usage, flags, examples, and runtime hints for every `mj translate-sql` command.",
5495
+ "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.",
5496
+ "examples": [
5497
+ "<%= config.bin %> <%= command.id %>\n",
5498
+ "<%= config.bin %> <%= command.id %> --schema __BCSaaS --dir ./migrations/v1\n",
5499
+ "<%= config.bin %> <%= command.id %> --schema __BCSaaS --tag v1.0.0\n"
5500
+ ],
5458
5501
  "flags": {
5459
- "format": {
5460
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
5461
- "name": "format",
5502
+ "verbose": {
5503
+ "char": "v",
5504
+ "description": "Enable additional logging",
5505
+ "name": "verbose",
5506
+ "allowNo": false,
5507
+ "type": "boolean"
5508
+ },
5509
+ "tag": {
5510
+ "char": "t",
5511
+ "description": "Version tag to use for running remote migrations",
5512
+ "name": "tag",
5513
+ "hasDynamicHelp": false,
5514
+ "multiple": false,
5515
+ "type": "option"
5516
+ },
5517
+ "schema": {
5518
+ "char": "s",
5519
+ "description": "Target schema (overrides coreSchema from config)",
5520
+ "name": "schema",
5521
+ "hasDynamicHelp": false,
5522
+ "multiple": false,
5523
+ "type": "option"
5524
+ },
5525
+ "dir": {
5526
+ "description": "Migration source directory (overrides migrationsLocation from config)",
5527
+ "name": "dir",
5462
5528
  "hasDynamicHelp": false,
5463
5529
  "multiple": false,
5464
- "options": [
5465
- "text",
5466
- "json",
5467
- "md"
5468
- ],
5469
5530
  "type": "option"
5531
+ },
5532
+ "check-connection": {
5533
+ "description": "Verify the database connection (including TLS) and exit without migrating",
5534
+ "name": "check-connection",
5535
+ "allowNo": false,
5536
+ "type": "boolean"
5470
5537
  }
5471
5538
  },
5472
5539
  "hasDynamicHelp": false,
5473
5540
  "hiddenAliases": [],
5474
- "id": "translate-sql:usage",
5541
+ "id": "migrate",
5475
5542
  "pluginAlias": "@memberjunction/cli",
5476
5543
  "pluginName": "@memberjunction/cli",
5477
5544
  "pluginType": "core",
@@ -5481,135 +5548,68 @@
5481
5548
  "relativePath": [
5482
5549
  "dist",
5483
5550
  "commands",
5484
- "translate-sql",
5485
- "usage.js"
5551
+ "migrate",
5552
+ "index.js"
5486
5553
  ]
5487
5554
  },
5488
- "update:claude": {
5555
+ "migrate:rebake": {
5489
5556
  "aliases": [],
5490
5557
  "args": {},
5491
- "description": "Update the Claude Code pack in the current directory.",
5558
+ "description": "Re-bake the post-baseline PG migration set with inline native CodeGen",
5492
5559
  "examples": [
5493
- "<%= config.bin %> update:claude",
5494
- "<%= config.bin %> update:claude --check",
5495
- "<%= config.bin %> update:claude --refresh-commands",
5496
- "<%= config.bin %> update:claude --allow-major",
5497
- "<%= config.bin %> update:claude --json"
5560
+ "<%= config.bin %> migrate rebake",
5561
+ "<%= config.bin %> migrate rebake --baseline-floor V202605291452 --dry-run"
5498
5562
  ],
5499
5563
  "flags": {
5500
- "dir": {
5501
- "description": "Target directory",
5502
- "name": "dir",
5503
- "default": ".",
5564
+ "source-dir": {
5565
+ "description": "Source T-SQL migrations directory",
5566
+ "name": "source-dir",
5567
+ "default": "./migrations/v5",
5504
5568
  "hasDynamicHelp": false,
5505
5569
  "multiple": false,
5506
5570
  "type": "option"
5507
5571
  },
5508
- "major": {
5509
- "description": "Force a specific MJ major (default: detected from package.json)",
5510
- "name": "major",
5572
+ "output-dir": {
5573
+ "description": "PG migrations directory (committed files read here + baked output written here)",
5574
+ "name": "output-dir",
5575
+ "default": "./migrations-pg/v5",
5511
5576
  "hasDynamicHelp": false,
5512
5577
  "multiple": false,
5513
5578
  "type": "option"
5514
5579
  },
5515
- "ref": {
5516
- "description": "Git ref to fetch from (branch or tag). Default: main.",
5517
- "name": "ref",
5580
+ "schema": {
5581
+ "description": "Target schema name",
5582
+ "name": "schema",
5583
+ "default": "__mj",
5518
5584
  "hasDynamicHelp": false,
5519
5585
  "multiple": false,
5520
5586
  "type": "option"
5521
5587
  },
5522
- "from": {
5523
- "description": "Use a local pack source instead of fetching from GitHub",
5524
- "name": "from",
5588
+ "core-schema": {
5589
+ "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.",
5590
+ "name": "core-schema",
5591
+ "default": "__mj",
5525
5592
  "hasDynamicHelp": false,
5526
5593
  "multiple": false,
5527
5594
  "type": "option"
5528
5595
  },
5529
- "offline": {
5530
- "description": "Forbid network; requires --from <path>",
5531
- "name": "offline",
5532
- "allowNo": false,
5533
- "type": "boolean"
5596
+ "baseline-floor": {
5597
+ "description": "Re-bake migrations strictly AFTER this version key (default: the latest B* in output-dir)",
5598
+ "name": "baseline-floor",
5599
+ "hasDynamicHelp": false,
5600
+ "multiple": false,
5601
+ "type": "option"
5534
5602
  },
5535
5603
  "dry-run": {
5536
- "description": "Print what would be written; change nothing",
5604
+ "description": "Report what would be re-baked without writing files",
5537
5605
  "name": "dry-run",
5538
5606
  "allowNo": false,
5539
5607
  "type": "boolean"
5540
- },
5541
- "yes": {
5542
- "char": "y",
5543
- "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
5544
- "name": "yes",
5545
- "allowNo": false,
5546
- "type": "boolean"
5547
- },
5548
- "force": {
5549
- "description": "Overwrite user-customized commands/skills (saves .bak files)",
5550
- "name": "force",
5551
- "allowNo": false,
5552
- "type": "boolean"
5553
- },
5554
- "skip-commands": {
5555
- "description": "Skip seeding .claude/commands/",
5556
- "name": "skip-commands",
5557
- "allowNo": false,
5558
- "type": "boolean"
5559
- },
5560
- "skip-skills": {
5561
- "description": "Skip seeding .claude/skills/",
5562
- "name": "skip-skills",
5563
- "allowNo": false,
5564
- "type": "boolean"
5565
- },
5566
- "skip-settings": {
5567
- "description": "Skip merging .claude/settings.json",
5568
- "name": "skip-settings",
5569
- "allowNo": false,
5570
- "type": "boolean"
5571
- },
5572
- "check": {
5573
- "description": "Compare local pack version to remote without writing anything",
5574
- "name": "check",
5575
- "allowNo": false,
5576
- "type": "boolean"
5577
- },
5578
- "refresh-commands": {
5579
- "description": "Force-resync .claude/commands/* from the pack (saves .bak files)",
5580
- "name": "refresh-commands",
5581
- "allowNo": false,
5582
- "type": "boolean"
5583
- },
5584
- "refresh-skills": {
5585
- "description": "Force-resync .claude/skills/** from the pack (saves .bak files)",
5586
- "name": "refresh-skills",
5587
- "allowNo": false,
5588
- "type": "boolean"
5589
- },
5590
- "allow-major": {
5591
- "description": "Allow the remote pack's major to differ from local MJ's major",
5592
- "name": "allow-major",
5593
- "allowNo": false,
5594
- "type": "boolean"
5595
- },
5596
- "json": {
5597
- "description": "Output as JSON (matches plan §7.5 schema)",
5598
- "name": "json",
5599
- "allowNo": false,
5600
- "type": "boolean"
5601
- },
5602
- "verbose": {
5603
- "char": "v",
5604
- "description": "Show progress messages",
5605
- "name": "verbose",
5606
- "allowNo": false,
5607
- "type": "boolean"
5608
5608
  }
5609
5609
  },
5610
5610
  "hasDynamicHelp": false,
5611
5611
  "hiddenAliases": [],
5612
- "id": "update:claude",
5612
+ "id": "migrate:rebake",
5613
5613
  "pluginAlias": "@memberjunction/cli",
5614
5614
  "pluginName": "@memberjunction/cli",
5615
5615
  "pluginType": "core",
@@ -5619,14 +5619,14 @@
5619
5619
  "relativePath": [
5620
5620
  "dist",
5621
5621
  "commands",
5622
- "update",
5623
- "claude.js"
5622
+ "migrate",
5623
+ "rebake.js"
5624
5624
  ]
5625
5625
  },
5626
- "update:usage": {
5626
+ "migrate:usage": {
5627
5627
  "aliases": [],
5628
5628
  "args": {},
5629
- "description": "Show usage, flags, examples, and runtime hints for every `mj update` command.",
5629
+ "description": "Show usage, flags, examples, and runtime hints for every `mj migrate` command.",
5630
5630
  "flags": {
5631
5631
  "format": {
5632
5632
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -5643,7 +5643,7 @@
5643
5643
  },
5644
5644
  "hasDynamicHelp": false,
5645
5645
  "hiddenAliases": [],
5646
- "id": "update:usage",
5646
+ "id": "migrate:usage",
5647
5647
  "pluginAlias": "@memberjunction/cli",
5648
5648
  "pluginName": "@memberjunction/cli",
5649
5649
  "pluginType": "core",
@@ -5653,7 +5653,7 @@
5653
5653
  "relativePath": [
5654
5654
  "dist",
5655
5655
  "commands",
5656
- "update",
5656
+ "migrate",
5657
5657
  "usage.js"
5658
5658
  ]
5659
5659
  },
@@ -7020,5 +7020,5 @@
7020
7020
  ]
7021
7021
  }
7022
7022
  },
7023
- "version": "6.2.0-edge.0"
7023
+ "version": "6.2.0-edge.1"
7024
7024
  }