@memberjunction/cli 6.2.0-edge.6 → 6.2.0-edge.7

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 (63) hide show
  1. package/README.md +73 -0
  2. package/dist/commands/dev/workspace/clean.d.ts +2 -1
  3. package/dist/commands/dev/workspace/clean.d.ts.map +1 -1
  4. package/dist/commands/dev/workspace/clean.js +4 -3
  5. package/dist/commands/dev/workspace/clean.js.map +1 -1
  6. package/dist/commands/dev/workspace/doctor.d.ts.map +1 -1
  7. package/dist/commands/dev/workspace/doctor.js +3 -2
  8. package/dist/commands/dev/workspace/doctor.js.map +1 -1
  9. package/dist/commands/dev/workspace/index.d.ts +2 -2
  10. package/dist/commands/dev/workspace/index.d.ts.map +1 -1
  11. package/dist/commands/dev/workspace/index.js +12 -9
  12. package/dist/commands/dev/workspace/index.js.map +1 -1
  13. package/dist/commands/dev/workspace/status.d.ts +1 -1
  14. package/dist/commands/dev/workspace/status.js +1 -1
  15. package/dist/commands/query/refresh.d.ts +25 -0
  16. package/dist/commands/query/refresh.d.ts.map +1 -0
  17. package/dist/commands/query/refresh.js +67 -0
  18. package/dist/commands/query/refresh.js.map +1 -0
  19. package/dist/commands/query/usage.d.ts +7 -0
  20. package/dist/commands/query/usage.d.ts.map +1 -0
  21. package/dist/commands/query/usage.js +10 -0
  22. package/dist/commands/query/usage.js.map +1 -0
  23. package/dist/commands/user/clone.d.ts.map +1 -1
  24. package/dist/commands/user/clone.js +1 -0
  25. package/dist/commands/user/clone.js.map +1 -1
  26. package/dist/lib/dev-workspace/build-output.d.ts +22 -0
  27. package/dist/lib/dev-workspace/build-output.d.ts.map +1 -0
  28. package/dist/lib/dev-workspace/build-output.js +146 -0
  29. package/dist/lib/dev-workspace/build-output.js.map +1 -0
  30. package/dist/lib/dev-workspace/build.d.ts +6 -6
  31. package/dist/lib/dev-workspace/build.d.ts.map +1 -1
  32. package/dist/lib/dev-workspace/build.js +16 -23
  33. package/dist/lib/dev-workspace/build.js.map +1 -1
  34. package/dist/lib/dev-workspace/clean.d.ts +19 -5
  35. package/dist/lib/dev-workspace/clean.d.ts.map +1 -1
  36. package/dist/lib/dev-workspace/clean.js +44 -12
  37. package/dist/lib/dev-workspace/clean.js.map +1 -1
  38. package/dist/lib/dev-workspace/detect.d.ts.map +1 -1
  39. package/dist/lib/dev-workspace/detect.js +0 -2
  40. package/dist/lib/dev-workspace/detect.js.map +1 -1
  41. package/dist/lib/dev-workspace/doctor.d.ts.map +1 -1
  42. package/dist/lib/dev-workspace/doctor.js +63 -5
  43. package/dist/lib/dev-workspace/doctor.js.map +1 -1
  44. package/dist/lib/dev-workspace/lockfile.d.ts +9 -1
  45. package/dist/lib/dev-workspace/lockfile.d.ts.map +1 -1
  46. package/dist/lib/dev-workspace/lockfile.js +19 -8
  47. package/dist/lib/dev-workspace/lockfile.js.map +1 -1
  48. package/dist/lib/dev-workspace/types.d.ts +31 -11
  49. package/dist/lib/dev-workspace/types.d.ts.map +1 -1
  50. package/dist/lib/dev-workspace/types.js +2 -2
  51. package/dist/lib/dev-workspace/write.d.ts +7 -2
  52. package/dist/lib/dev-workspace/write.d.ts.map +1 -1
  53. package/dist/lib/dev-workspace/write.js +7 -3
  54. package/dist/lib/dev-workspace/write.js.map +1 -1
  55. package/dist/lib/domain-profiles.d.ts.map +1 -1
  56. package/dist/lib/domain-profiles.js +4 -0
  57. package/dist/lib/domain-profiles.js.map +1 -1
  58. package/dist/lib/query-refresh.d.ts +23 -0
  59. package/dist/lib/query-refresh.d.ts.map +1 -0
  60. package/dist/lib/query-refresh.js +33 -0
  61. package/dist/lib/query-refresh.js.map +1 -0
  62. package/oclif.manifest.json +1304 -1176
  63. package/package.json +27 -26
@@ -989,79 +989,65 @@
989
989
  "usage.js"
990
990
  ]
991
991
  },
