@memberjunction/cli 5.49.0 → 5.51.0

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.
@@ -1483,63 +1483,6 @@
1483
1483
  "usage.js"
1484
1484
  ]
1485
1485
  },
1486
- "doctor": {
1487
- "aliases": [],
1488
- "args": {},
1489
- "description": "Diagnose a MemberJunction installation",
1490
- "examples": [
1491
- "<%= config.bin %> <%= command.id %>",
1492
- "<%= config.bin %> <%= command.id %> --dir ./my-mj-project",
1493
- "<%= config.bin %> <%= command.id %> --verbose",
1494
- "<%= config.bin %> <%= command.id %> --report",
1495
- "<%= config.bin %> <%= command.id %> --report_extended"
1496
- ],
1497
- "flags": {
1498
- "dir": {
1499
- "description": "Target directory to diagnose",
1500
- "name": "dir",
1501
- "default": ".",
1502
- "hasDynamicHelp": false,
1503
- "multiple": false,
1504
- "type": "option"
1505
- },
1506
- "verbose": {
1507
- "char": "v",
1508
- "description": "Show detailed output including suggested fixes inline",
1509
- "name": "verbose",
1510
- "allowNo": false,
1511
- "type": "boolean"
1512
- },
1513
- "report": {
1514
- "char": "r",
1515
- "description": "Generate a diagnostic report file (mj-diagnostic-report.md) for sharing with support",
1516
- "name": "report",
1517
- "allowNo": false,
1518
- "type": "boolean"
1519
- },
1520
- "report_extended": {
1521
- "description": "Generate an extended report with config file snapshots and service startup log capture (~60s longer)",
1522
- "name": "report_extended",
1523
- "allowNo": false,
1524
- "type": "boolean"
1525
- }
1526
- },
1527
- "hasDynamicHelp": false,
1528
- "hiddenAliases": [],
1529
- "id": "doctor",
1530
- "pluginAlias": "@memberjunction/cli",
1531
- "pluginName": "@memberjunction/cli",
1532
- "pluginType": "core",
1533
- "strict": true,
1534
- "enableJsonFlag": false,
1535
- "isESM": true,
1536
- "relativePath": [
1537
- "dist",
1538
- "commands",
1539
- "doctor",
1540
- "index.js"
1541
- ]
1542
- },
1543
1486
  "dbdoc:analyze": {
1544
1487
  "aliases": [],
1545
1488
  "args": {},
@@ -1977,90 +1920,50 @@
1977
1920
  "status.js"
1978
1921
  ]
1979
1922
  },