992
- "bundle": {
992
+ "bump": {
993
993
  "aliases": [],
994
994
  "args": {},
995
- "description": "Create a self-contained MemberJunction distribution zip for offline/air-gapped installs",
995
+ "description": "Bumps MemberJunction dependency versions",
996
996
  "examples": [
997
- "<%= config.bin %> <%= command.id %> --out ./mj-install.zip",
998
- "<%= config.bin %> <%= command.id %> --tag v5.38.0 --out ./mj-install.zip",
999
- "<%= config.bin %> <%= command.id %> --source . --out ./mj-install.zip",
1000
- "<%= config.bin %> <%= command.id %> --tag v5.38.0 --with-migrations --out ./mj-install.zip",
1001
- "<%= config.bin %> <%= command.id %> --with-migrations --db-platform postgresql --out ./mj-install.zip"
1002
- ],
1003
- "flags": {
1004
- "out": {
1005
- "char": "o",
1006
- "description": "Output zip path",
1007
- "name": "out",
1008
- "required": true,
1009
- "hasDynamicHelp": false,
1010
- "multiple": false,
1011
- "type": "option"
997
+ {
998
+ "command": "<%= config.bin %> <%= command.id %>",
999
+ "description": "Bump all @memberjunction/* dependencies in the current directory's package.json to the CLI version"
1012
1000
  },
1013
- "tag": {
1014
- "char": "t",
1015
- "description": "Release tag to bundle (e.g. v5.38.0). Defaults to the latest branch tip.",
1016
- "name": "tag",
1017
- "hasDynamicHelp": false,
1018
- "multiple": false,
1019
- "type": "option"
1001
+ {
1002
+ "command": "<%= config.bin %> <%= command.id %> -rdv",
1003
+ "description": "Preview all recursive packages bumps without writing any changes."
1020
1004
  },
1021
- "source": {
1022
- "description": "Bundle from a local working-tree directory instead of fetching from the repo",
1023
- "name": "source",
1024
- "hasDynamicHelp": false,
1025
- "multiple": false,
1026
- "type": "option"
1005
+ {
1006
+ "command": "<%= config.bin %> <%= command.id %> -rqt v2.10.0 | xargs -n1 -I{} npm install --prefix {}",
1007
+ "description": "Recursively bump all @memberjunction/* dependencies in all packages to version v2.10.0 and output only the paths containing the updated package.json files. Pipe the output to xargs to run npm install in each directory and update the package-lock.json files as well."
1008
+ }
1009
+ ],
1010
+ "flags": {
1011
+ "verbose": {
1012
+ "char": "v",
1013
+ "description": "Enable additional logging",
1014
+ "name": "verbose",
1015
+ "allowNo": false,
1016
+ "type": "boolean"
1027
1017
  },
1028
- "with-migrations": {
1029
- "description": "Include the migration tree(s) so an air-gapped \"mj migrate\" can run offline. Ships both SQL Server and PostgreSQL trees by default.",
1030
- "name": "with-migrations",
1018
+ "recursive": {
1019
+ "char": "r",
1020
+ "description": "Bump version in current directory and all subdirectories",
1021
+ "name": "recursive",
1031
1022
  "allowNo": false,
1032
1023
  "type": "boolean"
1033
1024
  },
1034
- "db-platform": {
1035
- "dependsOn": [
1036
- "with-migrations"
1037
- ],
1038
- "description": "With --with-migrations, ship only this platform's migration tree instead of both",
1039
- "name": "db-platform",
1025
+ "tag": {
1026
+ "char": "t",
1027
+ "description": "Version tag to bump target for bump (e.g. v2.10.0), defaults to the CLI version",
1028
+ "name": "tag",
1040
1029
  "hasDynamicHelp": false,
1041
1030
  "multiple": false,
1042
- "options": [
1043
- "sqlserver",
1044
- "postgresql"
1045
- ],
1046
1031
  "type": "option"
1047
1032
  },
1048
- "no-claude-pack": {
1049
- "description": "Exclude the Claude Code pack (CLAUDE.md + .claude/) from the bundle. By default the pack is included so air-gapped installs get the same out-of-the-box Claude experience as online installs.",
1050
- "name": "no-claude-pack",
1033
+ "quiet": {
1034
+ "char": "q",
1035
+ "description": "Only output paths for updated packages",
1036
+ "name": "quiet",
1051
1037
  "allowNo": false,
1052
1038
  "type": "boolean"
1053
1039
  },
1054
- "verbose": {
1055
- "char": "v",
1056
- "description": "Show detailed output",
1057
- "name": "verbose",
1040
+ "dry": {
1041
+ "char": "d",
1042
+ "description": "Dry run, do not write changes to package.json files",
1043
+ "name": "dry",
1058
1044
  "allowNo": false,
1059
1045
  "type": "boolean"
1060
1046
  }
1061
1047
  },
1062
1048
  "hasDynamicHelp": false,
1063
1049
  "hiddenAliases": [],
1064
- "id": "bundle",
1050
+ "id": "bump",
1065
1051
  "pluginAlias": "@memberjunction/cli",
1066
1052
  "pluginName": "@memberjunction/cli",
1067
1053
  "pluginType": "core",
@@ -1071,14 +1057,14 @@
1071
1057
  "relativePath": [
1072
1058
  "dist",
1073
1059
  "commands",
1074
- "bundle",
1060
+ "bump",
1075
1061
  "index.js"
1076
1062
  ]
1077
1063
  },
1078
- "bundle:usage": {
1064
+ "bump:usage": {
1079
1065
  "aliases": [],
1080
1066
  "args": {},
1081
- "description": "Show usage, flags, examples, and runtime hints for every `mj bundle` command.",
1067
+ "description": "Show usage, flags, examples, and runtime hints for every `mj bump` command.",
1082
1068
  "flags": {
1083
1069
  "format": {
1084
1070
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -1095,7 +1081,7 @@
1095
1081
  },
1096
1082
  "hasDynamicHelp": false,
1097
1083
  "hiddenAliases": [],
1098
- "id": "bundle:usage",
1084
+ "id": "bump:usage",
1099
1085
  "pluginAlias": "@memberjunction/cli",
1100
1086
  "pluginName": "@memberjunction/cli",
1101
1087
  "pluginType": "core",
@@ -1105,69 +1091,83 @@
1105
1091
  "relativePath": [
1106
1092
  "dist",
1107
1093
  "commands",
1108
- "bundle",
1094
+ "bump",
1109
1095
  "usage.js"
1110
1096
  ]
1111
1097
  },
1112
- "bump": {
1098
+ "bundle": {
1113
1099
  "aliases": [],
1114
1100
  "args": {},
1115
- "description": "Bumps MemberJunction dependency versions",
1101
+ "description": "Create a self-contained MemberJunction distribution zip for offline/air-gapped installs",
1116
1102
  "examples": [
1117
- {
1118
- "command": "<%= config.bin %> <%= command.id %>",
1119
- "description": "Bump all @memberjunction/* dependencies in the current directory's package.json to the CLI version"
1120
- },
1121
- {
1122
- "command": "<%= config.bin %> <%= command.id %> -rdv",
1123
- "description": "Preview all recursive packages bumps without writing any changes."
1124
- },
1125
- {
1126
- "command": "<%= config.bin %> <%= command.id %> -rqt v2.10.0 | xargs -n1 -I{} npm install --prefix {}",
1127
- "description": "Recursively bump all @memberjunction/* dependencies in all packages to version v2.10.0 and output only the paths containing the updated package.json files. Pipe the output to xargs to run npm install in each directory and update the package-lock.json files as well."
1128
- }
1103
+ "<%= config.bin %> <%= command.id %> --out ./mj-install.zip",
1104
+ "<%= config.bin %> <%= command.id %> --tag v5.38.0 --out ./mj-install.zip",
1105
+ "<%= config.bin %> <%= command.id %> --source . --out ./mj-install.zip",
1106
+ "<%= config.bin %> <%= command.id %> --tag v5.38.0 --with-migrations --out ./mj-install.zip",
1107
+ "<%= config.bin %> <%= command.id %> --with-migrations --db-platform postgresql --out ./mj-install.zip"
1129
1108
  ],
1130
1109
  "flags": {
1131
- "verbose": {
1132
- "char": "v",
1133
- "description": "Enable additional logging",
1134
- "name": "verbose",
1135
- "allowNo": false,
1136
- "type": "boolean"
1137
- },
1138
- "recursive": {
1139
- "char": "r",
1140
- "description": "Bump version in current directory and all subdirectories",
1141
- "name": "recursive",
1142
- "allowNo": false,
1143
- "type": "boolean"
1110
+ "out": {
1111
+ "char": "o",
1112
+ "description": "Output zip path",
1113
+ "name": "out",
1114
+ "required": true,
1115
+ "hasDynamicHelp": false,
1116
+ "multiple": false,
1117
+ "type": "option"
1144
1118
  },
1145
1119
  "tag": {
1146
1120
  "char": "t",
1147
- "description": "Version tag to bump target for bump (e.g. v2.10.0), defaults to the CLI version",
1121
+ "description": "Release tag to bundle (e.g. v5.38.0). Defaults to the latest branch tip.",
1148
1122
  "name": "tag",
1149
1123
  "hasDynamicHelp": false,
1150
1124
  "multiple": false,
1151
1125
  "type": "option"
1152
1126
  },
1153
- "quiet": {
1154
- "char": "q",
1155
- "description": "Only output paths for updated packages",
1156
- "name": "quiet",
1127
+ "source": {
1128
+ "description": "Bundle from a local working-tree directory instead of fetching from the repo",
1129
+ "name": "source",
1130
+ "hasDynamicHelp": false,
1131
+ "multiple": false,
1132
+ "type": "option"
1133
+ },
1134
+ "with-migrations": {
1135
+ "description": "Include the migration tree(s) so an air-gapped \"mj migrate\" can run offline. Ships both SQL Server and PostgreSQL trees by default.",
1136
+ "name": "with-migrations",
1157
1137
  "allowNo": false,
1158
1138
  "type": "boolean"
1159
1139
  },
1160
- "dry": {
1161
- "char": "d",
1162
- "description": "Dry run, do not write changes to package.json files",
1163
- "name": "dry",
1140
+ "db-platform": {
1141
+ "dependsOn": [
1142
+ "with-migrations"
1143
+ ],
1144
+ "description": "With --with-migrations, ship only this platform's migration tree instead of both",
1145
+ "name": "db-platform",
1146
+ "hasDynamicHelp": false,
1147
+ "multiple": false,
1148
+ "options": [
1149
+ "sqlserver",
1150
+ "postgresql"
1151
+ ],
1152
+ "type": "option"
1153
+ },
1154
+ "no-claude-pack": {
1155
+ "description": "Exclude the Claude Code pack (CLAUDE.md + .claude/) from the bundle. By default the pack is included so air-gapped installs get the same out-of-the-box Claude experience as online installs.",
1156
+ "name": "no-claude-pack",
1157
+ "allowNo": false,
1158
+ "type": "boolean"
1159
+ },
1160
+ "verbose": {
1161
+ "char": "v",
1162
+ "description": "Show detailed output",
1163
+ "name": "verbose",
1164
1164
  "allowNo": false,
1165
1165
  "type": "boolean"
1166
1166
  }
1167
1167
  },
1168
1168
  "hasDynamicHelp": false,
1169
1169
  "hiddenAliases": [],
1170
- "id": "bump",
1170
+ "id": "bundle",
1171
1171
  "pluginAlias": "@memberjunction/cli",
1172
1172
  "pluginName": "@memberjunction/cli",
1173
1173
  "pluginType": "core",
@@ -1177,14 +1177,14 @@
1177
1177
  "relativePath": [
1178
1178
  "dist",
1179
1179
  "commands",
1180
- "bump",
1180
+ "bundle",
1181
1181
  "index.js"
1182
1182
  ]
1183
1183
  },
1184
- "bump:usage": {
1184
+ "bundle:usage": {
1185
1185
  "aliases": [],
1186
1186
  "args": {},
1187
- "description": "Show usage, flags, examples, and runtime hints for every `mj bump` command.",
1187
+ "description": "Show usage, flags, examples, and runtime hints for every `mj bundle` command.",
1188
1188
  "flags": {
1189
1189
  "format": {
1190
1190
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -1201,7 +1201,7 @@
1201
1201
  },
1202
1202
  "hasDynamicHelp": false,
1203
1203
  "hiddenAliases": [],
1204
- "id": "bump:usage",
1204
+ "id": "bundle:usage",
1205
1205
  "pluginAlias": "@memberjunction/cli",
1206
1206
  "pluginName": "@memberjunction/cli",
1207
1207
  "pluginType": "core",
@@ -1211,7 +1211,7 @@
1211
1211
  "relativePath": [
1212
1212
  "dist",
1213
1213
  "commands",
1214
- "bump",
1214
+ "bundle",
1215
1215
  "usage.js"
1216
1216
  ]
1217
1217
  },
@@ -2650,106 +2650,98 @@
2650
2650
  "usage.js"
2651
2651
  ]
2652
2652
  },
2653
- "install:claude": {
2653
+ "migrate:convert": {
2654
2654
  "aliases": [],
2655
2655
  "args": {},
2656
- "description": "Install or refresh the Claude Code pack in the current directory.",
2656
+ "description": "Convert T-SQL migrations to PostgreSQL",
2657
2657
  "examples": [
2658
- "<%= config.bin %> install:claude",
2659
- "<%= config.bin %> install:claude --dry-run",
2660
- "<%= config.bin %> install:claude --from ./local-pack",
2661
- "<%= config.bin %> install:claude --json"
2658
+ "<%= config.bin %> migrate convert --split",
2659
+ "<%= config.bin %> migrate convert --split --dry-run",
2660
+ "<%= config.bin %> migrate convert --split --file V202604060452__v5.24.x__KnowledgeHub.sql",
2661
+ "<%= config.bin %> migrate convert --source-dir ./migrations/v5 --output-dir ./migrations-pg/v5",
2662
+ "<%= config.bin %> migrate convert --verbose"
2662
2663
  ],
2663
2664
  "flags": {
2664
- "dir": {
2665
- "description": "Target directory for the install",
2666
- "name": "dir",
2667
- "default": ".",
2665
+ "source-dir": {
2666
+ "description": "Source T-SQL migrations directory",
2667
+ "name": "source-dir",
2668
+ "default": "./migrations/v5",
2668
2669
  "hasDynamicHelp": false,
2669
2670
  "multiple": false,
2670
2671
  "type": "option"
2671
2672
  },
2672
- "major": {
2673
- "description": "Force a specific MJ major (default: detected from package.json)",
2674
- "name": "major",
2673
+ "output-dir": {
2674
+ "description": "Output PG migrations directory",
2675
+ "name": "output-dir",
2676
+ "default": "./migrations-pg/v5",
2675
2677
  "hasDynamicHelp": false,
2676
2678
  "multiple": false,
2677
2679
  "type": "option"
2678
2680
  },
2679
- "ref": {
2680
- "description": "Git ref to fetch from (branch or tag). Default: main.",
2681
- "name": "ref",
2681
+ "file": {
2682
+ "description": "Convert a specific file (filename only, looked up in source-dir)",
2683
+ "name": "file",
2682
2684
  "hasDynamicHelp": false,
2683
2685
  "multiple": false,
2684
2686
  "type": "option"
2685
2687
  },
2686
- "from": {
2687
- "description": "Use a local pack source instead of fetching from GitHub",
2688
- "name": "from",
2688
+ "schema": {
2689
+ "description": "Target schema name",
2690
+ "name": "schema",
2691
+ "default": "__mj",
2689
2692
  "hasDynamicHelp": false,
2690
2693
  "multiple": false,
2691
2694
  "type": "option"
2692
2695
  },
2693
- "offline": {
2694
- "description": "Forbid network; requires --from <path>",
2695
- "name": "offline",
2696
- "allowNo": false,
2697
- "type": "boolean"
2696
+ "core-schema": {
2697
+ "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.",
2698
+ "name": "core-schema",
2699
+ "default": "__mj",
2700
+ "hasDynamicHelp": false,
2701
+ "multiple": false,
2702
+ "type": "option"
2698
2703
  },
2699
2704
  "dry-run": {
2700
- "description": "Print what would be written; change nothing",
2705
+ "description": "Show what would be converted without writing files",
2701
2706
  "name": "dry-run",
2702
2707
  "allowNo": false,
2703
2708
  "type": "boolean"
2704
2709
  },
2705
- "yes": {
2706
- "char": "y",
2707
- "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
2708
- "name": "yes",
2709
- "allowNo": false,
2710
- "type": "boolean"
2711
- },
2712
- "force": {
2713
- "description": "Overwrite user-customized commands/skills (saves .bak files)",
2714
- "name": "force",
2715
- "allowNo": false,
2716
- "type": "boolean"
2717
- },
2718
- "skip-commands": {
2719
- "description": "Skip seeding .claude/commands/",
2720
- "name": "skip-commands",
2710
+ "no-header": {
2711
+ "description": "Skip PG header (extensions, schema, implicit cast)",
2712
+ "name": "no-header",
2721
2713
  "allowNo": false,
2722
2714
  "type": "boolean"
2723
2715
  },
2724
- "skip-skills": {
2725
- "description": "Skip seeding .claude/skills/",
2726
- "name": "skip-skills",
2716
+ "verbose": {
2717
+ "char": "v",
2718
+ "description": "Show per-statement progress",
2719
+ "name": "verbose",
2727
2720
  "allowNo": false,
2728
2721
  "type": "boolean"
2729
2722
  },
2730
- "skip-settings": {
2731
- "description": "Skip merging .claude/settings.json",
2732
- "name": "skip-settings",
2723
+ "split": {
2724
+ "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.",
2725
+ "name": "split",
2733
2726
  "allowNo": false,
2734
2727
  "type": "boolean"
2735
2728
  },
2736
- "json": {
2737
- "description": "Output as JSON (matches plan §7.5 schema)",
2738
- "name": "json",
2729
+ "allow-gaps": {
2730
+ "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.",
2731
+ "name": "allow-gaps",
2739
2732
  "allowNo": false,
2740
2733
  "type": "boolean"
2741
2734
  },
2742
- "verbose": {
2743
- "char": "v",
2744
- "description": "Show progress messages from the fetcher and merger",
2745
- "name": "verbose",
2735
+ "bake-codegen": {
2736
+ "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.",
2737
+ "name": "bake-codegen",
2746
2738
  "allowNo": false,
2747
2739
  "type": "boolean"
2748
2740
  }
2749
2741
  },
2750
2742
  "hasDynamicHelp": false,
2751
2743
  "hiddenAliases": [],
2752
- "id": "install:claude",
2744
+ "id": "migrate:convert",
2753
2745
  "pluginAlias": "@memberjunction/cli",
2754
2746
  "pluginName": "@memberjunction/cli",
2755
2747
  "pluginType": "core",
@@ -2759,118 +2751,63 @@
2759
2751
  "relativePath": [
2760
2752
  "dist",
2761
2753
  "commands",
2762
- "install",
2763
- "claude.js"
2754
+ "migrate",
2755
+ "convert.js"
2764
2756
  ]
2765
2757
  },
2766
- "install": {
2758
+ "migrate:create": {
2767
2759
  "aliases": [],
2768
- "args": {},
2769
- "description": "Install MemberJunction from a GitHub release",
2760
+ "args": {
2761
+ "description": {
2762
+ "description": "Short description (will be converted to PascalCase with underscores)",
2763
+ "name": "description",
2764
+ "required": true
2765
+ }
2766
+ },
2767
+ "description": "Scaffold a new migration file for the current database platform",
2770
2768
  "examples": [
2771
- "<%= config.bin %> <%= command.id %>",
2772
- "<%= config.bin %> <%= command.id %> -t v4.3.0",
2773
- "<%= config.bin %> <%= command.id %> --dry-run",
2774
- "<%= config.bin %> <%= command.id %> --yes"
2769
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\"",
2770
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --version 5.25 --platform postgresql",
2771
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --dir ./migrations/v5"
2775
2772
  ],
2776
2773
  "flags": {
2777
- "tag": {
2778
- "char": "t",
2779
- "description": "Release tag to install (e.g. v4.3.0). If omitted, shows a version picker.",
2780
- "name": "tag",
2774
+ "version": {
2775
+ "char": "v",
2776
+ "description": "Migration version tag, e.g. \"5.25\" (default: parsed from repo baseline or \"0.0\")",
2777
+ "name": "version",
2781
2778
  "hasDynamicHelp": false,
2782
2779
  "multiple": false,
2783
2780
  "type": "option"
2784
2781
  },
2785
- "dir": {
2786
- "description": "Target directory for the installation",
2787
- "name": "dir",
2788
- "default": ".",
2782
+ "platform": {
2783
+ "char": "p",
2784
+ "description": "Override platform: sqlserver | postgresql (default: config.dbPlatform)",
2785
+ "name": "platform",
2789
2786
  "hasDynamicHelp": false,
2790
2787
  "multiple": false,
2788
+ "options": [
2789
+ "sqlserver",
2790
+ "postgresql"
2791
+ ],
2791
2792
  "type": "option"
2792
2793
  },
2793
- "config": {
2794
- "char": "c",
2795
- "description": "Path to JSON config file with install settings (database, auth, ports, etc.)",
2796
- "name": "config",
2794
+ "dir": {
2795
+ "description": "Output directory (default: ./migrations/v5 or ./migrations-pg/v5)",
2796
+ "name": "dir",
2797
2797
  "hasDynamicHelp": false,
2798
2798
  "multiple": false,
2799
2799
  "type": "option"
2800
2800
  },
2801
- "legacy": {
2802
- "description": "Use the legacy interactive installer (ZIP-only distribution)",
2803
- "hidden": true,
2804
- "name": "legacy",
2805
- "allowNo": false,
2806
- "type": "boolean"
2807
- },
2808
- "dry-run": {
2809
- "description": "Show the install plan without executing it",
2810
- "name": "dry-run",
2811
- "allowNo": false,
2812
- "type": "boolean"
2813
- },
2814
- "yes": {
2815
- "char": "y",
2816
- "description": "Non-interactive mode: auto-select latest version and accept defaults",
2817
- "name": "yes",
2818
- "allowNo": false,
2819
- "type": "boolean"
2820
- },
2821
- "verbose": {
2822
- "char": "v",
2823
- "description": "Show detailed output",
2824
- "name": "verbose",
2825
- "allowNo": false,
2826
- "type": "boolean"
2827
- },
2828
- "skip-db": {
2829
- "description": "Skip database provisioning phases",
2830
- "name": "skip-db",
2831
- "allowNo": false,
2832
- "type": "boolean"
2833
- },
2834
- "skip-start": {
2835
- "description": "Skip service startup and smoke tests",
2836
- "name": "skip-start",
2837
- "allowNo": false,
2838
- "type": "boolean"
2839
- },
2840
- "no-resume": {
2841
- "description": "Ignore any existing checkpoint and start fresh",
2842
- "name": "no-resume",
2843
- "allowNo": false,
2844
- "type": "boolean"
2845
- },
2846
- "fast": {
2847
- "description": "Fast mode: skip smoke test and optimize post-codegen steps. Re-run without --fast if you encounter issues.",
2848
- "name": "fast",
2849
- "allowNo": false,
2850
- "type": "boolean"
2851
- },
2852
- "overwrite-config": {
2853
- "description": "Overwrite existing config files (.env, mj.config.cjs, environment.ts) instead of preserving them",
2854
- "name": "overwrite-config",
2855
- "allowNo": false,
2856
- "type": "boolean"
2857
- },
2858
- "monorepo": {
2859
- "description": "Install the full MemberJunction source repository instead of the lightweight distribution. Use this for MJ framework development.",
2860
- "name": "monorepo",
2861
- "allowNo": false,
2862
- "type": "boolean"
2863
- },
2864
- "no-claude-pack": {
2865
- "description": "Exclude the Claude Code pack (CLAUDE.md + .claude/ tree) from the scaffold. By default the pack ships with the install so opening Claude Code in your new MJ project gives you the curated MJ-aware experience immediately.",
2866
- "name": "no-claude-pack",
2801
+ "x-x": {
2802
+ "description": "Use {version}.x.x suffix instead of {version}.x (e.g. 5.25.x instead of 5.25.x)",
2803
+ "name": "x-x",
2867
2804
  "allowNo": false,
2868
2805
  "type": "boolean"
2869
2806
  }
2870
2807
  },
2871
2808
  "hasDynamicHelp": false,
2872
2809
  "hiddenAliases": [],
2873
- "id": "install",
2810
+ "id": "migrate:create",
2874
2811
  "pluginAlias": "@memberjunction/cli",
2875
2812
  "pluginName": "@memberjunction/cli",
2876
2813
  "pluginType": "core",
@@ -2880,31 +2817,66 @@
2880
2817
  "relativePath": [
2881
2818
  "dist",
2882
2819
  "commands",
2883
- "install",
2884
- "index.js"
2820
+ "migrate",
2821
+ "create.js"
2885
2822
  ]
2886
2823
  },
2887
- "install:usage": {
2824
+ "migrate": {
2888
2825
  "aliases": [],
2889
2826
  "args": {},
2890
- "description": "Show usage, flags, examples, and runtime hints for every `mj install` command.",
2827
+ "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.",
2828
+ "examples": [
2829
+ "<%= config.bin %> <%= command.id %>\n",
2830
+ "<%= config.bin %> <%= command.id %> --schema __BCSaaS --dir ./migrations/v1\n",
2831
+ "<%= config.bin %> <%= command.id %> --schema __BCSaaS --tag v1.0.0\n"
2832
+ ],
2891
2833
  "flags": {
2892
- "format": {
2893
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
2894
- "name": "format",
2834
+ "verbose": {
2835
+ "char": "v",
2836
+ "description": "Enable additional logging",
2837
+ "name": "verbose",
2838
+ "allowNo": false,
2839
+ "type": "boolean"
2840
+ },
2841
+ "tag": {
2842
+ "char": "t",
2843
+ "description": "Version tag to use for running remote migrations",
2844
+ "name": "tag",
2845
+ "hasDynamicHelp": false,
2846
+ "multiple": false,
2847
+ "type": "option"
2848
+ },
2849
+ "schema": {
2850
+ "char": "s",
2851
+ "description": "Target schema (overrides coreSchema from config)",
2852
+ "name": "schema",
2853
+ "hasDynamicHelp": false,
2854
+ "multiple": false,
2855
+ "type": "option"
2856
+ },
2857
+ "dir": {
2858
+ "description": "Migration source directory (overrides migrationsLocation from config)",
2859
+ "name": "dir",
2895
2860
  "hasDynamicHelp": false,
2896
2861
  "multiple": false,
2897
- "options": [
2898
- "text",
2899
- "json",
2900
- "md"
2901
- ],
2902
2862
  "type": "option"
2863
+ },
2864
+ "check-connection": {
2865
+ "description": "Verify the database connection (including TLS) and exit without migrating",
2866
+ "name": "check-connection",
2867
+ "allowNo": false,
2868
+ "type": "boolean"
2869
+ },
2870
+ "skip-cache-clear": {
2871
+ "description": "Do not clear the shared Redis cache (REDIS_URL) after migrating. Also: MJ_SKIP_SHARED_CACHE_CLEAR=1",
2872
+ "name": "skip-cache-clear",
2873
+ "allowNo": false,
2874
+ "type": "boolean"
2903
2875
  }
2904
2876
  },
2905
2877
  "hasDynamicHelp": false,
2906
2878
  "hiddenAliases": [],
2907
- "id": "install:usage",
2879
+ "id": "migrate",
2908
2880
  "pluginAlias": "@memberjunction/cli",
2909
2881
  "pluginName": "@memberjunction/cli",
2910
2882
  "pluginType": "core",
@@ -2914,20 +2886,17 @@
2914
2886
  "relativePath": [
2915
2887
  "dist",
2916
2888
  "commands",
2917
- "install",
2918
- "usage.js"
2889
+ "migrate",
2890
+ "index.js"
2919
2891
  ]
2920
2892
  },
2921
- "migrate:convert": {
2893
+ "migrate:rebake": {
2922
2894
  "aliases": [],
2923
2895
  "args": {},
2924
- "description": "Convert T-SQL migrations to PostgreSQL",
2896
+ "description": "Re-bake the post-baseline PG migration set with inline native CodeGen",
2925
2897
  "examples": [
2926
- "<%= config.bin %> migrate convert --split",
2927
- "<%= config.bin %> migrate convert --split --dry-run",
2928
- "<%= config.bin %> migrate convert --split --file V202604060452__v5.24.x__KnowledgeHub.sql",
2929
- "<%= config.bin %> migrate convert --source-dir ./migrations/v5 --output-dir ./migrations-pg/v5",
2930
- "<%= config.bin %> migrate convert --verbose"
2898
+ "<%= config.bin %> migrate rebake",
2899
+ "<%= config.bin %> migrate rebake --baseline-floor V202605291452 --dry-run"
2931
2900
  ],
2932
2901
  "flags": {
2933
2902
  "source-dir": {
@@ -2939,20 +2908,13 @@
2939
2908
  "type": "option"
2940
2909
  },
2941
2910
  "output-dir": {
2942
- "description": "Output PG migrations directory",
2911
+ "description": "PG migrations directory (committed files read here + baked output written here)",
2943
2912
  "name": "output-dir",
2944
2913
  "default": "./migrations-pg/v5",
2945
2914
  "hasDynamicHelp": false,
2946
2915
  "multiple": false,
2947
2916
  "type": "option"
2948
2917
  },
2949
- "file": {
2950
- "description": "Convert a specific file (filename only, looked up in source-dir)",
2951
- "name": "file",
2952
- "hasDynamicHelp": false,
2953
- "multiple": false,
2954
- "type": "option"
2955
- },
2956
2918
  "schema": {
2957
2919
  "description": "Target schema name",
2958
2920
  "name": "schema",
@@ -2969,243 +2931,13 @@
2969
2931
  "multiple": false,
2970
2932
  "type": "option"
2971
2933
  },
2972
- "dry-run": {
2973
- "description": "Show what would be converted without writing files",
2974
- "name": "dry-run",
2975
- "allowNo": false,
2976
- "type": "boolean"
2977
- },
2978
- "no-header": {
2979
- "description": "Skip PG header (extensions, schema, implicit cast)",
2980
- "name": "no-header",
2981
- "allowNo": false,
2982
- "type": "boolean"
2983
- },
2984
- "verbose": {
2985
- "char": "v",
2986
- "description": "Show per-statement progress",
2987
- "name": "verbose",
2988
- "allowNo": false,
2989
- "type": "boolean"
2990
- },
2991
- "split": {
2992
- "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.",
2993
- "name": "split",
2994
- "allowNo": false,
2995
- "type": "boolean"
2996
- },
2997
- "allow-gaps": {
2998
- "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.",
2999
- "name": "allow-gaps",
3000
- "allowNo": false,
3001
- "type": "boolean"
3002
- },
3003
- "bake-codegen": {
3004
- "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.",
3005
- "name": "bake-codegen",
3006
- "allowNo": false,
3007
- "type": "boolean"
3008
- }
3009
- },
3010
- "hasDynamicHelp": false,
3011
- "hiddenAliases": [],
3012
- "id": "migrate:convert",
3013
- "pluginAlias": "@memberjunction/cli",
3014
- "pluginName": "@memberjunction/cli",
3015
- "pluginType": "core",
3016
- "strict": true,
3017
- "enableJsonFlag": false,
3018
- "isESM": true,
3019
- "relativePath": [
3020
- "dist",
3021
- "commands",
3022
- "migrate",
3023
- "convert.js"
3024
- ]
3025
- },
3026
- "migrate:create": {
3027
- "aliases": [],
3028
- "args": {
3029
- "description": {
3030
- "description": "Short description (will be converted to PascalCase with underscores)",
3031
- "name": "description",
3032
- "required": true
3033
- }
3034
- },
3035
- "description": "Scaffold a new migration file for the current database platform",
3036
- "examples": [
3037
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\"",
3038
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --version 5.25 --platform postgresql",
3039
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --dir ./migrations/v5"
3040
- ],
3041
- "flags": {
3042
- "version": {
3043
- "char": "v",
3044
- "description": "Migration version tag, e.g. \"5.25\" (default: parsed from repo baseline or \"0.0\")",
3045
- "name": "version",
3046
- "hasDynamicHelp": false,
3047
- "multiple": false,
3048
- "type": "option"
3049
- },
3050
- "platform": {
3051
- "char": "p",
3052
- "description": "Override platform: sqlserver | postgresql (default: config.dbPlatform)",
3053
- "name": "platform",
3054
- "hasDynamicHelp": false,
3055
- "multiple": false,
3056
- "options": [
3057
- "sqlserver",
3058
- "postgresql"
3059
- ],
3060
- "type": "option"
3061
- },
3062
- "dir": {
3063
- "description": "Output directory (default: ./migrations/v5 or ./migrations-pg/v5)",
3064
- "name": "dir",
3065
- "hasDynamicHelp": false,
3066
- "multiple": false,
3067
- "type": "option"
3068
- },
3069
- "x-x": {
3070
- "description": "Use {version}.x.x suffix instead of {version}.x (e.g. 5.25.x instead of 5.25.x)",
3071
- "name": "x-x",
3072
- "allowNo": false,
3073
- "type": "boolean"
3074
- }
3075
- },
3076
- "hasDynamicHelp": false,
3077
- "hiddenAliases": [],
3078
- "id": "migrate:create",
3079
- "pluginAlias": "@memberjunction/cli",
3080
- "pluginName": "@memberjunction/cli",
3081
- "pluginType": "core",
3082
- "strict": true,
3083
- "enableJsonFlag": false,
3084
- "isESM": true,
3085
- "relativePath": [
3086
- "dist",
3087
- "commands",
3088
- "migrate",
3089
- "create.js"
3090
- ]
3091
- },
3092
- "migrate": {
3093
- "aliases": [],
3094
- "args": {},
3095
- "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.",
3096
- "examples": [
3097
- "<%= config.bin %> <%= command.id %>\n",
3098
- "<%= config.bin %> <%= command.id %> --schema __BCSaaS --dir ./migrations/v1\n",
3099
- "<%= config.bin %> <%= command.id %> --schema __BCSaaS --tag v1.0.0\n"
3100
- ],
3101
- "flags": {
3102
- "verbose": {
3103
- "char": "v",
3104
- "description": "Enable additional logging",
3105
- "name": "verbose",
3106
- "allowNo": false,
3107
- "type": "boolean"
3108
- },
3109
- "tag": {
3110
- "char": "t",
3111
- "description": "Version tag to use for running remote migrations",
3112
- "name": "tag",
3113
- "hasDynamicHelp": false,
3114
- "multiple": false,
3115
- "type": "option"
3116
- },
3117
- "schema": {
3118
- "char": "s",
3119
- "description": "Target schema (overrides coreSchema from config)",
3120
- "name": "schema",
3121
- "hasDynamicHelp": false,
3122
- "multiple": false,
3123
- "type": "option"
3124
- },
3125
- "dir": {
3126
- "description": "Migration source directory (overrides migrationsLocation from config)",
3127
- "name": "dir",
3128
- "hasDynamicHelp": false,
3129
- "multiple": false,
3130
- "type": "option"
3131
- },
3132
- "check-connection": {
3133
- "description": "Verify the database connection (including TLS) and exit without migrating",
3134
- "name": "check-connection",
3135
- "allowNo": false,
3136
- "type": "boolean"
3137
- },
3138
- "skip-cache-clear": {
3139
- "description": "Do not clear the shared Redis cache (REDIS_URL) after migrating. Also: MJ_SKIP_SHARED_CACHE_CLEAR=1",
3140
- "name": "skip-cache-clear",
3141
- "allowNo": false,
3142
- "type": "boolean"
3143
- }
3144
- },
3145
- "hasDynamicHelp": false,
3146
- "hiddenAliases": [],
3147
- "id": "migrate",
3148
- "pluginAlias": "@memberjunction/cli",
3149
- "pluginName": "@memberjunction/cli",
3150
- "pluginType": "core",
3151
- "strict": true,
3152
- "enableJsonFlag": false,
3153
- "isESM": true,
3154
- "relativePath": [
3155
- "dist",
3156
- "commands",
3157
- "migrate",
3158
- "index.js"
3159
- ]
3160
- },
3161
- "migrate:rebake": {
3162
- "aliases": [],
3163
- "args": {},
3164
- "description": "Re-bake the post-baseline PG migration set with inline native CodeGen",
3165
- "examples": [
3166
- "<%= config.bin %> migrate rebake",
3167
- "<%= config.bin %> migrate rebake --baseline-floor V202605291452 --dry-run"
3168
- ],
3169
- "flags": {
3170
- "source-dir": {
3171
- "description": "Source T-SQL migrations directory",
3172
- "name": "source-dir",
3173
- "default": "./migrations/v5",
3174
- "hasDynamicHelp": false,
3175
- "multiple": false,
3176
- "type": "option"
3177
- },
3178
- "output-dir": {
3179
- "description": "PG migrations directory (committed files read here + baked output written here)",
3180
- "name": "output-dir",
3181
- "default": "./migrations-pg/v5",
3182
- "hasDynamicHelp": false,
3183
- "multiple": false,
3184
- "type": "option"
3185
- },
3186
- "schema": {
3187
- "description": "Target schema name",
3188
- "name": "schema",
3189
- "default": "__mj",
3190
- "hasDynamicHelp": false,
3191
- "multiple": false,
3192
- "type": "option"
3193
- },
3194
- "core-schema": {
3195
- "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.",
3196
- "name": "core-schema",
3197
- "default": "__mj",
3198
- "hasDynamicHelp": false,
3199
- "multiple": false,
3200
- "type": "option"
3201
- },
3202
- "baseline-floor": {
3203
- "description": "Re-bake migrations strictly AFTER this version key (default: the latest B* in output-dir)",
3204
- "name": "baseline-floor",
3205
- "hasDynamicHelp": false,
3206
- "multiple": false,
3207
- "type": "option"
3208
- },
2934
+ "baseline-floor": {
2935
+ "description": "Re-bake migrations strictly AFTER this version key (default: the latest B* in output-dir)",
2936
+ "name": "baseline-floor",
2937
+ "hasDynamicHelp": false,
2938
+ "multiple": false,
2939
+ "type": "option"
2940
+ },
3209
2941
  "dry-run": {
3210
2942
  "description": "Report what would be re-baked without writing files",
3211
2943
  "name": "dry-run",
@@ -3341,28 +3073,98 @@
3341
3073
  "usage.js"
3342
3074
  ]
3343
3075
  },
3344
- "querygen:export": {
3076
+ "install:claude": {
3345
3077
  "aliases": [],
3346
3078
  "args": {},
3347
- "description": "Export queries from database to metadata files",
3079
+ "description": "Install or refresh the Claude Code pack in the current directory.",
3348
3080
  "examples": [
3349
- "<%= config.bin %> <%= command.id %>",
3350
- "<%= config.bin %> <%= command.id %> --output ./metadata/queries",
3351
- "<%= config.bin %> <%= command.id %> --verbose"
3081
+ "<%= config.bin %> install:claude",
3082
+ "<%= config.bin %> install:claude --dry-run",
3083
+ "<%= config.bin %> install:claude --from ./local-pack",
3084
+ "<%= config.bin %> install:claude --json"
3352
3085
  ],
3353
3086
  "flags": {
3354
- "output": {
3355
- "char": "o",
3356
- "description": "Output directory",
3357
- "name": "output",
3358
- "default": "./metadata/queries",
3087
+ "dir": {
3088
+ "description": "Target directory for the install",
3089
+ "name": "dir",
3090
+ "default": ".",
3359
3091
  "hasDynamicHelp": false,
3360
3092
  "multiple": false,
3361
3093
  "type": "option"
3362
3094
  },
3095
+ "major": {
3096
+ "description": "Force a specific MJ major (default: detected from package.json)",
3097
+ "name": "major",
3098
+ "hasDynamicHelp": false,
3099
+ "multiple": false,
3100
+ "type": "option"
3101
+ },
3102
+ "ref": {
3103
+ "description": "Git ref to fetch from (branch or tag). Default: main.",
3104
+ "name": "ref",
3105
+ "hasDynamicHelp": false,
3106
+ "multiple": false,
3107
+ "type": "option"
3108
+ },
3109
+ "from": {
3110
+ "description": "Use a local pack source instead of fetching from GitHub",
3111
+ "name": "from",
3112
+ "hasDynamicHelp": false,
3113
+ "multiple": false,
3114
+ "type": "option"
3115
+ },
3116
+ "offline": {
3117
+ "description": "Forbid network; requires --from <path>",
3118
+ "name": "offline",
3119
+ "allowNo": false,
3120
+ "type": "boolean"
3121
+ },
3122
+ "dry-run": {
3123
+ "description": "Print what would be written; change nothing",
3124
+ "name": "dry-run",
3125
+ "allowNo": false,
3126
+ "type": "boolean"
3127
+ },
3128
+ "yes": {
3129
+ "char": "y",
3130
+ "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
3131
+ "name": "yes",
3132
+ "allowNo": false,
3133
+ "type": "boolean"
3134
+ },
3135
+ "force": {
3136
+ "description": "Overwrite user-customized commands/skills (saves .bak files)",
3137
+ "name": "force",
3138
+ "allowNo": false,
3139
+ "type": "boolean"
3140
+ },
3141
+ "skip-commands": {
3142
+ "description": "Skip seeding .claude/commands/",
3143
+ "name": "skip-commands",
3144
+ "allowNo": false,
3145
+ "type": "boolean"
3146
+ },
3147
+ "skip-skills": {
3148
+ "description": "Skip seeding .claude/skills/",
3149
+ "name": "skip-skills",
3150
+ "allowNo": false,
3151
+ "type": "boolean"
3152
+ },
3153
+ "skip-settings": {
3154
+ "description": "Skip merging .claude/settings.json",
3155
+ "name": "skip-settings",
3156
+ "allowNo": false,
3157
+ "type": "boolean"
3158
+ },
3159
+ "json": {
3160
+ "description": "Output as JSON (matches plan §7.5 schema)",
3161
+ "name": "json",
3162
+ "allowNo": false,
3163
+ "type": "boolean"
3164
+ },
3363
3165
  "verbose": {
3364
3166
  "char": "v",
3365
- "description": "Verbose output",
3167
+ "description": "Show progress messages from the fetcher and merger",
3366
3168
  "name": "verbose",
3367
3169
  "allowNo": false,
3368
3170
  "type": "boolean"
@@ -3370,7 +3172,7 @@
3370
3172
  },
3371
3173
  "hasDynamicHelp": false,
3372
3174
  "hiddenAliases": [],
3373
- "id": "querygen:export",
3175
+ "id": "install:claude",
3374
3176
  "pluginAlias": "@memberjunction/cli",
3375
3177
  "pluginName": "@memberjunction/cli",
3376
3178
  "pluginType": "core",
@@ -3380,126 +3182,118 @@
3380
3182
  "relativePath": [
3381
3183
  "dist",
3382
3184
  "commands",
3383
- "querygen",
3384
- "export.js"
3185
+ "install",
3186
+ "claude.js"
3385
3187
  ]
3386
3188
  },
3387
- "querygen:generate": {
3189
+ "install": {
3388
3190
  "aliases": [],
3389
3191
  "args": {},
3390
- "description": "Generate SQL query templates for entities using AI",
3192
+ "description": "Install MemberJunction from a GitHub release",
3391
3193
  "examples": [
3392
3194
  "<%= config.bin %> <%= command.id %>",
3393
- "<%= config.bin %> <%= command.id %> --entities \"Customers,Orders\"",
3394
- "<%= config.bin %> <%= command.id %> --max-entities 5 --verbose",
3395
- "<%= config.bin %> <%= command.id %> --mode database"
3195
+ "<%= config.bin %> <%= command.id %> -t v4.3.0",
3196
+ "<%= config.bin %> <%= command.id %> --dry-run",
3197
+ "<%= config.bin %> <%= command.id %> --yes"
3396
3198
  ],
3397
3199
  "flags": {
3398
- "entities": {
3399
- "char": "e",
3400
- "description": "Specific entities to generate queries for (comma-separated)",
3401
- "name": "entities",
3200
+ "tag": {
3201
+ "char": "t",
3202
+ "description": "Release tag to install (e.g. v4.3.0). If omitted, shows a version picker.",
3203
+ "name": "tag",
3402
3204
  "hasDynamicHelp": false,
3403
3205
  "multiple": false,
3404
3206
  "type": "option"
3405
3207
  },
3406
- "exclude-entities": {
3407
- "char": "x",
3408
- "description": "Entities to exclude (comma-separated)",
3409
- "name": "exclude-entities",
3208
+ "dir": {
3209
+ "description": "Target directory for the installation",
3210
+ "name": "dir",
3211
+ "default": ".",
3410
3212
  "hasDynamicHelp": false,
3411
3213
  "multiple": false,
3412
3214
  "type": "option"
3413
3215
  },
3414
- "exclude-schemas": {
3415
- "char": "s",
3416
- "description": "Schemas to exclude (comma-separated)",
3417
- "name": "exclude-schemas",
3216
+ "config": {
3217
+ "char": "c",
3218
+ "description": "Path to JSON config file with install settings (database, auth, ports, etc.)",
3219
+ "name": "config",
3418
3220
  "hasDynamicHelp": false,
3419
3221
  "multiple": false,
3420
3222
  "type": "option"
3421
3223
  },
3422
- "max-entities": {
3423
- "char": "m",
3424
- "description": "Max entities per group",
3425
- "name": "max-entities",
3426
- "default": 3,
3427
- "hasDynamicHelp": false,
3428
- "multiple": false,
3429
- "type": "option"
3224
+ "legacy": {
3225
+ "description": "Use the legacy interactive installer (ZIP-only distribution)",
3226
+ "hidden": true,
3227
+ "name": "legacy",
3228
+ "allowNo": false,
3229
+ "type": "boolean"
3430
3230
  },
3431
- "target-groups": {
3432
- "char": "t",
3433
- "description": "Target number of entity groups to generate",
3434
- "name": "target-groups",
3435
- "default": 75,
3436
- "hasDynamicHelp": false,
3437
- "multiple": false,
3438
- "type": "option"
3231
+ "dry-run": {
3232
+ "description": "Show the install plan without executing it",
3233
+ "name": "dry-run",
3234
+ "allowNo": false,
3235
+ "type": "boolean"
3439
3236
  },
3440
- "max-refinements": {
3441
- "char": "r",
3442
- "description": "Max refinement iterations",
3443
- "name": "max-refinements",
3444
- "default": 3,
3445
- "hasDynamicHelp": false,
3446
- "multiple": false,
3447
- "type": "option"
3237
+ "yes": {
3238
+ "char": "y",
3239
+ "description": "Non-interactive mode: auto-select latest version and accept defaults",
3240
+ "name": "yes",
3241
+ "allowNo": false,
3242
+ "type": "boolean"
3448
3243
  },
3449
- "max-fixes": {
3450
- "char": "f",
3451
- "description": "Max error-fixing attempts",
3452
- "name": "max-fixes",
3453
- "default": 5,
3454
- "hasDynamicHelp": false,
3455
- "multiple": false,
3456
- "type": "option"
3244
+ "verbose": {
3245
+ "char": "v",
3246
+ "description": "Show detailed output",
3247
+ "name": "verbose",
3248
+ "allowNo": false,
3249
+ "type": "boolean"
3457
3250
  },
3458
- "model": {
3459
- "description": "Preferred AI model",
3460
- "name": "model",
3461
- "hasDynamicHelp": false,
3462
- "multiple": false,
3463
- "type": "option"
3251
+ "skip-db": {
3252
+ "description": "Skip database provisioning phases",
3253
+ "name": "skip-db",
3254
+ "allowNo": false,
3255
+ "type": "boolean"
3464
3256
  },
3465
- "vendor": {
3466
- "description": "Preferred AI vendor",
3467
- "name": "vendor",
3468
- "hasDynamicHelp": false,
3469
- "multiple": false,
3470
- "type": "option"
3257
+ "skip-start": {
3258
+ "description": "Skip service startup and smoke tests",
3259
+ "name": "skip-start",
3260
+ "allowNo": false,
3261
+ "type": "boolean"
3471
3262
  },
3472
- "output": {
3473
- "char": "o",
3474
- "description": "Output directory",
3475
- "name": "output",
3476
- "hasDynamicHelp": false,
3477
- "multiple": false,
3478
- "type": "option"
3263
+ "no-resume": {
3264
+ "description": "Ignore any existing checkpoint and start fresh",
3265
+ "name": "no-resume",
3266
+ "allowNo": false,
3267
+ "type": "boolean"
3479
3268
  },
3480
- "mode": {
3481
- "description": "Output mode: metadata|database|both",
3482
- "name": "mode",
3483
- "hasDynamicHelp": false,
3484
- "multiple": false,
3485
- "options": [
3486
- "metadata",
3487
- "database",
3488
- "both"
3489
- ],
3490
- "type": "option"
3269
+ "fast": {
3270
+ "description": "Fast mode: skip smoke test and optimize post-codegen steps. Re-run without --fast if you encounter issues.",
3271
+ "name": "fast",
3272
+ "allowNo": false,
3273
+ "type": "boolean"
3491
3274
  },
3492
- "verbose": {
3493
- "char": "v",
3494
- "description": "Verbose output",
3495
- "name": "verbose",
3275
+ "overwrite-config": {
3276
+ "description": "Overwrite existing config files (.env, mj.config.cjs, environment.ts) instead of preserving them",
3277
+ "name": "overwrite-config",
3278
+ "allowNo": false,
3279
+ "type": "boolean"
3280
+ },
3281
+ "monorepo": {
3282
+ "description": "Install the full MemberJunction source repository instead of the lightweight distribution. Use this for MJ framework development.",
3283
+ "name": "monorepo",
3284
+ "allowNo": false,
3285
+ "type": "boolean"
3286
+ },
3287
+ "no-claude-pack": {
3288
+ "description": "Exclude the Claude Code pack (CLAUDE.md + .claude/ tree) from the scaffold. By default the pack ships with the install so opening Claude Code in your new MJ project gives you the curated MJ-aware experience immediately.",
3289
+ "name": "no-claude-pack",
3496
3290
  "allowNo": false,
3497
3291
  "type": "boolean"
3498
3292
  }
3499
3293
  },
3500
3294
  "hasDynamicHelp": false,
3501
3295
  "hiddenAliases": [],
3502
- "id": "querygen:generate",
3296
+ "id": "install",
3503
3297
  "pluginAlias": "@memberjunction/cli",
3504
3298
  "pluginName": "@memberjunction/cli",
3505
3299
  "pluginType": "core",
@@ -3509,14 +3303,14 @@
3509
3303
  "relativePath": [
3510
3304
  "dist",
3511
3305
  "commands",
3512
- "querygen",
3513
- "generate.js"
3306
+ "install",
3307
+ "index.js"
3514
3308
  ]
3515
3309
  },
3516
- "querygen:usage": {
3310
+ "install:usage": {
3517
3311
  "aliases": [],
3518
3312
  "args": {},
3519
- "description": "Show usage, flags, examples, and runtime hints for every `mj querygen` command.",
3313
+ "description": "Show usage, flags, examples, and runtime hints for every `mj install` command.",
3520
3314
  "flags": {
3521
3315
  "format": {
3522
3316
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -3533,7 +3327,7 @@
3533
3327
  },
3534
3328
  "hasDynamicHelp": false,
3535
3329
  "hiddenAliases": [],
3536
- "id": "querygen:usage",
3330
+ "id": "install:usage",
3537
3331
  "pluginAlias": "@memberjunction/cli",
3538
3332
  "pluginName": "@memberjunction/cli",
3539
3333
  "pluginType": "core",
@@ -3543,177 +3337,91 @@
3543
3337
  "relativePath": [
3544
3338
  "dist",
3545
3339
  "commands",
3546
- "querygen",
3340
+ "install",
3547
3341
  "usage.js"
3548
3342
  ]
3549
3343
  },
3550
- "querygen:validate": {
3344
+ "query:refresh": {
3551
3345
  "aliases": [],
3552
3346
  "args": {},
3553
- "description": "Validate existing query templates",
3347
+ "description": "Refresh saved queries' extracted parameters, fields, entities and dependencies from their SQL (the SQL is never changed).",
3554
3348
  "examples": [
3555
- "<%= config.bin %> <%= command.id %>",
3556
- "<%= config.bin %> <%= command.id %> --path ./metadata/queries",
3557
- "<%= config.bin %> <%= command.id %> --verbose"
3349
+ "<%= config.bin %> <%= command.id %> --all --dry-run",
3350
+ "<%= config.bin %> <%= command.id %> --all",
3351
+ "<%= config.bin %> <%= command.id %> --name \"MJ/Reports/Top Customers\"",
3352
+ "<%= config.bin %> <%= command.id %> --category MJ --with-ai",
3353
+ "<%= config.bin %> <%= command.id %> --entity \"MJ: AI Agents\""
3558
3354
  ],
3559
3355
  "flags": {
3560
- "path": {
3561
- "char": "p",
3562
- "description": "Path to queries metadata file or directory",
3563
- "name": "path",
3564
- "default": "./metadata/queries",
3356
+ "id": {
3357
+ "description": "Query ID to refresh (repeatable)",
3358
+ "name": "id",
3565
3359
  "hasDynamicHelp": false,
3566
- "multiple": false,
3360
+ "multiple": true,
3567
3361
  "type": "option"
3568
3362
  },
3569
- "verbose": {
3570
- "char": "v",
3571
- "description": "Verbose output",
3572
- "name": "verbose",
3573
- "allowNo": false,
3574
- "type": "boolean"
3575
- }
3576
- },
3577
- "hasDynamicHelp": false,
3578
- "hiddenAliases": [],
3579
- "id": "querygen:validate",
3580
- "pluginAlias": "@memberjunction/cli",
3581
- "pluginName": "@memberjunction/cli",
3582
- "pluginType": "core",
3583
- "strict": true,
3584
- "enableJsonFlag": false,
3585
- "isESM": true,
3586
- "relativePath": [
3587
- "dist",
3588
- "commands",
3589
- "querygen",
3590
- "validate.js"
3591
- ]
3592
- },
3593
- "rubric:diff": {
3594
- "aliases": [],
3595
- "args": {
3596
- "rubric": {
3597
- "description": "Rubric name or id",
3598
- "name": "rubric",
3599
- "required": true
3600
- },
3601
- "from": {
3602
- "description": "Version 1.2.0 or id",
3603
- "name": "from",
3604
- "required": true
3363
+ "name": {
3364
+ "description": "Query name or full path Category/Sub/Name (repeatable); a bare name selects every query with that name",
3365
+ "name": "name",
3366
+ "hasDynamicHelp": false,
3367
+ "multiple": true,
3368
+ "type": "option"
3605
3369
  },
3606
- "to": {
3607
- "description": "Version 1.2.0 or id",
3608
- "name": "to",
3609
- "required": true
3610
- }
3611
- },
3612
- "description": "Print the version bump between two rubric versions.",
3613
- "flags": {},
3614
- "hasDynamicHelp": false,
3615
- "hiddenAliases": [],
3616
- "id": "rubric:diff",
3617
- "pluginAlias": "@memberjunction/cli",
3618
- "pluginName": "@memberjunction/cli",
3619
- "pluginType": "core",
3620
- "strict": true,
3621
- "enableJsonFlag": false,
3622
- "isESM": true,
3623
- "relativePath": [
3624
- "dist",
3625
- "commands",
3626
- "rubric",
3627
- "diff.js"
3628
- ]
3629
- },
3630
- "rubric:evaluate": {
3631
- "aliases": [],
3632
- "args": {},
3633
- "description": "Evaluate one record against a rubric. Does not publish.",
3634
- "flags": {
3635
- "rubric": {
3636
- "description": "Rubric name or id, optionally @version",
3637
- "name": "rubric",
3638
- "required": true,
3370
+ "category": {
3371
+ "description": "Category path: the queries in it and every category below it",
3372
+ "name": "category",
3639
3373
  "hasDynamicHelp": false,
3640
3374
  "multiple": false,
3641
3375
  "type": "option"
3642
3376
  },
3643
3377
  "entity": {
3644
- "description": "Subject entity name",
3378
+ "description": "Entity name: the queries that read it (repeatable)",
3645
3379
  "name": "entity",
3646
- "required": true,
3647
3380
  "hasDynamicHelp": false,
3648
- "multiple": false,
3381
+ "multiple": true,
3649
3382
  "type": "option"
3650
3383
  },
3651
- "record": {
3652
- "description": "Subject record id",
3653
- "name": "record",
3654
- "required": true,
3655
- "hasDynamicHelp": false,
3656
- "multiple": false,
3657
- "type": "option"
3384
+ "all": {
3385
+ "description": "Refresh every query",
3386
+ "name": "all",
3387
+ "allowNo": false,
3388
+ "type": "boolean"
3658
3389
  },
3659
- "evaluator": {
3660
- "description": "A registered evaluator: LLM, Decision, Agent, Deterministic, or a custom one",
3661
- "name": "evaluator",
3662
- "default": "LLM",
3663
- "hasDynamicHelp": false,
3664
- "multiple": false,
3665
- "type": "option"
3390
+ "dry-run": {
3391
+ "description": "Report the changes without writing anything",
3392
+ "name": "dry-run",
3393
+ "allowNo": false,
3394
+ "type": "boolean"
3666
3395
  },
3667
- "prompt": {
3668
- "description": "LLM: the judge prompt composed into Rubric Evaluator (default Rubric Evaluator - Default Judge). Decision: the decision prompt (default Default Decision)",
3669
- "name": "prompt",
3670
- "hasDynamicHelp": false,
3671
- "multiple": false,
3672
- "type": "option"
3396
+ "with-ai": {
3397
+ "description": "Fill empty descriptions with the LLM description pass (off by default)",
3398
+ "name": "with-ai",
3399
+ "allowNo": false,
3400
+ "type": "boolean"
3673
3401
  },
3674
- "model": {
3675
- "description": "AI Model ID to pin. Otherwise the prompt's bindings choose",
3676
- "name": "model",
3677
- "hasDynamicHelp": false,
3678
- "multiple": false,
3679
- "type": "option"
3402
+ "verbose": {
3403
+ "char": "v",
3404
+ "description": "Also list queries that are unchanged",
3405
+ "name": "verbose",
3406
+ "allowNo": false,
3407
+ "type": "boolean"
3680
3408
  },
3681
- "mode": {
3682
- "description": "LLM only: SinglePass or PerCriterion",
3683
- "name": "mode",
3409
+ "format": {
3410
+ "description": "Output format",
3411
+ "name": "format",
3412
+ "default": "text",
3684
3413
  "hasDynamicHelp": false,
3685
3414
  "multiple": false,
3686
3415
  "options": [
3687
- "SinglePass",
3688
- "PerCriterion"
3416
+ "text",
3417
+ "json"
3689
3418
  ],
3690
3419
  "type": "option"
3691
3420
  }
3692
3421
  },
3693
3422
  "hasDynamicHelp": false,
3694
3423
  "hiddenAliases": [],
3695
- "id": "rubric:evaluate",
3696
- "pluginAlias": "@memberjunction/cli",
3697
- "pluginName": "@memberjunction/cli",
3698
- "pluginType": "core",
3699
- "strict": true,
3700
- "enableJsonFlag": false,
3701
- "isESM": true,
3702
- "relativePath": [
3703
- "dist",
3704
- "commands",
3705
- "rubric",
3706
- "evaluate.js"
3707
- ]
3708
- },
3709
- "rubric": {
3710
- "aliases": [],
3711
- "args": {},
3712
- "description": "List, show, diff, validate, and evaluate rubrics.",
3713
- "flags": {},
3714
- "hasDynamicHelp": false,
3715
- "hiddenAliases": [],
3716
- "id": "rubric",
3424
+ "id": "query:refresh",
3717
3425
  "pluginAlias": "@memberjunction/cli",
3718
3426
  "pluginName": "@memberjunction/cli",
3719
3427
  "pluginType": "core",
@@ -3723,45 +3431,31 @@
3723
3431
  "relativePath": [
3724
3432
  "dist",
3725
3433
  "commands",
3726
- "rubric",
3727
- "index.js"
3434
+ "query",
3435
+ "refresh.js"
3728
3436
  ]
3729
3437
  },
3730
- "rubric:list": {
3438
+ "query:usage": {
3731
3439
  "aliases": [],
3732
3440
  "args": {},
3733
- "description": "List rubrics.",
3734
- "flags": {},
3735
- "hasDynamicHelp": false,
3736
- "hiddenAliases": [],
3737
- "id": "rubric:list",
3738
- "pluginAlias": "@memberjunction/cli",
3739
- "pluginName": "@memberjunction/cli",
3740
- "pluginType": "core",
3741
- "strict": true,
3742
- "enableJsonFlag": false,
3743
- "isESM": true,
3744
- "relativePath": [
3745
- "dist",
3746
- "commands",
3747
- "rubric",
3748
- "list.js"
3749
- ]
3750
- },
3751
- "rubric:show": {
3752
- "aliases": [],
3753
- "args": {
3754
- "rubric": {
3755
- "description": "Rubric name or id, optionally @version",
3756
- "name": "rubric",
3757
- "required": true
3441
+ "description": "Show usage, flags, examples, and runtime hints for every `mj query` command.",
3442
+ "flags": {
3443
+ "format": {
3444
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
3445
+ "name": "format",
3446
+ "hasDynamicHelp": false,
3447
+ "multiple": false,
3448
+ "options": [
3449
+ "text",
3450
+ "json",
3451
+ "md"
3452
+ ],
3453
+ "type": "option"
3758
3454
  }
3759
3455
  },
3760
- "description": "Show a rubric version and its criteria.",
3761
- "flags": {},
3762
3456
  "hasDynamicHelp": false,
3763
3457
  "hiddenAliases": [],
3764
- "id": "rubric:show",
3458
+ "id": "query:usage",
3765
3459
  "pluginAlias": "@memberjunction/cli",
3766
3460
  "pluginName": "@memberjunction/cli",
3767
3461
  "pluginType": "core",
@@ -3771,24 +3465,40 @@
3771
3465
  "relativePath": [
3772
3466
  "dist",
3773
3467
  "commands",
3774
- "rubric",
3775
- "show.js"
3468
+ "query",
3469
+ "usage.js"
3776
3470
  ]
3777
3471
  },
3778
- "rubric:validate": {
3472
+ "querygen:export": {
3779
3473
  "aliases": [],
3780
- "args": {
3781
- "file": {
3782
- "description": "JSON snapshot file",
3783
- "name": "file",
3784
- "required": true
3474
+ "args": {},
3475
+ "description": "Export queries from database to metadata files",
3476
+ "examples": [
3477
+ "<%= config.bin %> <%= command.id %>",
3478
+ "<%= config.bin %> <%= command.id %> --output ./metadata/queries",
3479
+ "<%= config.bin %> <%= command.id %> --verbose"
3480
+ ],
3481
+ "flags": {
3482
+ "output": {
3483
+ "char": "o",
3484
+ "description": "Output directory",
3485
+ "name": "output",
3486
+ "default": "./metadata/queries",
3487
+ "hasDynamicHelp": false,
3488
+ "multiple": false,
3489
+ "type": "option"
3490
+ },
3491
+ "verbose": {
3492
+ "char": "v",
3493
+ "description": "Verbose output",
3494
+ "name": "verbose",
3495
+ "allowNo": false,
3496
+ "type": "boolean"
3785
3497
  }
3786
3498
  },
3787
- "description": "Check a rubric snapshot file for duplicate keys, gates, weights, and scales.",
3788
- "flags": {},
3789
3499
  "hasDynamicHelp": false,
3790
3500
  "hiddenAliases": [],
3791
- "id": "rubric:validate",
3501
+ "id": "querygen:export",
3792
3502
  "pluginAlias": "@memberjunction/cli",
3793
3503
  "pluginName": "@memberjunction/cli",
3794
3504
  "pluginType": "core",
@@ -3798,64 +3508,126 @@
3798
3508
  "relativePath": [
3799
3509
  "dist",
3800
3510
  "commands",
3801
- "rubric",
3802
- "validate.js"
3511
+ "querygen",
3512
+ "export.js"
3803
3513
  ]
3804
3514
  },
3805
- "sql-audit": {
3515
+ "querygen:generate": {
3806
3516
  "aliases": [],
3807
3517
  "args": {},
3808
- "description": "Compare source and target databases for migration verification",
3518
+ "description": "Generate SQL query templates for entities using AI",
3809
3519
  "examples": [
3810
- "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\"",
3811
- "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --output report.txt",
3812
- "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --source-schema __mj --target-schema __mj"
3520
+ "<%= config.bin %> <%= command.id %>",
3521
+ "<%= config.bin %> <%= command.id %> --entities \"Customers,Orders\"",
3522
+ "<%= config.bin %> <%= command.id %> --max-entities 5 --verbose",
3523
+ "<%= config.bin %> <%= command.id %> --mode database"
3813
3524
  ],
3814
3525
  "flags": {
3815
- "source": {
3816
- "description": "Source database connection string (mssql://... or postgres://...)",
3817
- "name": "source",
3818
- "required": true,
3526
+ "entities": {
3527
+ "char": "e",
3528
+ "description": "Specific entities to generate queries for (comma-separated)",
3529
+ "name": "entities",
3819
3530
  "hasDynamicHelp": false,
3820
3531
  "multiple": false,
3821
3532
  "type": "option"
3822
3533
  },
3823
- "target": {
3824
- "description": "Target database connection string (mssql://... or postgres://...)",
3825
- "name": "target",
3826
- "required": true,
3534
+ "exclude-entities": {
3535
+ "char": "x",
3536
+ "description": "Entities to exclude (comma-separated)",
3537
+ "name": "exclude-entities",
3827
3538
  "hasDynamicHelp": false,
3828
3539
  "multiple": false,
3829
3540
  "type": "option"
3830
3541
  },
3831
- "source-schema": {
3832
- "description": "Source schema name",
3833
- "name": "source-schema",
3834
- "default": "__mj",
3542
+ "exclude-schemas": {
3543
+ "char": "s",
3544
+ "description": "Schemas to exclude (comma-separated)",
3545
+ "name": "exclude-schemas",
3835
3546
  "hasDynamicHelp": false,
3836
3547
  "multiple": false,
3837
3548
  "type": "option"
3838
3549
  },
3839
- "target-schema": {
3840
- "description": "Target schema name",
3841
- "name": "target-schema",
3842
- "default": "__mj",
3550
+ "max-entities": {
3551
+ "char": "m",
3552
+ "description": "Max entities per group",
3553
+ "name": "max-entities",
3554
+ "default": 3,
3555
+ "hasDynamicHelp": false,
3556
+ "multiple": false,
3557
+ "type": "option"
3558
+ },
3559
+ "target-groups": {
3560
+ "char": "t",
3561
+ "description": "Target number of entity groups to generate",
3562
+ "name": "target-groups",
3563
+ "default": 75,
3564
+ "hasDynamicHelp": false,
3565
+ "multiple": false,
3566
+ "type": "option"
3567
+ },
3568
+ "max-refinements": {
3569
+ "char": "r",
3570
+ "description": "Max refinement iterations",
3571
+ "name": "max-refinements",
3572
+ "default": 3,
3573
+ "hasDynamicHelp": false,
3574
+ "multiple": false,
3575
+ "type": "option"
3576
+ },
3577
+ "max-fixes": {
3578
+ "char": "f",
3579
+ "description": "Max error-fixing attempts",
3580
+ "name": "max-fixes",
3581
+ "default": 5,
3582
+ "hasDynamicHelp": false,
3583
+ "multiple": false,
3584
+ "type": "option"
3585
+ },
3586
+ "model": {
3587
+ "description": "Preferred AI model",
3588
+ "name": "model",
3589
+ "hasDynamicHelp": false,
3590
+ "multiple": false,
3591
+ "type": "option"
3592
+ },
3593
+ "vendor": {
3594
+ "description": "Preferred AI vendor",
3595
+ "name": "vendor",
3843
3596
  "hasDynamicHelp": false,
3844
3597
  "multiple": false,
3845
3598
  "type": "option"
3846
3599
  },
3847
3600
  "output": {
3848
3601
  "char": "o",
3849
- "description": "Save report to file",
3602
+ "description": "Output directory",
3850
3603
  "name": "output",
3851
3604
  "hasDynamicHelp": false,
3852
3605
  "multiple": false,
3853
3606
  "type": "option"
3607
+ },
3608
+ "mode": {
3609
+ "description": "Output mode: metadata|database|both",
3610
+ "name": "mode",
3611
+ "hasDynamicHelp": false,
3612
+ "multiple": false,
3613
+ "options": [
3614
+ "metadata",
3615
+ "database",
3616
+ "both"
3617
+ ],
3618
+ "type": "option"
3619
+ },
3620
+ "verbose": {
3621
+ "char": "v",
3622
+ "description": "Verbose output",
3623
+ "name": "verbose",
3624
+ "allowNo": false,
3625
+ "type": "boolean"
3854
3626
  }
3855
3627
  },
3856
3628
  "hasDynamicHelp": false,
3857
3629
  "hiddenAliases": [],
3858
- "id": "sql-audit",
3630
+ "id": "querygen:generate",
3859
3631
  "pluginAlias": "@memberjunction/cli",
3860
3632
  "pluginName": "@memberjunction/cli",
3861
3633
  "pluginType": "core",
@@ -3865,31 +3637,74 @@
3865
3637
  "relativePath": [
3866
3638
  "dist",
3867
3639
  "commands",
3868
- "sql-audit",
3869
- "index.js"
3640
+ "querygen",
3641
+ "generate.js"
3870
3642
  ]
3871
3643
  },
3872
- "sql-audit:usage": {
3644
+ "querygen:usage": {
3873
3645
  "aliases": [],
3874
3646
  "args": {},
3875
- "description": "Show usage, flags, examples, and runtime hints for every `mj sql-audit` command.",
3647
+ "description": "Show usage, flags, examples, and runtime hints for every `mj querygen` command.",
3876
3648
  "flags": {
3877
3649
  "format": {
3878
3650
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
3879
3651
  "name": "format",
3880
3652
  "hasDynamicHelp": false,
3881
3653
  "multiple": false,
3882
- "options": [
3883
- "text",
3884
- "json",
3885
- "md"
3886
- ],
3654
+ "options": [
3655
+ "text",
3656
+ "json",
3657
+ "md"
3658
+ ],
3659
+ "type": "option"
3660
+ }
3661
+ },
3662
+ "hasDynamicHelp": false,
3663
+ "hiddenAliases": [],
3664
+ "id": "querygen:usage",
3665
+ "pluginAlias": "@memberjunction/cli",
3666
+ "pluginName": "@memberjunction/cli",
3667
+ "pluginType": "core",
3668
+ "strict": true,
3669
+ "enableJsonFlag": false,
3670
+ "isESM": true,
3671
+ "relativePath": [
3672
+ "dist",
3673
+ "commands",
3674
+ "querygen",
3675
+ "usage.js"
3676
+ ]
3677
+ },
3678
+ "querygen:validate": {
3679
+ "aliases": [],
3680
+ "args": {},
3681
+ "description": "Validate existing query templates",
3682
+ "examples": [
3683
+ "<%= config.bin %> <%= command.id %>",
3684
+ "<%= config.bin %> <%= command.id %> --path ./metadata/queries",
3685
+ "<%= config.bin %> <%= command.id %> --verbose"
3686
+ ],
3687
+ "flags": {
3688
+ "path": {
3689
+ "char": "p",
3690
+ "description": "Path to queries metadata file or directory",
3691
+ "name": "path",
3692
+ "default": "./metadata/queries",
3693
+ "hasDynamicHelp": false,
3694
+ "multiple": false,
3887
3695
  "type": "option"
3696
+ },
3697
+ "verbose": {
3698
+ "char": "v",
3699
+ "description": "Verbose output",
3700
+ "name": "verbose",
3701
+ "allowNo": false,
3702
+ "type": "boolean"
3888
3703
  }
3889
3704
  },
3890
3705
  "hasDynamicHelp": false,
3891
3706
  "hiddenAliases": [],
3892
- "id": "sql-audit:usage",
3707
+ "id": "querygen:validate",
3893
3708
  "pluginAlias": "@memberjunction/cli",
3894
3709
  "pluginName": "@memberjunction/cli",
3895
3710
  "pluginType": "core",
@@ -3899,8 +3714,8 @@
3899
3714
  "relativePath": [
3900
3715
  "dist",
3901
3716
  "commands",
3902
- "sql-audit",
3903
- "usage.js"
3717
+ "querygen",
3718
+ "validate.js"
3904
3719
  ]
3905
3720
  },
3906
3721
  "queue:backlog": {
@@ -4201,7 +4016,254 @@
4201
4016
  "type": "option"
4202
4017
  },
4203
4018
  "json": {
4204
- "description": "Print JSON instead of a table",
4019
+ "description": "Print JSON instead of a table",
4020
+ "name": "json",
4021
+ "allowNo": false,
4022
+ "type": "boolean"
4023
+ }
4024
+ },
4025
+ "hasDynamicHelp": false,
4026
+ "hiddenAliases": [],
4027
+ "id": "queue:partitions",
4028
+ "pluginAlias": "@memberjunction/cli",
4029
+ "pluginName": "@memberjunction/cli",
4030
+ "pluginType": "core",
4031
+ "strict": true,
4032
+ "enableJsonFlag": false,
4033
+ "isESM": true,
4034
+ "relativePath": [
4035
+ "dist",
4036
+ "commands",
4037
+ "queue",
4038
+ "partitions.js"
4039
+ ]
4040
+ },
4041
+ "queue:publish": {
4042
+ "aliases": [],
4043
+ "args": {},
4044
+ "description": "Publish messages to a work-queue topic from this machine through MJ code (no API key needed)",
4045
+ "examples": [
4046
+ "<%= config.bin %> <%= command.id %> --topic samples.hello --payload '{\"name\":\"Paul\"}'",
4047
+ "<%= config.bin %> <%= command.id %> --topic samples.hello --payload '{\"sleepMs\":60000}' --partition-key customer-42",
4048
+ "<%= config.bin %> <%= command.id %> --topic samples.hello --count 5 --partition-key k1 --attribute source=demo"
4049
+ ],
4050
+ "flags": {
4051
+ "topic": {
4052
+ "char": "t",
4053
+ "description": "Topic name",
4054
+ "name": "topic",
4055
+ "required": true,
4056
+ "hasDynamicHelp": false,
4057
+ "multiple": false,
4058
+ "type": "option"
4059
+ },
4060
+ "payload": {
4061
+ "char": "p",
4062
+ "description": "Message payload as JSON",
4063
+ "name": "payload",
4064
+ "default": "{}",
4065
+ "hasDynamicHelp": false,
4066
+ "multiple": false,
4067
+ "type": "option"
4068
+ },
4069
+ "partition-key": {
4070
+ "char": "k",
4071
+ "description": "PartitionKey for Exclusive / Ordered subscriptions",
4072
+ "name": "partition-key",
4073
+ "hasDynamicHelp": false,
4074
+ "multiple": false,
4075
+ "type": "option"
4076
+ },
4077
+ "dedup-key": {
4078
+ "description": "DeduplicationKey: a repeat within the topic TTL is reported as Duplicate",
4079
+ "name": "dedup-key",
4080
+ "hasDynamicHelp": false,
4081
+ "multiple": false,
4082
+ "type": "option"
4083
+ },
4084
+ "attribute": {
4085
+ "char": "a",
4086
+ "description": "Message attribute as key=value (repeatable)",
4087
+ "name": "attribute",
4088
+ "hasDynamicHelp": false,
4089
+ "multiple": true,
4090
+ "type": "option"
4091
+ },
4092
+ "count": {
4093
+ "char": "n",
4094
+ "description": "How many copies to publish in one batch",
4095
+ "name": "count",
4096
+ "default": 1,
4097
+ "hasDynamicHelp": false,
4098
+ "multiple": false,
4099
+ "type": "option"
4100
+ },
4101
+ "json": {
4102
+ "description": "Print the publish results as JSON",
4103
+ "name": "json",
4104
+ "allowNo": false,
4105
+ "type": "boolean"
4106
+ }
4107
+ },
4108
+ "hasDynamicHelp": false,
4109
+ "hiddenAliases": [],
4110
+ "id": "queue:publish",
4111
+ "pluginAlias": "@memberjunction/cli",
4112
+ "pluginName": "@memberjunction/cli",
4113
+ "pluginType": "core",
4114
+ "strict": true,
4115
+ "enableJsonFlag": false,
4116
+ "isESM": true,
4117
+ "relativePath": [
4118
+ "dist",
4119
+ "commands",
4120
+ "queue",
4121
+ "publish.js"
4122
+ ]
4123
+ },
4124
+ "queue:replay": {
4125
+ "aliases": [],
4126
+ "args": {},
4127
+ "description": "Replay one dead-lettered work-queue delivery",
4128
+ "examples": [
4129
+ "<%= config.bin %> <%= command.id %> --subscription integration.apply --delivery <id> --note \"mapping fixed\""
4130
+ ],
4131
+ "flags": {
4132
+ "subscription": {
4133
+ "char": "s",
4134
+ "description": "Subscription name",
4135
+ "name": "subscription",
4136
+ "required": true,
4137
+ "hasDynamicHelp": false,
4138
+ "multiple": false,
4139
+ "type": "option"
4140
+ },
4141
+ "delivery": {
4142
+ "char": "d",
4143
+ "description": "DeliveryID from `mj queue dead-letters`",
4144
+ "name": "delivery",
4145
+ "required": true,
4146
+ "hasDynamicHelp": false,
4147
+ "multiple": false,
4148
+ "type": "option"
4149
+ },
4150
+ "note": {
4151
+ "description": "Operator note stored with the resolution",
4152
+ "name": "note",
4153
+ "hasDynamicHelp": false,
4154
+ "multiple": false,
4155
+ "type": "option"
4156
+ }
4157
+ },
4158
+ "hasDynamicHelp": false,
4159
+ "hiddenAliases": [],
4160
+ "id": "queue:replay",
4161
+ "pluginAlias": "@memberjunction/cli",
4162
+ "pluginName": "@memberjunction/cli",
4163
+ "pluginType": "core",
4164
+ "strict": true,
4165
+ "enableJsonFlag": false,
4166
+ "isESM": true,
4167
+ "relativePath": [
4168
+ "dist",
4169
+ "commands",
4170
+ "queue",
4171
+ "replay.js"
4172
+ ]
4173
+ },
4174
+ "queue:stats": {
4175
+ "aliases": [],
4176
+ "args": {},
4177
+ "description": "Show pending, in-flight and dead-lettered counts for work-queue subscriptions",
4178
+ "examples": [
4179
+ "<%= config.bin %> <%= command.id %>",
4180
+ "<%= config.bin %> <%= command.id %> --subscription email.unsubscribe --json"
4181
+ ],
4182
+ "flags": {
4183
+ "subscription": {
4184
+ "char": "s",
4185
+ "description": "Subscription name; omit for every subscription",
4186
+ "name": "subscription",
4187
+ "hasDynamicHelp": false,
4188
+ "multiple": false,
4189
+ "type": "option"
4190
+ },
4191
+ "json": {
4192
+ "description": "Print JSON instead of a table",
4193
+ "name": "json",
4194
+ "allowNo": false,
4195
+ "type": "boolean"
4196
+ }
4197
+ },
4198
+ "hasDynamicHelp": false,
4199
+ "hiddenAliases": [],
4200
+ "id": "queue:stats",
4201
+ "pluginAlias": "@memberjunction/cli",
4202
+ "pluginName": "@memberjunction/cli",
4203
+ "pluginType": "core",
4204
+ "strict": true,
4205
+ "enableJsonFlag": false,
4206
+ "isESM": true,
4207
+ "relativePath": [
4208
+ "dist",
4209
+ "commands",
4210
+ "queue",
4211
+ "stats.js"
4212
+ ]
4213
+ },
4214
+ "queue:usage": {
4215
+ "aliases": [],
4216
+ "args": {},
4217
+ "description": "Show usage, flags, examples, and runtime hints for every `mj queue` command.",
4218
+ "flags": {
4219
+ "format": {
4220
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4221
+ "name": "format",
4222
+ "hasDynamicHelp": false,
4223
+ "multiple": false,
4224
+ "options": [
4225
+ "text",
4226
+ "json",
4227
+ "md"
4228
+ ],
4229
+ "type": "option"
4230
+ }
4231
+ },
4232
+ "hasDynamicHelp": false,
4233
+ "hiddenAliases": [],
4234
+ "id": "queue:usage",
4235
+ "pluginAlias": "@memberjunction/cli",
4236
+ "pluginName": "@memberjunction/cli",
4237
+ "pluginType": "core",
4238
+ "strict": true,
4239
+ "enableJsonFlag": false,
4240
+ "isESM": true,
4241
+ "relativePath": [
4242
+ "dist",
4243
+ "commands",
4244
+ "queue",
4245
+ "usage.js"
4246
+ ]
4247
+ },
4248
+ "queue:validate-bindings": {
4249
+ "aliases": [],
4250
+ "args": {},
4251
+ "description": "Validate work-queue topology and cloud bindings; exits 1 on any error",
4252
+ "examples": [
4253
+ "<%= config.bin %> <%= command.id %>",
4254
+ "<%= config.bin %> <%= command.id %> --transport AWS-prod"
4255
+ ],
4256
+ "flags": {
4257
+ "transport": {
4258
+ "char": "t",
4259
+ "description": "Validate one transport's bindings against its resources",
4260
+ "name": "transport",
4261
+ "hasDynamicHelp": false,
4262
+ "multiple": false,
4263
+ "type": "option"
4264
+ },
4265
+ "json": {
4266
+ "description": "Print issues as JSON",
4205
4267
  "name": "json",
4206
4268
  "allowNo": false,
4207
4269
  "type": "boolean"
@@ -4209,7 +4271,7 @@
4209
4271
  },
4210
4272
  "hasDynamicHelp": false,
4211
4273
  "hiddenAliases": [],
4212
- "id": "queue:partitions",
4274
+ "id": "queue:validate-bindings",
4213
4275
  "pluginAlias": "@memberjunction/cli",
4214
4276
  "pluginName": "@memberjunction/cli",
4215
4277
  "pluginType": "core",
@@ -4220,79 +4282,86 @@
4220
4282
  "dist",
4221
4283
  "commands",
4222
4284
  "queue",
4223
- "partitions.js"
4285
+ "validate-bindings.js"
4224
4286
  ]
4225
4287
  },
4226
- "queue:publish": {
4288
+ "queue:work": {
4227
4289
  "aliases": [],
4228
4290
  "args": {},
4229
- "description": "Publish messages to a work-queue topic from this machine through MJ code (no API key needed)",
4291
+ "description": "Run work-queue subscriptions in this process: once for a container job, or until stopped",
4230
4292
  "examples": [
4231
- "<%= config.bin %> <%= command.id %> --topic samples.hello --payload '{\"name\":\"Paul\"}'",
4232
- "<%= config.bin %> <%= command.id %> --topic samples.hello --payload '{\"sleepMs\":60000}' --partition-key customer-42",
4233
- "<%= config.bin %> <%= command.id %> --topic samples.hello --count 5 --partition-key k1 --attribute source=demo"
4293
+ "<%= config.bin %> <%= command.id %> --subscription venue-import --once",
4294
+ "<%= config.bin %> <%= command.id %> --subscription venue-import --once --max 5 --concurrency 2 --max-duration-ms 3300000",
4295
+ "<%= config.bin %> <%= command.id %> --subscription \"*\""
4234
4296
  ],
4235
4297
  "flags": {
4236
- "topic": {
4237
- "char": "t",
4238
- "description": "Topic name",
4239
- "name": "topic",
4298
+ "subscription": {
4299
+ "char": "s",
4300
+ "description": "Subscription name, or '*' for every MJWorker subscription",
4301
+ "name": "subscription",
4240
4302
  "required": true,
4241
4303
  "hasDynamicHelp": false,
4242
4304
  "multiple": false,
4243
4305
  "type": "option"
4244
4306
  },
4245
- "payload": {
4246
- "char": "p",
4247
- "description": "Message payload as JSON",
4248
- "name": "payload",
4249
- "default": "{}",
4307
+ "once": {
4308
+ "description": "Receive up to --max deliveries, drain and exit (container-job mode)",
4309
+ "name": "once",
4310
+ "allowNo": false,
4311
+ "type": "boolean"
4312
+ },
4313
+ "max": {
4314
+ "dependsOn": [
4315
+ "once"
4316
+ ],
4317
+ "description": "With --once: how many deliveries to receive",
4318
+ "name": "max",
4319
+ "default": 1,
4250
4320
  "hasDynamicHelp": false,
4251
4321
  "multiple": false,
4252
4322
  "type": "option"
4253
4323
  },
4254
- "partition-key": {
4255
- "char": "k",
4256
- "description": "PartitionKey for Exclusive / Ordered subscriptions",
4257
- "name": "partition-key",
4324
+ "idle-exit-ms": {
4325
+ "dependsOn": [
4326
+ "once"
4327
+ ],
4328
+ "description": "With --once: exit after this long with an empty queue",
4329
+ "name": "idle-exit-ms",
4330
+ "default": 5000,
4258
4331
  "hasDynamicHelp": false,
4259
4332
  "multiple": false,
4260
4333
  "type": "option"
4261
4334
  },
4262
- "dedup-key": {
4263
- "description": "DeduplicationKey: a repeat within the topic TTL is reported as Duplicate",
4264
- "name": "dedup-key",
4335
+ "max-duration-ms": {
4336
+ "dependsOn": [
4337
+ "once"
4338
+ ],
4339
+ "description": "With --once: stop claiming after this long and drain (keep it below the scheduler's job deadline)",
4340
+ "name": "max-duration-ms",
4265
4341
  "hasDynamicHelp": false,
4266
4342
  "multiple": false,
4267
4343
  "type": "option"
4268
4344
  },
4269
- "attribute": {
4270
- "char": "a",
4271
- "description": "Message attribute as key=value (repeatable)",
4272
- "name": "attribute",
4345
+ "concurrency": {
4346
+ "description": "Handlers in flight per subscription",
4347
+ "name": "concurrency",
4348
+ "default": 1,
4273
4349
  "hasDynamicHelp": false,
4274
- "multiple": true,
4350
+ "multiple": false,
4275
4351
  "type": "option"
4276
4352
  },
4277
- "count": {
4278
- "char": "n",
4279
- "description": "How many copies to publish in one batch",
4280
- "name": "count",
4281
- "default": 1,
4353
+ "shutdown-drain-ms": {
4354
+ "description": "How long in-flight handlers get to finish on exit; the drain can take twice this",
4355
+ "name": "shutdown-drain-ms",
4356
+ "default": 30000,
4282
4357
  "hasDynamicHelp": false,
4283
4358
  "multiple": false,
4284
4359
  "type": "option"
4285
- },
4286
- "json": {
4287
- "description": "Print the publish results as JSON",
4288
- "name": "json",
4289
- "allowNo": false,
4290
- "type": "boolean"
4291
4360
  }
4292
4361
  },
4293
4362
  "hasDynamicHelp": false,
4294
4363
  "hiddenAliases": [],
4295
- "id": "queue:publish",
4364
+ "id": "queue:work",
4296
4365
  "pluginAlias": "@memberjunction/cli",
4297
4366
  "pluginName": "@memberjunction/cli",
4298
4367
  "pluginType": "core",
@@ -4303,46 +4372,112 @@
4303
4372
  "dist",
4304
4373
  "commands",
4305
4374
  "queue",
4306
- "publish.js"
4375
+ "work.js"
4307
4376
  ]
4308
4377
  },
4309
- "queue:replay": {
4378
+ "rubric:diff": {
4379
+ "aliases": [],
4380
+ "args": {
4381
+ "rubric": {
4382
+ "description": "Rubric name or id",
4383
+ "name": "rubric",
4384
+ "required": true
4385
+ },
4386
+ "from": {
4387
+ "description": "Version 1.2.0 or id",
4388
+ "name": "from",
4389
+ "required": true
4390
+ },
4391
+ "to": {
4392
+ "description": "Version 1.2.0 or id",
4393
+ "name": "to",
4394
+ "required": true
4395
+ }
4396
+ },
4397
+ "description": "Print the version bump between two rubric versions.",
4398
+ "flags": {},
4399
+ "hasDynamicHelp": false,
4400
+ "hiddenAliases": [],
4401
+ "id": "rubric:diff",
4402
+ "pluginAlias": "@memberjunction/cli",
4403
+ "pluginName": "@memberjunction/cli",
4404
+ "pluginType": "core",
4405
+ "strict": true,
4406
+ "enableJsonFlag": false,
4407
+ "isESM": true,
4408
+ "relativePath": [
4409
+ "dist",
4410
+ "commands",
4411
+ "rubric",
4412
+ "diff.js"
4413
+ ]
4414
+ },
4415
+ "rubric:evaluate": {
4310
4416
  "aliases": [],
4311
4417
  "args": {},
4312
- "description": "Replay one dead-lettered work-queue delivery",
4313
- "examples": [
4314
- "<%= config.bin %> <%= command.id %> --subscription integration.apply --delivery <id> --note \"mapping fixed\""
4315
- ],
4418
+ "description": "Evaluate one record against a rubric. Does not publish.",
4316
4419
  "flags": {
4317
- "subscription": {
4318
- "char": "s",
4319
- "description": "Subscription name",
4320
- "name": "subscription",
4420
+ "rubric": {
4421
+ "description": "Rubric name or id, optionally @version",
4422
+ "name": "rubric",
4321
4423
  "required": true,
4322
4424
  "hasDynamicHelp": false,
4323
4425
  "multiple": false,
4324
4426
  "type": "option"
4325
4427
  },
4326
- "delivery": {
4327
- "char": "d",
4328
- "description": "DeliveryID from `mj queue dead-letters`",
4329
- "name": "delivery",
4428
+ "entity": {
4429
+ "description": "Subject entity name",
4430
+ "name": "entity",
4330
4431
  "required": true,
4331
4432
  "hasDynamicHelp": false,
4332
4433
  "multiple": false,
4333
4434
  "type": "option"
4334
4435
  },
4335
- "note": {
4336
- "description": "Operator note stored with the resolution",
4337
- "name": "note",
4436
+ "record": {
4437
+ "description": "Subject record id",
4438
+ "name": "record",
4439
+ "required": true,
4440
+ "hasDynamicHelp": false,
4441
+ "multiple": false,
4442
+ "type": "option"
4443
+ },
4444
+ "evaluator": {
4445
+ "description": "A registered evaluator: LLM, Decision, Agent, Deterministic, or a custom one",
4446
+ "name": "evaluator",
4447
+ "default": "LLM",
4448
+ "hasDynamicHelp": false,
4449
+ "multiple": false,
4450
+ "type": "option"
4451
+ },
4452
+ "prompt": {
4453
+ "description": "LLM: the judge prompt composed into Rubric Evaluator (default Rubric Evaluator - Default Judge). Decision: the decision prompt (default Default Decision)",
4454
+ "name": "prompt",
4455
+ "hasDynamicHelp": false,
4456
+ "multiple": false,
4457
+ "type": "option"
4458
+ },
4459
+ "model": {
4460
+ "description": "AI Model ID to pin. Otherwise the prompt's bindings choose",
4461
+ "name": "model",
4462
+ "hasDynamicHelp": false,
4463
+ "multiple": false,
4464
+ "type": "option"
4465
+ },
4466
+ "mode": {
4467
+ "description": "LLM only: SinglePass or PerCriterion",
4468
+ "name": "mode",
4338
4469
  "hasDynamicHelp": false,
4339
4470
  "multiple": false,
4471
+ "options": [
4472
+ "SinglePass",
4473
+ "PerCriterion"
4474
+ ],
4340
4475
  "type": "option"
4341
4476
  }
4342
4477
  },
4343
4478
  "hasDynamicHelp": false,
4344
4479
  "hiddenAliases": [],
4345
- "id": "queue:replay",
4480
+ "id": "rubric:evaluate",
4346
4481
  "pluginAlias": "@memberjunction/cli",
4347
4482
  "pluginName": "@memberjunction/cli",
4348
4483
  "pluginType": "core",
@@ -4352,37 +4487,18 @@
4352
4487
  "relativePath": [
4353
4488
  "dist",
4354
4489
  "commands",
4355
- "queue",
4356
- "replay.js"
4490
+ "rubric",
4491
+ "evaluate.js"
4357
4492
  ]
4358
4493
  },
4359
- "queue:stats": {
4494
+ "rubric": {
4360
4495
  "aliases": [],
4361
4496
  "args": {},
4362
- "description": "Show pending, in-flight and dead-lettered counts for work-queue subscriptions",
4363
- "examples": [
4364
- "<%= config.bin %> <%= command.id %>",
4365
- "<%= config.bin %> <%= command.id %> --subscription email.unsubscribe --json"
4366
- ],
4367
- "flags": {
4368
- "subscription": {
4369
- "char": "s",
4370
- "description": "Subscription name; omit for every subscription",
4371
- "name": "subscription",
4372
- "hasDynamicHelp": false,
4373
- "multiple": false,
4374
- "type": "option"
4375
- },
4376
- "json": {
4377
- "description": "Print JSON instead of a table",
4378
- "name": "json",
4379
- "allowNo": false,
4380
- "type": "boolean"
4381
- }
4382
- },
4497
+ "description": "List, show, diff, validate, and evaluate rubrics.",
4498
+ "flags": {},
4383
4499
  "hasDynamicHelp": false,
4384
4500
  "hiddenAliases": [],
4385
- "id": "queue:stats",
4501
+ "id": "rubric",
4386
4502
  "pluginAlias": "@memberjunction/cli",
4387
4503
  "pluginName": "@memberjunction/cli",
4388
4504
  "pluginType": "core",
@@ -4392,31 +4508,45 @@
4392
4508
  "relativePath": [
4393
4509
  "dist",
4394
4510
  "commands",
4395
- "queue",
4396
- "stats.js"
4511
+ "rubric",
4512
+ "index.js"
4513
+ ]
4514
+ },
4515
+ "rubric:list": {
4516
+ "aliases": [],
4517
+ "args": {},
4518
+ "description": "List rubrics.",
4519
+ "flags": {},
4520
+ "hasDynamicHelp": false,
4521
+ "hiddenAliases": [],
4522
+ "id": "rubric:list",
4523
+ "pluginAlias": "@memberjunction/cli",
4524
+ "pluginName": "@memberjunction/cli",
4525
+ "pluginType": "core",
4526
+ "strict": true,
4527
+ "enableJsonFlag": false,
4528
+ "isESM": true,
4529
+ "relativePath": [
4530
+ "dist",
4531
+ "commands",
4532
+ "rubric",
4533
+ "list.js"
4397
4534
  ]
4398
4535
  },
4399
- "queue:usage": {
4536
+ "rubric:show": {
4400
4537
  "aliases": [],
4401
- "args": {},
4402
- "description": "Show usage, flags, examples, and runtime hints for every `mj queue` command.",
4403
- "flags": {
4404
- "format": {
4405
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4406
- "name": "format",
4407
- "hasDynamicHelp": false,
4408
- "multiple": false,
4409
- "options": [
4410
- "text",
4411
- "json",
4412
- "md"
4413
- ],
4414
- "type": "option"
4538
+ "args": {
4539
+ "rubric": {
4540
+ "description": "Rubric name or id, optionally @version",
4541
+ "name": "rubric",
4542
+ "required": true
4415
4543
  }
4416
4544
  },
4545
+ "description": "Show a rubric version and its criteria.",
4546
+ "flags": {},
4417
4547
  "hasDynamicHelp": false,
4418
4548
  "hiddenAliases": [],
4419
- "id": "queue:usage",
4549
+ "id": "rubric:show",
4420
4550
  "pluginAlias": "@memberjunction/cli",
4421
4551
  "pluginName": "@memberjunction/cli",
4422
4552
  "pluginType": "core",
@@ -4426,37 +4556,24 @@
4426
4556
  "relativePath": [
4427
4557
  "dist",
4428
4558
  "commands",
4429
- "queue",
4430
- "usage.js"
4559
+ "rubric",
4560
+ "show.js"
4431
4561
  ]
4432
4562
  },
4433
- "queue:validate-bindings": {
4563
+ "rubric:validate": {
4434
4564
  "aliases": [],
4435
- "args": {},
4436
- "description": "Validate work-queue topology and cloud bindings; exits 1 on any error",
4437
- "examples": [
4438
- "<%= config.bin %> <%= command.id %>",
4439
- "<%= config.bin %> <%= command.id %> --transport AWS-prod"
4440
- ],
4441
- "flags": {
4442
- "transport": {
4443
- "char": "t",
4444
- "description": "Validate one transport's bindings against its resources",
4445
- "name": "transport",
4446
- "hasDynamicHelp": false,
4447
- "multiple": false,
4448
- "type": "option"
4449
- },
4450
- "json": {
4451
- "description": "Print issues as JSON",
4452
- "name": "json",
4453
- "allowNo": false,
4454
- "type": "boolean"
4565
+ "args": {
4566
+ "file": {
4567
+ "description": "JSON snapshot file",
4568
+ "name": "file",
4569
+ "required": true
4455
4570
  }
4456
4571
  },
4572
+ "description": "Check a rubric snapshot file for duplicate keys, gates, weights, and scales.",
4573
+ "flags": {},
4457
4574
  "hasDynamicHelp": false,
4458
4575
  "hiddenAliases": [],
4459
- "id": "queue:validate-bindings",
4576
+ "id": "rubric:validate",
4460
4577
  "pluginAlias": "@memberjunction/cli",
4461
4578
  "pluginName": "@memberjunction/cli",
4462
4579
  "pluginType": "core",
@@ -4466,87 +4583,98 @@
4466
4583
  "relativePath": [
4467
4584
  "dist",
4468
4585
  "commands",
4469
- "queue",
4470
- "validate-bindings.js"
4586
+ "rubric",
4587
+ "validate.js"
4471
4588
  ]
4472
4589
  },
4473
- "queue:work": {
4590
+ "sql-audit": {
4474
4591
  "aliases": [],
4475
4592
  "args": {},
4476
- "description": "Run work-queue subscriptions in this process: once for a container job, or until stopped",
4593
+ "description": "Compare source and target databases for migration verification",
4477
4594
  "examples": [
4478
- "<%= config.bin %> <%= command.id %> --subscription venue-import --once",
4479
- "<%= config.bin %> <%= command.id %> --subscription venue-import --once --max 5 --concurrency 2 --max-duration-ms 3300000",
4480
- "<%= config.bin %> <%= command.id %> --subscription \"*\""
4595
+ "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\"",
4596
+ "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --output report.txt",
4597
+ "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --source-schema __mj --target-schema __mj"
4481
4598
  ],
4482
4599
  "flags": {
4483
- "subscription": {
4484
- "char": "s",
4485
- "description": "Subscription name, or '*' for every MJWorker subscription",
4486
- "name": "subscription",
4600
+ "source": {
4601
+ "description": "Source database connection string (mssql://... or postgres://...)",
4602
+ "name": "source",
4487
4603
  "required": true,
4488
4604
  "hasDynamicHelp": false,
4489
4605
  "multiple": false,
4490
4606
  "type": "option"
4491
4607
  },
4492
- "once": {
4493
- "description": "Receive up to --max deliveries, drain and exit (container-job mode)",
4494
- "name": "once",
4495
- "allowNo": false,
4496
- "type": "boolean"
4497
- },
4498
- "max": {
4499
- "dependsOn": [
4500
- "once"
4501
- ],
4502
- "description": "With --once: how many deliveries to receive",
4503
- "name": "max",
4504
- "default": 1,
4608
+ "target": {
4609
+ "description": "Target database connection string (mssql://... or postgres://...)",
4610
+ "name": "target",
4611
+ "required": true,
4505
4612
  "hasDynamicHelp": false,
4506
4613
  "multiple": false,
4507
4614
  "type": "option"
4508
4615
  },
4509
- "idle-exit-ms": {
4510
- "dependsOn": [
4511
- "once"
4512
- ],
4513
- "description": "With --once: exit after this long with an empty queue",
4514
- "name": "idle-exit-ms",
4515
- "default": 5000,
4616
+ "source-schema": {
4617
+ "description": "Source schema name",
4618
+ "name": "source-schema",
4619
+ "default": "__mj",
4516
4620
  "hasDynamicHelp": false,
4517
4621
  "multiple": false,
4518
4622
  "type": "option"
4519
4623
  },
4520
- "max-duration-ms": {
4521
- "dependsOn": [
4522
- "once"
4523
- ],
4524
- "description": "With --once: stop claiming after this long and drain (keep it below the scheduler's job deadline)",
4525
- "name": "max-duration-ms",
4624
+ "target-schema": {
4625
+ "description": "Target schema name",
4626
+ "name": "target-schema",
4627
+ "default": "__mj",
4526
4628
  "hasDynamicHelp": false,
4527
4629
  "multiple": false,
4528
4630
  "type": "option"
4529
4631
  },
4530
- "concurrency": {
4531
- "description": "Handlers in flight per subscription",
4532
- "name": "concurrency",
4533
- "default": 1,
4632
+ "output": {
4633
+ "char": "o",
4634
+ "description": "Save report to file",
4635
+ "name": "output",
4534
4636
  "hasDynamicHelp": false,
4535
4637
  "multiple": false,
4536
4638
  "type": "option"
4537
- },
4538
- "shutdown-drain-ms": {
4539
- "description": "How long in-flight handlers get to finish on exit; the drain can take twice this",
4540
- "name": "shutdown-drain-ms",
4541
- "default": 30000,
4639
+ }
4640
+ },
4641
+ "hasDynamicHelp": false,
4642
+ "hiddenAliases": [],
4643
+ "id": "sql-audit",
4644
+ "pluginAlias": "@memberjunction/cli",
4645
+ "pluginName": "@memberjunction/cli",
4646
+ "pluginType": "core",
4647
+ "strict": true,
4648
+ "enableJsonFlag": false,
4649
+ "isESM": true,
4650
+ "relativePath": [
4651
+ "dist",
4652
+ "commands",
4653
+ "sql-audit",
4654
+ "index.js"
4655
+ ]
4656
+ },
4657
+ "sql-audit:usage": {
4658
+ "aliases": [],
4659
+ "args": {},
4660
+ "description": "Show usage, flags, examples, and runtime hints for every `mj sql-audit` command.",
4661
+ "flags": {
4662
+ "format": {
4663
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4664
+ "name": "format",
4542
4665
  "hasDynamicHelp": false,
4543
4666
  "multiple": false,
4667
+ "options": [
4668
+ "text",
4669
+ "json",
4670
+ "md"
4671
+ ],
4544
4672
  "type": "option"
4545
4673
  }
4546
4674
  },
4547
4675
  "hasDynamicHelp": false,
4548
4676
  "hiddenAliases": [],
4549
- "id": "queue:work",
4677
+ "id": "sql-audit:usage",
4550
4678
  "pluginAlias": "@memberjunction/cli",
4551
4679
  "pluginName": "@memberjunction/cli",
4552
4680
  "pluginType": "core",
@@ -4556,8 +4684,8 @@
4556
4684
  "relativePath": [
4557
4685
  "dist",
4558
4686
  "commands",
4559
- "queue",
4560
- "work.js"
4687
+ "sql-audit",
4688
+ "usage.js"
4561
4689
  ]
4562
4690
  },
4563
4691
  "sql-convert": {
@@ -4794,100 +4922,30 @@
4794
4922
  "hasDynamicHelp": false,
4795
4923
  "multiple": false,
4796
4924
  "type": "option"
4797
- },
4798
- "check": {
4799
- "description": "Only run these check ids.",
4800
- "name": "check",
4801
- "hasDynamicHelp": false,
4802
- "multiple": true,
4803
- "type": "option"
4804
- },
4805
- "strict": {
4806
- "description": "Treat warnings as errors. Use in CI once a newly adopted check is clean.",
4807
- "name": "strict",
4808
- "allowNo": false,
4809
- "type": "boolean"
4810
- },
4811
- "quiet": {
4812
- "description": "Print only the summary line.",
4813
- "name": "quiet",
4814
- "allowNo": false,
4815
- "type": "boolean"
4816
- }
4817
- },
4818
- "hasDynamicHelp": false,
4819
- "hiddenAliases": [],
4820
- "id": "standards:check",
4821
- "pluginAlias": "@memberjunction/cli",
4822
- "pluginName": "@memberjunction/cli",
4823
- "pluginType": "core",
4824
- "strict": true,
4825
- "enableJsonFlag": false,
4826
- "isESM": true,
4827
- "relativePath": [
4828
- "dist",
4829
- "commands",
4830
- "standards",
4831
- "check.js"
4832
- ]
4833
- },
4834
- "standards:list": {
4835
- "aliases": [],
4836
- "args": {},
4837
- "description": "List every MemberJunction standard and this repository’s stance on it",
4838
- "flags": {
4839
- "cwd": {
4840
- "description": "Repository root. Defaults to the current directory.",
4841
- "name": "cwd",
4842
- "hasDynamicHelp": false,
4843
- "multiple": false,
4844
- "type": "option"
4845
- },
4846
- "verbose": {
4847
- "char": "v",
4848
- "description": "Include the full description of each standard.",
4849
- "name": "verbose",
4850
- "allowNo": false,
4851
- "type": "boolean"
4852
- }
4853
- },
4854
- "hasDynamicHelp": false,
4855
- "hiddenAliases": [],
4856
- "id": "standards:list",
4857
- "pluginAlias": "@memberjunction/cli",
4858
- "pluginName": "@memberjunction/cli",
4859
- "pluginType": "core",
4860
- "strict": true,
4861
- "enableJsonFlag": false,
4862
- "isESM": true,
4863
- "relativePath": [
4864
- "dist",
4865
- "commands",
4866
- "standards",
4867
- "list.js"
4868
- ]
4869
- },
4870
- "standards:usage": {
4871
- "aliases": [],
4872
- "args": {},
4873
- "description": "Show usage, flags, examples, and runtime hints for every `mj standards` command.",
4874
- "flags": {
4875
- "format": {
4876
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4877
- "name": "format",
4878
- "hasDynamicHelp": false,
4879
- "multiple": false,
4880
- "options": [
4881
- "text",
4882
- "json",
4883
- "md"
4884
- ],
4885
- "type": "option"
4925
+ },
4926
+ "check": {
4927
+ "description": "Only run these check ids.",
4928
+ "name": "check",
4929
+ "hasDynamicHelp": false,
4930
+ "multiple": true,
4931
+ "type": "option"
4932
+ },
4933
+ "strict": {
4934
+ "description": "Treat warnings as errors. Use in CI once a newly adopted check is clean.",
4935
+ "name": "strict",
4936
+ "allowNo": false,
4937
+ "type": "boolean"
4938
+ },
4939
+ "quiet": {
4940
+ "description": "Print only the summary line.",
4941
+ "name": "quiet",
4942
+ "allowNo": false,
4943
+ "type": "boolean"
4886
4944
  }
4887
4945
  },
4888
4946
  "hasDynamicHelp": false,
4889
4947
  "hiddenAliases": [],
4890
- "id": "standards:usage",
4948
+ "id": "standards:check",
4891
4949
  "pluginAlias": "@memberjunction/cli",
4892
4950
  "pluginName": "@memberjunction/cli",
4893
4951
  "pluginType": "core",
@@ -4898,95 +4956,32 @@
4898
4956
  "dist",
4899
4957
  "commands",
4900
4958
  "standards",
4901
- "usage.js"
4959
+ "check.js"
4902
4960
  ]
4903
4961
  },
4904
- "translate-sql": {
4962
+ "standards:list": {
4905
4963
  "aliases": [],
4906
4964
  "args": {},
4907
- "description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
4908
- "examples": [
4909
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
4910
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
4911
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --sql \"SELECT TOP 10 [Name] FROM [Users]\"",
4912
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope all --output ./reports"
4913
- ],
4965
+ "description": "List every MemberJunction standard and this repository’s stance on it",
4914
4966
  "flags": {
4915
- "from": {
4916
- "description": "Source SQL dialect",
4917
- "name": "from",
4918
- "required": true,
4919
- "hasDynamicHelp": false,
4920
- "multiple": false,
4921
- "options": [
4922
- "sqlserver",
4923
- "postgresql"
4924
- ],
4925
- "type": "option"
4926
- },
4927
- "to": {
4928
- "description": "Target SQL dialect",
4929
- "name": "to",
4930
- "required": true,
4931
- "hasDynamicHelp": false,
4932
- "multiple": false,
4933
- "options": [
4934
- "sqlserver",
4935
- "postgresql"
4936
- ],
4937
- "type": "option"
4938
- },
4939
- "scope": {
4940
- "description": "What to scan for translation",
4941
- "name": "scope",
4942
- "default": "all",
4943
- "hasDynamicHelp": false,
4944
- "multiple": false,
4945
- "options": [
4946
- "queries",
4947
- "views",
4948
- "filters",
4949
- "all"
4950
- ],
4951
- "type": "option"
4952
- },
4953
- "sql": {
4954
- "description": "Translate a single SQL fragment (inline mode)",
4955
- "name": "sql",
4956
- "hasDynamicHelp": false,
4957
- "multiple": false,
4958
- "type": "option"
4959
- },
4960
- "dry-run": {
4961
- "description": "Show what would be translated without making changes",
4962
- "name": "dry-run",
4963
- "allowNo": false,
4964
- "type": "boolean"
4965
- },
4966
- "review": {
4967
- "description": "Generate review report only (no writes to database)",
4968
- "name": "review",
4969
- "allowNo": false,
4970
- "type": "boolean"
4971
- },
4972
- "output": {
4973
- "char": "o",
4974
- "description": "Output directory for the translation report",
4975
- "name": "output",
4967
+ "cwd": {
4968
+ "description": "Repository root. Defaults to the current directory.",
4969
+ "name": "cwd",
4976
4970
  "hasDynamicHelp": false,
4977
4971
  "multiple": false,
4978
4972
  "type": "option"
4979
4973
  },
4980
- "force": {
4981
- "description": "Re-translate even if platform variants already exist",
4982
- "name": "force",
4974
+ "verbose": {
4975
+ "char": "v",
4976
+ "description": "Include the full description of each standard.",
4977
+ "name": "verbose",
4983
4978
  "allowNo": false,
4984
4979
  "type": "boolean"
4985
4980
  }
4986
4981
  },
4987
4982
  "hasDynamicHelp": false,
4988
4983
  "hiddenAliases": [],
4989
- "id": "translate-sql",
4984
+ "id": "standards:list",
4990
4985
  "pluginAlias": "@memberjunction/cli",
4991
4986
  "pluginName": "@memberjunction/cli",
4992
4987
  "pluginType": "core",
@@ -4996,14 +4991,14 @@
4996
4991
  "relativePath": [
4997
4992
  "dist",
4998
4993
  "commands",
4999
- "translate-sql",
5000
- "index.js"
4994
+ "standards",
4995
+ "list.js"
5001
4996
  ]
5002
4997
  },
5003
- "translate-sql:usage": {
4998
+ "standards:usage": {
5004
4999
  "aliases": [],
5005
5000
  "args": {},
5006
- "description": "Show usage, flags, examples, and runtime hints for every `mj translate-sql` command.",
5001
+ "description": "Show usage, flags, examples, and runtime hints for every `mj standards` command.",
5007
5002
  "flags": {
5008
5003
  "format": {
5009
5004
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -5020,7 +5015,7 @@
5020
5015
  },
5021
5016
  "hasDynamicHelp": false,
5022
5017
  "hiddenAliases": [],
5023
- "id": "translate-sql:usage",
5018
+ "id": "standards:usage",
5024
5019
  "pluginAlias": "@memberjunction/cli",
5025
5020
  "pluginName": "@memberjunction/cli",
5026
5021
  "pluginType": "core",
@@ -5030,7 +5025,7 @@
5030
5025
  "relativePath": [
5031
5026
  "dist",
5032
5027
  "commands",
5033
- "translate-sql",
5028
+ "standards",
5034
5029
  "usage.js"
5035
5030
  ]
5036
5031
  },
@@ -6609,6 +6604,139 @@
6609
6604
  "validate.js"
6610
6605
  ]
6611
6606
  },
6607
+ "translate-sql": {
6608
+ "aliases": [],
6609
+ "args": {},
6610
+ "description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
6611
+ "examples": [
6612
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
6613
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
6614
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --sql \"SELECT TOP 10 [Name] FROM [Users]\"",
6615
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope all --output ./reports"
6616
+ ],
6617
+ "flags": {
6618
+ "from": {
6619
+ "description": "Source SQL dialect",
6620
+ "name": "from",
6621
+ "required": true,
6622
+ "hasDynamicHelp": false,
6623
+ "multiple": false,
6624
+ "options": [
6625
+ "sqlserver",
6626
+ "postgresql"
6627
+ ],
6628
+ "type": "option"
6629
+ },
6630
+ "to": {
6631
+ "description": "Target SQL dialect",
6632
+ "name": "to",
6633
+ "required": true,
6634
+ "hasDynamicHelp": false,
6635
+ "multiple": false,
6636
+ "options": [
6637
+ "sqlserver",
6638
+ "postgresql"
6639
+ ],
6640
+ "type": "option"
6641
+ },
6642
+ "scope": {
6643
+ "description": "What to scan for translation",
6644
+ "name": "scope",
6645
+ "default": "all",
6646
+ "hasDynamicHelp": false,
6647
+ "multiple": false,
6648
+ "options": [
6649
+ "queries",
6650
+ "views",
6651
+ "filters",
6652
+ "all"
6653
+ ],
6654
+ "type": "option"
6655
+ },
6656
+ "sql": {
6657
+ "description": "Translate a single SQL fragment (inline mode)",
6658
+ "name": "sql",
6659
+ "hasDynamicHelp": false,
6660
+ "multiple": false,
6661
+ "type": "option"
6662
+ },
6663
+ "dry-run": {
6664
+ "description": "Show what would be translated without making changes",
6665
+ "name": "dry-run",
6666
+ "allowNo": false,
6667
+ "type": "boolean"
6668
+ },
6669
+ "review": {
6670
+ "description": "Generate review report only (no writes to database)",
6671
+ "name": "review",
6672
+ "allowNo": false,
6673
+ "type": "boolean"
6674
+ },
6675
+ "output": {
6676
+ "char": "o",
6677
+ "description": "Output directory for the translation report",
6678
+ "name": "output",
6679
+ "hasDynamicHelp": false,
6680
+ "multiple": false,
6681
+ "type": "option"
6682
+ },
6683
+ "force": {
6684
+ "description": "Re-translate even if platform variants already exist",
6685
+ "name": "force",
6686
+ "allowNo": false,
6687
+ "type": "boolean"
6688
+ }
6689
+ },
6690
+ "hasDynamicHelp": false,
6691
+ "hiddenAliases": [],
6692
+ "id": "translate-sql",
6693
+ "pluginAlias": "@memberjunction/cli",
6694
+ "pluginName": "@memberjunction/cli",
6695
+ "pluginType": "core",
6696
+ "strict": true,
6697
+ "enableJsonFlag": false,
6698
+ "isESM": true,
6699
+ "relativePath": [
6700
+ "dist",
6701
+ "commands",
6702
+ "translate-sql",
6703
+ "index.js"
6704
+ ]
6705
+ },
6706
+ "translate-sql:usage": {
6707
+ "aliases": [],
6708
+ "args": {},
6709
+ "description": "Show usage, flags, examples, and runtime hints for every `mj translate-sql` command.",
6710
+ "flags": {
6711
+ "format": {
6712
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
6713
+ "name": "format",
6714
+ "hasDynamicHelp": false,
6715
+ "multiple": false,
6716
+ "options": [
6717
+ "text",
6718
+ "json",
6719
+ "md"
6720
+ ],
6721
+ "type": "option"
6722
+ }
6723
+ },
6724
+ "hasDynamicHelp": false,
6725
+ "hiddenAliases": [],
6726
+ "id": "translate-sql:usage",
6727
+ "pluginAlias": "@memberjunction/cli",
6728
+ "pluginName": "@memberjunction/cli",
6729
+ "pluginType": "core",
6730
+ "strict": true,
6731
+ "enableJsonFlag": false,
6732
+ "isESM": true,
6733
+ "relativePath": [
6734
+ "dist",
6735
+ "commands",
6736
+ "translate-sql",
6737
+ "usage.js"
6738
+ ]
6739
+ },
6612
6740
  "update:claude": {
6613
6741
  "aliases": [],
6614
6742
  "args": {},
@@ -7587,7 +7715,7 @@
7587
7715
  "dev:workspace:clean": {
7588
7716
  "aliases": [],
7589
7717
  "args": {},
7590
- "description": "Remove exactly the generated cross-repo workspace residue at a parent directory: the four generated files, the .mj-dev-workspace.json sentinel, pnpm-lock.yaml and the node_modules tree. Member repo checkouts and .bak backups are never touched. Without --force a valid sentinel must be present, so a hand-made workspace cannot be torn down by accident. Preview first with --dry-run, which deletes nothing and exits 0.",
7718
+ "description": "Remove exactly the generated cross-repo workspace residue at a parent directory: the three generated files, the .mj-dev-workspace.json sentinel, pnpm-lock.yaml and the node_modules tree. Member repo checkouts and .bak backups are never touched. Without --force a valid sentinel must be present, so a hand-made workspace cannot be torn down by accident. Preview first with --dry-run, which deletes nothing and exits 0.",
7591
7719
  "examples": [
7592
7720
  "<%= config.bin %> dev workspace clean --dir ~/code/bluecypress --dry-run",
7593
7721
  "<%= config.bin %> dev workspace clean --dir ~/code/bluecypress",
@@ -7637,7 +7765,7 @@
7637
7765
  "dev:workspace:doctor": {
7638
7766
  "aliases": [],
7639
7767
  "args": {},
7640
- "description": "Health-check the generated cross-repo pnpm workspace at a parent directory: workspace files, sentinel, pnpm pin vs. active version, member directories, detected-but-unlisted repos, members carrying a standalone install, and a one-copy census of the parent package store (more than one @angular/core, rxjs, zone.js or MJ core/global is a FAIL). Prints PASS/WARN/FAIL per check and exits non-zero on any FAIL. Read-only.",
7768
+ "description": "Health-check the generated cross-repo pnpm workspace at a parent directory: workspace files, sentinel, pnpm pin vs. active version, member directories, detected-but-unlisted repos, members carrying a standalone install, a one-copy census of the parent package store (more than one @angular/core, rxjs, zone.js or MJ core/global is a FAIL), and member packages whose build output is missing (FAIL) or older than their source (WARN). Prints PASS/WARN/FAIL per check and exits non-zero on any FAIL. Read-only.",
7641
7769
  "examples": [
7642
7770
  "<%= config.bin %> dev workspace doctor",
7643
7771
  "<%= config.bin %> dev workspace doctor --dir ~/code/bluecypress",
@@ -7674,7 +7802,7 @@
7674
7802
  "dev:workspace": {
7675
7803
  "aliases": [],
7676
7804
  "args": {},
7677
- "description": "Join sibling repo clones into one pnpm workspace: writes pnpm-workspace.yaml, .npmrc, package.json, turbo.json and the .mj-dev-workspace.json sentinel at their common parent, then runs pnpm install there. Members are the parent's immediate subdirectories carrying an mj-app.json, a @mj-biz-apps package, or the MJ monorepo root name. Existing files are never overwritten without --force (which keeps a .bak of each). Generated files are ephemeral — never commit them; tear them down with `dev workspace clean`.",
7805
+ "description": "Join sibling repo clones into one pnpm workspace: writes pnpm-workspace.yaml, .npmrc, package.json (with a `build` script for every member) and the .mj-dev-workspace.json sentinel at their common parent, then runs pnpm install there. Members are the parent's immediate subdirectories carrying an mj-app.json, a @mj-biz-apps package, or the MJ monorepo root name. Existing files are never overwritten without --force (which keeps a .bak of each). Generated files are ephemeral — never commit them; tear them down with `dev workspace clean`.",
7678
7806
  "examples": [
7679
7807
  "<%= config.bin %> dev workspace --dir ~/code/bluecypress",
7680
7808
  "<%= config.bin %> dev workspace --dir ~/code/bluecypress --exclude bizapps-sonar",
@@ -8238,5 +8366,5 @@
8238
8366
  ]
8239
8367
  }
8240
8368
  },
8241
- "version": "6.2.0-edge.6"
8369
+ "version": "6.2.0-edge.7"
8242
8370
  }