1980
- "migrate:convert": {
1923
+ "doctor": {
1981
1924
  "aliases": [],
1982
1925
  "args": {},
1983
- "description": "Convert T-SQL migrations to PostgreSQL",
1926
+ "description": "Diagnose a MemberJunction installation",
1984
1927
  "examples": [
1985
- "<%= config.bin %> migrate convert --split",
1986
- "<%= config.bin %> migrate convert --split --dry-run",
1987
- "<%= config.bin %> migrate convert --split --file V202604060452__v5.24.x__KnowledgeHub.sql",
1988
- "<%= config.bin %> migrate convert --source-dir ./migrations/v5 --output-dir ./migrations-pg/v5",
1989
- "<%= config.bin %> migrate convert --verbose"
1928
+ "<%= config.bin %> <%= command.id %>",
1929
+ "<%= config.bin %> <%= command.id %> --dir ./my-mj-project",
1930
+ "<%= config.bin %> <%= command.id %> --verbose",
1931
+ "<%= config.bin %> <%= command.id %> --report",
1932
+ "<%= config.bin %> <%= command.id %> --report_extended"
1990
1933
  ],
1991
1934
  "flags": {
1992
- "source-dir": {
1993
- "description": "Source T-SQL migrations directory",
1994
- "name": "source-dir",
1995
- "default": "./migrations/v5",
1996
- "hasDynamicHelp": false,
1997
- "multiple": false,
1998
- "type": "option"
1999
- },
2000
- "output-dir": {
2001
- "description": "Output PG migrations directory",
2002
- "name": "output-dir",
2003
- "default": "./migrations-pg/v5",
2004
- "hasDynamicHelp": false,
2005
- "multiple": false,
2006
- "type": "option"
2007
- },
2008
- "file": {
2009
- "description": "Convert a specific file (filename only, looked up in source-dir)",
2010
- "name": "file",
2011
- "hasDynamicHelp": false,
2012
- "multiple": false,
2013
- "type": "option"
2014
- },
2015
- "schema": {
2016
- "description": "Target schema name",
2017
- "name": "schema",
2018
- "default": "__mj",
1935
+ "dir": {
1936
+ "description": "Target directory to diagnose",
1937
+ "name": "dir",
1938
+ "default": ".",
2019
1939
  "hasDynamicHelp": false,
2020
1940
  "multiple": false,
2021
1941
  "type": "option"
2022
1942
  },
2023
- "dry-run": {
2024
- "description": "Show what would be converted without writing files",
2025
- "name": "dry-run",
2026
- "allowNo": false,
2027
- "type": "boolean"
2028
- },
2029
- "no-header": {
2030
- "description": "Skip PG header (extensions, schema, implicit cast)",
2031
- "name": "no-header",
2032
- "allowNo": false,
2033
- "type": "boolean"
2034
- },
2035
1943
  "verbose": {
2036
1944
  "char": "v",
2037
- "description": "Show per-statement progress",
1945
+ "description": "Show detailed output including suggested fixes inline",
2038
1946
  "name": "verbose",
2039
1947
  "allowNo": false,
2040
1948
  "type": "boolean"
2041
1949
  },
2042
- "split": {
2043
- "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.",
2044
- "name": "split",
2045
- "allowNo": false,
2046
- "type": "boolean"
2047
- },
2048
- "allow-gaps": {
2049
- "description": "With --split: exit 0 even when migrations have conversion gaps (hand-authoring needed or unhandled statements). Gaps are still embedded as comments and listed in the summary.",
2050
- "name": "allow-gaps",
1950
+ "report": {
1951
+ "char": "r",
1952
+ "description": "Generate a diagnostic report file (mj-diagnostic-report.md) for sharing with support",
1953
+ "name": "report",
2051
1954
  "allowNo": false,
2052
1955
  "type": "boolean"
2053
1956
  },
2054
- "bake-codegen": {
2055
- "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.",
2056
- "name": "bake-codegen",
1957
+ "report_extended": {
1958
+ "description": "Generate an extended report with config file snapshots and service startup log capture (~60s longer)",
1959
+ "name": "report_extended",
2057
1960
  "allowNo": false,
2058
1961
  "type": "boolean"
2059
1962
  }
2060
1963
  },
2061
1964
  "hasDynamicHelp": false,
2062
1965
  "hiddenAliases": [],
2063
- "id": "migrate:convert",
1966
+ "id": "doctor",
2064
1967
  "pluginAlias": "@memberjunction/cli",
2065
1968
  "pluginName": "@memberjunction/cli",
2066
1969
  "pluginType": "core",
@@ -2070,63 +1973,110 @@
2070
1973
  "relativePath": [
2071
1974
  "dist",
2072
1975
  "commands",
2073
- "migrate",
2074
- "convert.js"
1976
+ "doctor",
1977
+ "index.js"
2075
1978
  ]
2076
1979
  },
2077
- "migrate:create": {
1980
+ "install:claude": {
2078
1981
  "aliases": [],
2079
- "args": {
2080
- "description": {
2081
- "description": "Short description (will be converted to PascalCase with underscores)",
2082
- "name": "description",
2083
- "required": true
2084
- }
2085
- },
2086
- "description": "Scaffold a new migration file for the current database platform",
1982
+ "args": {},
1983
+ "description": "Install or refresh the Claude Code pack in the current directory.",
2087
1984
  "examples": [
2088
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\"",
2089
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --version 5.25 --platform postgresql",
2090
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --dir ./migrations/v5"
1985
+ "<%= config.bin %> install:claude",
1986
+ "<%= config.bin %> install:claude --dry-run",
1987
+ "<%= config.bin %> install:claude --from ./local-pack",
1988
+ "<%= config.bin %> install:claude --json"
2091
1989
  ],
2092
1990
  "flags": {
2093
- "version": {
2094
- "char": "v",
2095
- "description": "Migration version tag, e.g. \"5.25\" (default: parsed from repo baseline or \"0.0\")",
2096
- "name": "version",
1991
+ "dir": {
1992
+ "description": "Target directory for the install",
1993
+ "name": "dir",
1994
+ "default": ".",
2097
1995
  "hasDynamicHelp": false,
2098
1996
  "multiple": false,
2099
1997
  "type": "option"
2100
1998
  },
2101
- "platform": {
2102
- "char": "p",
2103
- "description": "Override platform: sqlserver | postgresql (default: config.dbPlatform)",
2104
- "name": "platform",
1999
+ "major": {
2000
+ "description": "Force a specific MJ major (default: detected from package.json)",
2001
+ "name": "major",
2105
2002
  "hasDynamicHelp": false,
2106
2003
  "multiple": false,
2107
- "options": [
2108
- "sqlserver",
2109
- "postgresql"
2110
- ],
2111
2004
  "type": "option"
2112
2005
  },
2113
- "dir": {
2114
- "description": "Output directory (default: ./migrations/v5 or ./migrations-pg/v5)",
2115
- "name": "dir",
2006
+ "ref": {
2007
+ "description": "Git ref to fetch from (branch or tag). Default: main.",
2008
+ "name": "ref",
2116
2009
  "hasDynamicHelp": false,
2117
2010
  "multiple": false,
2118
2011
  "type": "option"
2119
2012
  },
2120
- "x-x": {
2121
- "description": "Use {version}.x.x suffix instead of {version}.x (e.g. 5.25.x instead of 5.25.x)",
2122
- "name": "x-x",
2013
+ "from": {
2014
+ "description": "Use a local pack source instead of fetching from GitHub",
2015
+ "name": "from",
2016
+ "hasDynamicHelp": false,
2017
+ "multiple": false,
2018
+ "type": "option"
2019
+ },
2020
+ "offline": {
2021
+ "description": "Forbid network; requires --from <path>",
2022
+ "name": "offline",
2023
+ "allowNo": false,
2024
+ "type": "boolean"
2025
+ },
2026
+ "dry-run": {
2027
+ "description": "Print what would be written; change nothing",
2028
+ "name": "dry-run",
2029
+ "allowNo": false,
2030
+ "type": "boolean"
2031
+ },
2032
+ "yes": {
2033
+ "char": "y",
2034
+ "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
2035
+ "name": "yes",
2036
+ "allowNo": false,
2037
+ "type": "boolean"
2038
+ },
2039
+ "force": {
2040
+ "description": "Overwrite user-customized commands/skills (saves .bak files)",
2041
+ "name": "force",
2042
+ "allowNo": false,
2043
+ "type": "boolean"
2044
+ },
2045
+ "skip-commands": {
2046
+ "description": "Skip seeding .claude/commands/",
2047
+ "name": "skip-commands",
2048
+ "allowNo": false,
2049
+ "type": "boolean"
2050
+ },
2051
+ "skip-skills": {
2052
+ "description": "Skip seeding .claude/skills/",
2053
+ "name": "skip-skills",
2054
+ "allowNo": false,
2055
+ "type": "boolean"
2056
+ },
2057
+ "skip-settings": {
2058
+ "description": "Skip merging .claude/settings.json",
2059
+ "name": "skip-settings",
2060
+ "allowNo": false,
2061
+ "type": "boolean"
2062
+ },
2063
+ "json": {
2064
+ "description": "Output as JSON (matches plan §7.5 schema)",
2065
+ "name": "json",
2066
+ "allowNo": false,
2067
+ "type": "boolean"
2068
+ },
2069
+ "verbose": {
2070
+ "char": "v",
2071
+ "description": "Show progress messages from the fetcher and merger",
2072
+ "name": "verbose",
2123
2073
  "allowNo": false,
2124
2074
  "type": "boolean"
2125
2075
  }
2126
2076
  },
2127
2077
  "hasDynamicHelp": false,
2128
2078
  "hiddenAliases": [],
2129
- "id": "migrate:create",
2079
+ "id": "install:claude",
2130
2080
  "pluginAlias": "@memberjunction/cli",
2131
2081
  "pluginName": "@memberjunction/cli",
2132
2082
  "pluginType": "core",
@@ -2136,60 +2086,118 @@
2136
2086
  "relativePath": [
2137
2087
  "dist",
2138
2088
  "commands",
2139
- "migrate",
2140
- "create.js"
2089
+ "install",
2090
+ "claude.js"
2141
2091
  ]
2142
2092
  },
2143
- "migrate": {
2093
+ "install": {
2144
2094
  "aliases": [],
2145
2095
  "args": {},
2146
- "description": "Migrate MemberJunction database to latest version",
2096
+ "description": "Install MemberJunction from a GitHub release",
2147
2097
  "examples": [
2148
- "<%= config.bin %> <%= command.id %>\n",
2149
- "<%= config.bin %> <%= command.id %> --schema __BCSaaS --dir ./migrations/v1\n",
2150
- "<%= config.bin %> <%= command.id %> --schema __BCSaaS --tag v1.0.0\n"
2098
+ "<%= config.bin %> <%= command.id %>",
2099
+ "<%= config.bin %> <%= command.id %> -t v4.3.0",
2100
+ "<%= config.bin %> <%= command.id %> --dry-run",
2101
+ "<%= config.bin %> <%= command.id %> --yes"
2151
2102
  ],
2152
2103
  "flags": {
2153
- "verbose": {
2154
- "char": "v",
2155
- "description": "Enable additional logging",
2156
- "name": "verbose",
2157
- "allowNo": false,
2158
- "type": "boolean"
2159
- },
2160
2104
  "tag": {
2161
2105
  "char": "t",
2162
- "description": "Version tag to use for running remote migrations",
2106
+ "description": "Release tag to install (e.g. v4.3.0). If omitted, shows a version picker.",
2163
2107
  "name": "tag",
2164
2108
  "hasDynamicHelp": false,
2165
2109
  "multiple": false,
2166
2110
  "type": "option"
2167
2111
  },
2168
- "schema": {
2169
- "char": "s",
2170
- "description": "Target schema (overrides coreSchema from config)",
2171
- "name": "schema",
2112
+ "dir": {
2113
+ "description": "Target directory for the installation",
2114
+ "name": "dir",
2115
+ "default": ".",
2172
2116
  "hasDynamicHelp": false,
2173
2117
  "multiple": false,
2174
2118
  "type": "option"
2175
2119
  },
2176
- "dir": {
2177
- "description": "Migration source directory (overrides migrationsLocation from config)",
2178
- "name": "dir",
2120
+ "config": {
2121
+ "char": "c",
2122
+ "description": "Path to JSON config file with install settings (database, auth, ports, etc.)",
2123
+ "name": "config",
2179
2124
  "hasDynamicHelp": false,
2180
2125
  "multiple": false,
2181
2126
  "type": "option"
2182
2127
  },
2183
- "check-connection": {
2184
- "description": "Verify the database connection (including TLS) and exit without migrating",
2185
- "name": "check-connection",
2128
+ "legacy": {
2129
+ "description": "Use the legacy interactive installer (ZIP-only distribution)",
2130
+ "hidden": true,
2131
+ "name": "legacy",
2132
+ "allowNo": false,
2133
+ "type": "boolean"
2134
+ },
2135
+ "dry-run": {
2136
+ "description": "Show the install plan without executing it",
2137
+ "name": "dry-run",
2138
+ "allowNo": false,
2139
+ "type": "boolean"
2140
+ },
2141
+ "yes": {
2142
+ "char": "y",
2143
+ "description": "Non-interactive mode: auto-select latest version and accept defaults",
2144
+ "name": "yes",
2145
+ "allowNo": false,
2146
+ "type": "boolean"
2147
+ },
2148
+ "verbose": {
2149
+ "char": "v",
2150
+ "description": "Show detailed output",
2151
+ "name": "verbose",
2152
+ "allowNo": false,
2153
+ "type": "boolean"
2154
+ },
2155
+ "skip-db": {
2156
+ "description": "Skip database provisioning phases",
2157
+ "name": "skip-db",
2158
+ "allowNo": false,
2159
+ "type": "boolean"
2160
+ },
2161
+ "skip-start": {
2162
+ "description": "Skip service startup and smoke tests",
2163
+ "name": "skip-start",
2164
+ "allowNo": false,
2165
+ "type": "boolean"
2166
+ },
2167
+ "no-resume": {
2168
+ "description": "Ignore any existing checkpoint and start fresh",
2169
+ "name": "no-resume",
2170
+ "allowNo": false,
2171
+ "type": "boolean"
2172
+ },
2173
+ "fast": {
2174
+ "description": "Fast mode: skip smoke test and optimize post-codegen steps. Re-run without --fast if you encounter issues.",
2175
+ "name": "fast",
2176
+ "allowNo": false,
2177
+ "type": "boolean"
2178
+ },
2179
+ "overwrite-config": {
2180
+ "description": "Overwrite existing config files (.env, mj.config.cjs, environment.ts) instead of preserving them",
2181
+ "name": "overwrite-config",
2182
+ "allowNo": false,
2183
+ "type": "boolean"
2184
+ },
2185
+ "monorepo": {
2186
+ "description": "Install the full MemberJunction source repository instead of the lightweight distribution. Use this for MJ framework development.",
2187
+ "name": "monorepo",
2188
+ "allowNo": false,
2189
+ "type": "boolean"
2190
+ },
2191
+ "no-claude-pack": {
2192
+ "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.",
2193
+ "name": "no-claude-pack",
2186
2194
  "allowNo": false,
2187
2195
  "type": "boolean"
2188
2196
  }
2189
2197
  },
2190
2198
  "hasDynamicHelp": false,
2191
2199
  "hiddenAliases": [],
2192
- "id": "migrate",
2200
+ "id": "install",
2193
2201
  "pluginAlias": "@memberjunction/cli",
2194
2202
  "pluginName": "@memberjunction/cli",
2195
2203
  "pluginType": "core",
@@ -2199,17 +2207,20 @@
2199
2207
  "relativePath": [
2200
2208
  "dist",
2201
2209
  "commands",
2202
- "migrate",
2210
+ "install",
2203
2211
  "index.js"
2204
2212
  ]
2205
2213
  },
2206
- "migrate:rebake": {
2214
+ "migrate:convert": {
2207
2215
  "aliases": [],
2208
2216
  "args": {},
2209
- "description": "Re-bake the post-baseline PG migration set with inline native CodeGen",
2217
+ "description": "Convert T-SQL migrations to PostgreSQL",
2210
2218
  "examples": [
2211
- "<%= config.bin %> migrate rebake",
2212
- "<%= config.bin %> migrate rebake --baseline-floor V202605291452 --dry-run"
2219
+ "<%= config.bin %> migrate convert --split",
2220
+ "<%= config.bin %> migrate convert --split --dry-run",
2221
+ "<%= config.bin %> migrate convert --split --file V202604060452__v5.24.x__KnowledgeHub.sql",
2222
+ "<%= config.bin %> migrate convert --source-dir ./migrations/v5 --output-dir ./migrations-pg/v5",
2223
+ "<%= config.bin %> migrate convert --verbose"
2213
2224
  ],
2214
2225
  "flags": {
2215
2226
  "source-dir": {
@@ -2221,38 +2232,69 @@
2221
2232
  "type": "option"
2222
2233
  },
2223
2234
  "output-dir": {
2224
- "description": "PG migrations directory (committed files read here + baked output written here)",
2235
+ "description": "Output PG migrations directory",
2225
2236
  "name": "output-dir",
2226
2237
  "default": "./migrations-pg/v5",
2227
2238
  "hasDynamicHelp": false,
2228
2239
  "multiple": false,
2229
2240
  "type": "option"
2230
2241
  },
2231
- "schema": {
2232
- "description": "Target schema name",
2233
- "name": "schema",
2234
- "default": "__mj",
2242
+ "file": {
2243
+ "description": "Convert a specific file (filename only, looked up in source-dir)",
2244
+ "name": "file",
2235
2245
  "hasDynamicHelp": false,
2236
2246
  "multiple": false,
2237
2247
  "type": "option"
2238
2248
  },
2239
- "baseline-floor": {
2240
- "description": "Re-bake migrations strictly AFTER this version key (default: the latest B* in output-dir)",
2241
- "name": "baseline-floor",
2249
+ "schema": {
2250
+ "description": "Target schema name",
2251
+ "name": "schema",
2252
+ "default": "__mj",
2242
2253
  "hasDynamicHelp": false,
2243
2254
  "multiple": false,
2244
2255
  "type": "option"
2245
2256
  },
2246
2257
  "dry-run": {
2247
- "description": "Report what would be re-baked without writing files",
2258
+ "description": "Show what would be converted without writing files",
2248
2259
  "name": "dry-run",
2249
2260
  "allowNo": false,
2250
2261
  "type": "boolean"
2262
+ },
2263
+ "no-header": {
2264
+ "description": "Skip PG header (extensions, schema, implicit cast)",
2265
+ "name": "no-header",
2266
+ "allowNo": false,
2267
+ "type": "boolean"
2268
+ },
2269
+ "verbose": {
2270
+ "char": "v",
2271
+ "description": "Show per-statement progress",
2272
+ "name": "verbose",
2273
+ "allowNo": false,
2274
+ "type": "boolean"
2275
+ },
2276
+ "split": {
2277
+ "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.",
2278
+ "name": "split",
2279
+ "allowNo": false,
2280
+ "type": "boolean"
2281
+ },
2282
+ "allow-gaps": {
2283
+ "description": "With --split: exit 0 even when migrations have conversion gaps (hand-authoring needed or unhandled statements). Gaps are still embedded as comments and listed in the summary.",
2284
+ "name": "allow-gaps",
2285
+ "allowNo": false,
2286
+ "type": "boolean"
2287
+ },
2288
+ "bake-codegen": {
2289
+ "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.",
2290
+ "name": "bake-codegen",
2291
+ "allowNo": false,
2292
+ "type": "boolean"
2251
2293
  }
2252
2294
  },
2253
2295
  "hasDynamicHelp": false,
2254
2296
  "hiddenAliases": [],
2255
- "id": "migrate:rebake",
2297
+ "id": "migrate:convert",
2256
2298
  "pluginAlias": "@memberjunction/cli",
2257
2299
  "pluginName": "@memberjunction/cli",
2258
2300
  "pluginType": "core",
@@ -2263,40 +2305,62 @@
2263
2305
  "dist",
2264
2306
  "commands",
2265
2307
  "migrate",
2266
- "rebake.js"
2308
+ "convert.js"
2267
2309
  ]
2268
2310
  },
2269
- "plugin:add": {
2311
+ "migrate:create": {
2270
2312
  "aliases": [],
2271
2313
  "args": {
2272
- "package": {
2273
- "description": "Plugin entry-point specifier (package name, subpath, or relative path)",
2274
- "name": "package",
2314
+ "description": {
2315
+ "description": "Short description (will be converted to PascalCase with underscores)",
2316
+ "name": "description",
2275
2317
  "required": true
2276
2318
  }
2277
2319
  },
2278
- "description": "Register a CLI plugin package in mj-cli-plugins.json so `mj` loads it at startup.",
2320
+ "description": "Scaffold a new migration file for the current database platform",
2279
2321
  "examples": [
2280
- "<%= config.bin %> <%= command.id %> @my-org/mj-plugin/plugins",
2281
- "<%= config.bin %> <%= command.id %> ./local-plugins/my-tool"
2322
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\"",
2323
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --version 5.25 --platform postgresql",
2324
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --dir ./migrations/v5"
2282
2325
  ],
2283
2326
  "flags": {
2284
- "format": {
2285
- "description": "Output format",
2286
- "name": "format",
2287
- "default": "text",
2327
+ "version": {
2328
+ "char": "v",
2329
+ "description": "Migration version tag, e.g. \"5.25\" (default: parsed from repo baseline or \"0.0\")",
2330
+ "name": "version",
2331
+ "hasDynamicHelp": false,
2332
+ "multiple": false,
2333
+ "type": "option"
2334
+ },
2335
+ "platform": {
2336
+ "char": "p",
2337
+ "description": "Override platform: sqlserver | postgresql (default: config.dbPlatform)",
2338
+ "name": "platform",
2288
2339
  "hasDynamicHelp": false,
2289
2340
  "multiple": false,
2290
2341
  "options": [
2291
- "text",
2292
- "json"
2342
+ "sqlserver",
2343
+ "postgresql"
2293
2344
  ],
2294
2345
  "type": "option"
2346
+ },
2347
+ "dir": {
2348
+ "description": "Output directory (default: ./migrations/v5 or ./migrations-pg/v5)",
2349
+ "name": "dir",
2350
+ "hasDynamicHelp": false,
2351
+ "multiple": false,
2352
+ "type": "option"
2353
+ },
2354
+ "x-x": {
2355
+ "description": "Use {version}.x.x suffix instead of {version}.x (e.g. 5.25.x instead of 5.25.x)",
2356
+ "name": "x-x",
2357
+ "allowNo": false,
2358
+ "type": "boolean"
2295
2359
  }
2296
2360
  },
2297
2361
  "hasDynamicHelp": false,
2298
2362
  "hiddenAliases": [],
2299
- "id": "plugin:add",
2363
+ "id": "migrate:create",
2300
2364
  "pluginAlias": "@memberjunction/cli",
2301
2365
  "pluginName": "@memberjunction/cli",
2302
2366
  "pluginType": "core",
@@ -2306,110 +2370,60 @@
2306
2370
  "relativePath": [
2307
2371
  "dist",
2308
2372
  "commands",
2309
- "plugin",
2310
- "add.js"
2373
+ "migrate",
2374
+ "create.js"
2311
2375
  ]
2312
2376
  },
2313
- "install:claude": {
2377
+ "migrate": {
2314
2378
  "aliases": [],
2315
2379
  "args": {},
2316
- "description": "Install or refresh the Claude Code pack in the current directory.",
2380
+ "description": "Migrate MemberJunction database to latest version",
2317
2381
  "examples": [
2318
- "<%= config.bin %> install:claude",
2319
- "<%= config.bin %> install:claude --dry-run",
2320
- "<%= config.bin %> install:claude --from ./local-pack",
2321
- "<%= config.bin %> install:claude --json"
2382
+ "<%= config.bin %> <%= command.id %>\n",
2383
+ "<%= config.bin %> <%= command.id %> --schema __BCSaaS --dir ./migrations/v1\n",
2384
+ "<%= config.bin %> <%= command.id %> --schema __BCSaaS --tag v1.0.0\n"
2322
2385
  ],
2323
2386
  "flags": {
2324
- "dir": {
2325
- "description": "Target directory for the install",
2326
- "name": "dir",
2327
- "default": ".",
2328
- "hasDynamicHelp": false,
2329
- "multiple": false,
2330
- "type": "option"
2387
+ "verbose": {
2388
+ "char": "v",
2389
+ "description": "Enable additional logging",
2390
+ "name": "verbose",
2391
+ "allowNo": false,
2392
+ "type": "boolean"
2331
2393
  },
2332
- "major": {
2333
- "description": "Force a specific MJ major (default: detected from package.json)",
2334
- "name": "major",
2394
+ "tag": {
2395
+ "char": "t",
2396
+ "description": "Version tag to use for running remote migrations",
2397
+ "name": "tag",
2335
2398
  "hasDynamicHelp": false,
2336
2399
  "multiple": false,
2337
2400
  "type": "option"
2338
2401
  },
2339
- "ref": {
2340
- "description": "Git ref to fetch from (branch or tag). Default: main.",
2341
- "name": "ref",
2402
+ "schema": {
2403
+ "char": "s",
2404
+ "description": "Target schema (overrides coreSchema from config)",
2405
+ "name": "schema",
2342
2406
  "hasDynamicHelp": false,
2343
2407
  "multiple": false,
2344
2408
  "type": "option"
2345
2409
  },
2346
- "from": {
2347
- "description": "Use a local pack source instead of fetching from GitHub",
2348
- "name": "from",
2410
+ "dir": {
2411
+ "description": "Migration source directory (overrides migrationsLocation from config)",
2412
+ "name": "dir",
2349
2413
  "hasDynamicHelp": false,
2350
2414
  "multiple": false,
2351
2415
  "type": "option"
2352
2416
  },
2353
- "offline": {
2354
- "description": "Forbid network; requires --from <path>",
2355
- "name": "offline",
2356
- "allowNo": false,
2357
- "type": "boolean"
2358
- },
2359
- "dry-run": {
2360
- "description": "Print what would be written; change nothing",
2361
- "name": "dry-run",
2362
- "allowNo": false,
2363
- "type": "boolean"
2364
- },
2365
- "yes": {
2366
- "char": "y",
2367
- "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
2368
- "name": "yes",
2369
- "allowNo": false,
2370
- "type": "boolean"
2371
- },
2372
- "force": {
2373
- "description": "Overwrite user-customized commands/skills (saves .bak files)",
2374
- "name": "force",
2375
- "allowNo": false,
2376
- "type": "boolean"
2377
- },
2378
- "skip-commands": {
2379
- "description": "Skip seeding .claude/commands/",
2380
- "name": "skip-commands",
2381
- "allowNo": false,
2382
- "type": "boolean"
2383
- },
2384
- "skip-skills": {
2385
- "description": "Skip seeding .claude/skills/",
2386
- "name": "skip-skills",
2387
- "allowNo": false,
2388
- "type": "boolean"
2389
- },
2390
- "skip-settings": {
2391
- "description": "Skip merging .claude/settings.json",
2392
- "name": "skip-settings",
2393
- "allowNo": false,
2394
- "type": "boolean"
2395
- },
2396
- "json": {
2397
- "description": "Output as JSON (matches plan §7.5 schema)",
2398
- "name": "json",
2399
- "allowNo": false,
2400
- "type": "boolean"
2401
- },
2402
- "verbose": {
2403
- "char": "v",
2404
- "description": "Show progress messages from the fetcher and merger",
2405
- "name": "verbose",
2417
+ "check-connection": {
2418
+ "description": "Verify the database connection (including TLS) and exit without migrating",
2419
+ "name": "check-connection",
2406
2420
  "allowNo": false,
2407
2421
  "type": "boolean"
2408
2422
  }
2409
2423
  },
2410
2424
  "hasDynamicHelp": false,
2411
2425
  "hiddenAliases": [],
2412
- "id": "install:claude",
2426
+ "id": "migrate",
2413
2427
  "pluginAlias": "@memberjunction/cli",
2414
2428
  "pluginName": "@memberjunction/cli",
2415
2429
  "pluginType": "core",
@@ -2419,118 +2433,60 @@
2419
2433
  "relativePath": [
2420
2434
  "dist",
2421
2435
  "commands",
2422
- "install",
2423
- "claude.js"
2436
+ "migrate",
2437
+ "index.js"
2424
2438
  ]
2425
2439
  },
2426
- "install": {
2440
+ "migrate:rebake": {
2427
2441
  "aliases": [],
2428
2442
  "args": {},
2429
- "description": "Install MemberJunction from a GitHub release",
2443
+ "description": "Re-bake the post-baseline PG migration set with inline native CodeGen",
2430
2444
  "examples": [
2431
- "<%= config.bin %> <%= command.id %>",
2432
- "<%= config.bin %> <%= command.id %> -t v4.3.0",
2433
- "<%= config.bin %> <%= command.id %> --dry-run",
2434
- "<%= config.bin %> <%= command.id %> --yes"
2445
+ "<%= config.bin %> migrate rebake",
2446
+ "<%= config.bin %> migrate rebake --baseline-floor V202605291452 --dry-run"
2435
2447
  ],
2436
2448
  "flags": {
2437
- "tag": {
2438
- "char": "t",
2439
- "description": "Release tag to install (e.g. v4.3.0). If omitted, shows a version picker.",
2440
- "name": "tag",
2449
+ "source-dir": {
2450
+ "description": "Source T-SQL migrations directory",
2451
+ "name": "source-dir",
2452
+ "default": "./migrations/v5",
2441
2453
  "hasDynamicHelp": false,
2442
2454
  "multiple": false,
2443
2455
  "type": "option"
2444
2456
  },
2445
- "dir": {
2446
- "description": "Target directory for the installation",
2447
- "name": "dir",
2448
- "default": ".",
2457
+ "output-dir": {
2458
+ "description": "PG migrations directory (committed files read here + baked output written here)",
2459
+ "name": "output-dir",
2460
+ "default": "./migrations-pg/v5",
2449
2461
  "hasDynamicHelp": false,
2450
2462
  "multiple": false,
2451
2463
  "type": "option"
2452
2464
  },
2453
- "config": {
2454
- "char": "c",
2455
- "description": "Path to JSON config file with install settings (database, auth, ports, etc.)",
2456
- "name": "config",
2465
+ "schema": {
2466
+ "description": "Target schema name",
2467
+ "name": "schema",
2468
+ "default": "__mj",
2457
2469
  "hasDynamicHelp": false,
2458
2470
  "multiple": false,
2459
2471
  "type": "option"
2460
2472
  },
2461
- "legacy": {
2462
- "description": "Use the legacy interactive installer (ZIP-only distribution)",
2463
- "hidden": true,
2464
- "name": "legacy",
2465
- "allowNo": false,
2466
- "type": "boolean"
2473
+ "baseline-floor": {
2474
+ "description": "Re-bake migrations strictly AFTER this version key (default: the latest B* in output-dir)",
2475
+ "name": "baseline-floor",
2476
+ "hasDynamicHelp": false,
2477
+ "multiple": false,
2478
+ "type": "option"
2467
2479
  },
2468
2480
  "dry-run": {
2469
- "description": "Show the install plan without executing it",
2481
+ "description": "Report what would be re-baked without writing files",
2470
2482
  "name": "dry-run",
2471
2483
  "allowNo": false,
2472
2484
  "type": "boolean"
2473
- },
2474
- "yes": {
2475
- "char": "y",
2476
- "description": "Non-interactive mode: auto-select latest version and accept defaults",
2477
- "name": "yes",
2478
- "allowNo": false,
2479
- "type": "boolean"
2480
- },
2481
- "verbose": {
2482
- "char": "v",
2483
- "description": "Show detailed output",
2484
- "name": "verbose",
2485
- "allowNo": false,
2486
- "type": "boolean"
2487
- },
2488
- "skip-db": {
2489
- "description": "Skip database provisioning phases",
2490
- "name": "skip-db",
2491
- "allowNo": false,
2492
- "type": "boolean"
2493
- },
2494
- "skip-start": {
2495
- "description": "Skip service startup and smoke tests",
2496
- "name": "skip-start",
2497
- "allowNo": false,
2498
- "type": "boolean"
2499
- },
2500
- "no-resume": {
2501
- "description": "Ignore any existing checkpoint and start fresh",
2502
- "name": "no-resume",
2503
- "allowNo": false,
2504
- "type": "boolean"
2505
- },
2506
- "fast": {
2507
- "description": "Fast mode: skip smoke test and optimize post-codegen steps. Re-run without --fast if you encounter issues.",
2508
- "name": "fast",
2509
- "allowNo": false,
2510
- "type": "boolean"
2511
- },
2512
- "overwrite-config": {
2513
- "description": "Overwrite existing config files (.env, mj.config.cjs, environment.ts) instead of preserving them",
2514
- "name": "overwrite-config",
2515
- "allowNo": false,
2516
- "type": "boolean"
2517
- },
2518
- "monorepo": {
2519
- "description": "Install the full MemberJunction source repository instead of the lightweight distribution. Use this for MJ framework development.",
2520
- "name": "monorepo",
2521
- "allowNo": false,
2522
- "type": "boolean"
2523
- },
2524
- "no-claude-pack": {
2525
- "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.",
2526
- "name": "no-claude-pack",
2527
- "allowNo": false,
2528
- "type": "boolean"
2529
2485
  }
2530
2486
  },
2531
2487
  "hasDynamicHelp": false,
2532
2488
  "hiddenAliases": [],
2533
- "id": "install",
2489
+ "id": "migrate:rebake",
2534
2490
  "pluginAlias": "@memberjunction/cli",
2535
2491
  "pluginName": "@memberjunction/cli",
2536
2492
  "pluginType": "core",
@@ -2540,8 +2496,8 @@
2540
2496
  "relativePath": [
2541
2497
  "dist",
2542
2498
  "commands",
2543
- "install",
2544
- "index.js"
2499
+ "migrate",
2500
+ "rebake.js"
2545
2501
  ]
2546
2502
  },
2547
2503
  "querygen:export": {
@@ -4294,6 +4250,50 @@
4294
4250
  "index.js"
4295
4251
  ]
4296
4252
  },
4253
+ "plugin:add": {
4254
+ "aliases": [],
4255
+ "args": {
4256
+ "package": {
4257
+ "description": "Plugin entry-point specifier (package name, subpath, or relative path)",
4258
+ "name": "package",
4259
+ "required": true
4260
+ }
4261
+ },
4262
+ "description": "Register a CLI plugin package in mj-cli-plugins.json so `mj` loads it at startup.",
4263
+ "examples": [
4264
+ "<%= config.bin %> <%= command.id %> @my-org/mj-plugin/plugins",
4265
+ "<%= config.bin %> <%= command.id %> ./local-plugins/my-tool"
4266
+ ],
4267
+ "flags": {
4268
+ "format": {
4269
+ "description": "Output format",
4270
+ "name": "format",
4271
+ "default": "text",
4272
+ "hasDynamicHelp": false,
4273
+ "multiple": false,
4274
+ "options": [
4275
+ "text",
4276
+ "json"
4277
+ ],
4278
+ "type": "option"
4279
+ }
4280
+ },
4281
+ "hasDynamicHelp": false,
4282
+ "hiddenAliases": [],
4283
+ "id": "plugin:add",
4284
+ "pluginAlias": "@memberjunction/cli",
4285
+ "pluginName": "@memberjunction/cli",
4286
+ "pluginType": "core",
4287
+ "strict": true,
4288
+ "enableJsonFlag": false,
4289
+ "isESM": true,
4290
+ "relativePath": [
4291
+ "dist",
4292
+ "commands",
4293
+ "plugin",
4294
+ "add.js"
4295
+ ]
4296
+ },
4297
4297
  "update:claude": {
4298
4298
  "aliases": [],
4299
4299
  "args": {},
@@ -5480,5 +5480,5 @@
5480
5480
  ]
5481
5481
  }
5482
5482
  },
5483
- "version": "5.49.0"
5483
+ "version": "5.51.0"
5484
5484
  }