@memberjunction/cli 5.40.2 → 5.41.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.
@@ -22,54 +22,17 @@
22
22
  "index.js"
23
23
  ]
24
24
  },
25
- "artifacts:reclassify": {
25
+ "app:check-updates": {
26
26
  "aliases": [],
27
27
  "args": {},
28
- "description": "Upgrade-recovery utility for v5.35 artifact unification. Re-evaluates rows whose TypeID is the deleted JSON fallback but whose actual content does not parse as JSON. Normally a no-op: the v5.35 backfill migration handles this automatically. This command is only relevant when the migration ran BEFORE the artifact-type metadata (Generic Text / Generic Binary) was pushed via `mj sync push`, in which case the migration prints a notice telling you to run this. Reports \"no candidates\" once everything is reconciled. Dry-run by default; --apply writes through Record Changes.",
28
+ "description": "Check for available upgrades for installed MJ Open Apps",
29
29
  "examples": [
30
- "<%= config.bin %> <%= command.id %>",
31
- "<%= config.bin %> <%= command.id %> --apply --limit 50"
30
+ "<%= config.bin %> app check-updates"
32
31
  ],
33
- "flags": {
34
- "conversation-id": {
35
- "description": "Scope to artifacts attached to the given conversation.",
36
- "name": "conversation-id",
37
- "hasDynamicHelp": false,
38
- "multiple": false,
39
- "type": "option"
40
- },
41
- "since": {
42
- "description": "Scope to artifacts created on/after this ISO date.",
43
- "name": "since",
44
- "hasDynamicHelp": false,
45
- "multiple": false,
46
- "type": "option"
47
- },
48
- "limit": {
49
- "description": "Maximum number of rows to inspect.",
50
- "name": "limit",
51
- "default": 100,
52
- "hasDynamicHelp": false,
53
- "multiple": false,
54
- "type": "option"
55
- },
56
- "apply": {
57
- "description": "Write changes. Without this flag, this command only reports what it would do.",
58
- "name": "apply",
59
- "allowNo": false,
60
- "type": "boolean"
61
- },
62
- "verbose": {
63
- "char": "v",
64
- "description": "Print every candidate row, not just the summary.",
65
- "name": "verbose",
66
- "allowNo": false,
67
- "type": "boolean"
68
- }
69
- },
32
+ "flags": {},
70
33
  "hasDynamicHelp": false,
71
34
  "hiddenAliases": [],
72
- "id": "artifacts:reclassify",
35
+ "id": "app:check-updates",
73
36
  "pluginAlias": "@memberjunction/cli",
74
37
  "pluginName": "@memberjunction/cli",
75
38
  "pluginType": "core",
@@ -79,96 +42,27 @@
79
42
  "relativePath": [
80
43
  "dist",
81
44
  "commands",
82
- "artifacts",
83
- "reclassify.js"
45
+ "app",
46
+ "check-updates.js"
84
47
  ]
85
48
  },
86
- "baseline:build": {
49
+ "app:disable": {
87
50
  "aliases": [],
88
- "args": {},
89
- "description": "Generate a deterministic baseline SQL script from the END-STATE of a migrated MSSQL database.",
90
- "examples": [
91
- "<%= config.bin %> <%= command.id %> --out ./migrations/v5/ # auto: within-major rebaseline",
92
- "<%= config.bin %> <%= command.id %> --source-dir ./migrations/v5 --out ./migrations/v5/",
93
- "<%= config.bin %> <%= command.id %> --baseline-version 6.0 --out ./migrations/v6/ # explicit major-boundary",
94
- "<%= config.bin %> <%= command.id %> --baseline-version 5.32 --database MJ_BL_Stack --out /tmp/baseline/"
95
- ],
96
- "flags": {
97
- "baseline-version": {
98
- "description": "Baseline version stamp in Major.Minor format (literal x is appended for patch, matching the V-file convention). Omit to auto-detect from --source-dir (within-major rebaseline mode).",
99
- "name": "baseline-version",
100
- "hasDynamicHelp": false,
101
- "multiple": false,
102
- "type": "option"
103
- },
104
- "source-dir": {
105
- "description": "Migrations source directory (e.g. ./migrations/v5). Used to auto-detect the next baseline version + timestamp when --baseline-version is omitted. Defaults to the highest migrations/v*/ directory walked up from cwd.",
106
- "name": "source-dir",
107
- "hasDynamicHelp": false,
108
- "multiple": false,
109
- "type": "option"
110
- },
111
- "description": {
112
- "description": "Human-readable description embedded in the file header.",
113
- "name": "description",
114
- "default": "MemberJunction Baseline",
115
- "hasDynamicHelp": false,
116
- "multiple": false,
117
- "type": "option"
118
- },
119
- "database": {
120
- "description": "Override database name (host/user/password come from MJ config).",
121
- "name": "database",
122
- "hasDynamicHelp": false,
123
- "multiple": false,
124
- "type": "option"
125
- },
126
- "out": {
127
- "description": "Output directory. Filename is auto-generated.",
128
- "name": "out",
129
- "default": ".",
130
- "hasDynamicHelp": false,
131
- "multiple": false,
132
- "type": "option"
133
- },
134
- "exclude-data": {
135
- "description": "Comma-separated list of tables (schema-qualified or not) to skip data dump for.",
136
- "name": "exclude-data",
137
- "default": "",
138
- "hasDynamicHelp": false,
139
- "multiple": false,
140
- "type": "option"
141
- },
142
- "batch-size": {
143
- "description": "Rows per INSERT batch.",
144
- "name": "batch-size",
145
- "default": 1000,
146
- "hasDynamicHelp": false,
147
- "multiple": false,
148
- "type": "option"
149
- },
150
- "no-data": {
151
- "description": "Emit schema only, no data inserts.",
152
- "name": "no-data",
153
- "allowNo": false,
154
- "type": "boolean"
155
- },
156
- "verbose": {
157
- "description": "Print per-object progress.",
158
- "name": "verbose",
159
- "allowNo": false,
160
- "type": "boolean"
161
- },
162
- "dry-run": {
163
- "description": "Print to stdout instead of writing a file.",
164
- "name": "dry-run",
165
- "allowNo": false,
166
- "type": "boolean"
51
+ "args": {
52
+ "name": {
53
+ "description": "Name of the installed app to disable",
54
+ "name": "name",
55
+ "required": true
167
56
  }
168
57
  },
58
+ "description": "Disable an installed MJ Open App without removing it",
59
+ "examples": [
60
+ "<%= config.bin %> app disable acme-crm"
61
+ ],
62
+ "flags": {},
169
63
  "hasDynamicHelp": false,
170
64
  "hiddenAliases": [],
171
- "id": "baseline:build",
65
+ "id": "app:disable",
172
66
  "pluginAlias": "@memberjunction/cli",
173
67
  "pluginName": "@memberjunction/cli",
174
68
  "pluginType": "core",
@@ -178,114 +72,57 @@
178
72
  "relativePath": [
179
73
  "dist",
180
74
  "commands",
181
- "baseline",
182
- "build.js"
75
+ "app",
76
+ "disable.js"
183
77
  ]
184
78
  },
185
- "baseline:compare": {
79
+ "app:enable": {
186
80
  "aliases": [],
187
- "args": {},
188
- "description": "Deterministically compare two databases object-by-object and row-by-row.",
81
+ "args": {
82
+ "name": {
83
+ "description": "Name of the installed app to enable",
84
+ "name": "name",
85
+ "required": true
86
+ }
87
+ },
88
+ "description": "Re-enable a disabled MJ Open App",
189
89
  "examples": [
190
- "<%= config.bin %> <%= command.id %> --left MJ_BL_Stack --right MJ_BL_New",
191
- "<%= config.bin %> <%= command.id %> --left A --right B --row-compare counts",
192
- "<%= config.bin %> <%= command.id %> --left A --right B --fail-on-diff --out ./diffs/"
90
+ "<%= config.bin %> app enable acme-crm"
193
91
  ],
194
- "flags": {
195
- "left": {
196
- "description": "Left database name (override).",
197
- "name": "left",
198
- "required": true,
199
- "hasDynamicHelp": false,
200
- "multiple": false,
201
- "type": "option"
202
- },
203
- "right": {
204
- "description": "Right database name (override).",
205
- "name": "right",
206
- "required": true,
207
- "hasDynamicHelp": false,
208
- "multiple": false,
209
- "type": "option"
210
- },
211
- "dialect": {
212
- "description": "Dialect of both DBs (must match).",
213
- "name": "dialect",
214
- "default": "mssql",
215
- "hasDynamicHelp": false,
216
- "multiple": false,
217
- "options": [
218
- "mssql",
219
- "postgres"
220
- ],
221
- "type": "option"
222
- },
223
- "row-compare": {
224
- "description": "Row comparison mode.",
225
- "name": "row-compare",
226
- "default": "full",
227
- "hasDynamicHelp": false,
228
- "multiple": false,
229
- "options": [
230
- "full",
231
- "hash",
232
- "counts",
233
- "none"
234
- ],
235
- "type": "option"
236
- },
237
- "row-hash-algo": {
238
- "description": "Hash algorithm when --row-compare hash.",
239
- "name": "row-hash-algo",
240
- "default": "sha256",
241
- "hasDynamicHelp": false,
242
- "multiple": false,
243
- "options": [
244
- "sha256",
245
- "md5",
246
- "checksum_agg"
247
- ],
248
- "type": "option"
249
- },
250
- "ignore": {
251
- "description": "Regex of object names to skip.",
252
- "name": "ignore",
253
- "default": "^flyway_schema_history$",
254
- "hasDynamicHelp": false,
255
- "multiple": false,
256
- "type": "option"
257
- },
258
- "sample-limit": {
259
- "description": "Maximum row diffs to capture per table.",
260
- "name": "sample-limit",
261
- "default": 100,
262
- "hasDynamicHelp": false,
263
- "multiple": false,
264
- "type": "option"
265
- },
266
- "out": {
267
- "description": "Directory to write JSON + Markdown reports.",
268
- "name": "out",
269
- "hasDynamicHelp": false,
270
- "multiple": false,
271
- "type": "option"
272
- },
273
- "fail-on-diff": {
274
- "description": "Exit non-zero if any diff is found.",
275
- "name": "fail-on-diff",
276
- "allowNo": false,
277
- "type": "boolean"
278
- },
279
- "verbose": {
280
- "description": "Print per-phase progress.",
281
- "name": "verbose",
282
- "allowNo": false,
283
- "type": "boolean"
92
+ "flags": {},
93
+ "hasDynamicHelp": false,
94
+ "hiddenAliases": [],
95
+ "id": "app:enable",
96
+ "pluginAlias": "@memberjunction/cli",
97
+ "pluginName": "@memberjunction/cli",
98
+ "pluginType": "core",
99
+ "strict": true,
100
+ "enableJsonFlag": false,
101
+ "isESM": true,
102
+ "relativePath": [
103
+ "dist",
104
+ "commands",
105
+ "app",
106
+ "enable.js"
107
+ ]
108
+ },
109
+ "app:info": {
110
+ "aliases": [],
111
+ "args": {
112
+ "name": {
113
+ "description": "Name of the installed app",
114
+ "name": "name",
115
+ "required": true
284
116
  }
285
117
  },
118
+ "description": "Show detailed information about an installed MJ Open App",
119
+ "examples": [
120
+ "<%= config.bin %> app info acme-crm"
121
+ ],
122
+ "flags": {},
286
123
  "hasDynamicHelp": false,
287
124
  "hiddenAliases": [],
288
- "id": "baseline:compare",
125
+ "id": "app:info",
289
126
  "pluginAlias": "@memberjunction/cli",
290
127
  "pluginName": "@memberjunction/cli",
291
128
  "pluginType": "core",
@@ -295,119 +132,50 @@
295
132
  "relativePath": [
296
133
  "dist",
297
134
  "commands",
298
- "baseline",
299
- "compare.js"
135
+ "app",
136
+ "info.js"
300
137
  ]
301
138
  },
302
- "baseline:roundtrip": {
139
+ "app:install": {
303
140
  "aliases": [],
304
- "args": {},
305
- "description": "Build a baseline from a V-stack database, apply it to a fresh DB, and prove byte-equivalence.",
141
+ "args": {
142
+ "source": {
143
+ "description": "GitHub repository URL of the Open App",
144
+ "name": "source",
145
+ "required": true
146
+ }
147
+ },
148
+ "description": "Install an MJ Open App from a GitHub repository",
306
149
  "examples": [
307
- "<%= config.bin %> <%= command.id %> --source MJ_BL_Stack --target MJ_BL_New # auto: within-major",
308
- "<%= config.bin %> <%= command.id %> --baseline-version 6.0 --source MJ_BL_Stack --target MJ_BL_New # explicit major-boundary",
309
- "<%= config.bin %> <%= command.id %> --source-dir ./migrations/v5 --source MJ_BL_Stack --target MJ_BL_New"
150
+ "<%= config.bin %> app install https://github.com/acme/mj-crm",
151
+ "<%= config.bin %> app install https://github.com/acme/mj-crm --version 1.2.0",
152
+ "<%= config.bin %> app install https://github.com/acme/mj-crm --verbose"
310
153
  ],
311
154
  "flags": {
312
- "baseline-version": {
313
- "description": "Major.Minor version stamp. Omit to auto-detect from --source-dir (within-major rebaseline).",
314
- "name": "baseline-version",
315
- "hasDynamicHelp": false,
316
- "multiple": false,
317
- "type": "option"
318
- },
319
- "source-dir": {
320
- "description": "Migrations source directory used to auto-detect baseline version + timestamp when --baseline-version is omitted. Defaults to the highest migrations/v*/ near cwd.",
321
- "name": "source-dir",
322
- "hasDynamicHelp": false,
323
- "multiple": false,
324
- "type": "option"
325
- },
326
- "description": {
327
- "description": "Header description.",
328
- "name": "description",
329
- "default": "MemberJunction Baseline",
330
- "hasDynamicHelp": false,
331
- "multiple": false,
332
- "type": "option"
333
- },
334
- "dialect": {
335
- "description": "Dialect to test. PG path runs the converter via /pg-migrate first.",
336
- "name": "dialect",
337
- "default": "mssql",
338
- "hasDynamicHelp": false,
339
- "multiple": false,
340
- "options": [
341
- "mssql",
342
- "postgres"
343
- ],
344
- "type": "option"
345
- },
346
- "source": {
347
- "description": "Database name with the V-stack already applied (used as comparison gold standard).",
348
- "name": "source",
349
- "required": true,
350
- "hasDynamicHelp": false,
351
- "multiple": false,
352
- "type": "option"
353
- },
354
- "target": {
355
- "description": "Empty database name to apply the new baseline to.",
356
- "name": "target",
357
- "required": true,
358
- "hasDynamicHelp": false,
359
- "multiple": false,
360
- "type": "option"
361
- },
362
- "out": {
363
- "description": "Output directory for baseline file + reports.",
364
- "name": "out",
365
- "default": ".",
366
- "hasDynamicHelp": false,
367
- "multiple": false,
368
- "type": "option"
369
- },
370
- "apply-cmd": {
371
- "description": "Command template to apply the baseline. Tokens: {file} {database}. Defaults to sqlcmd.",
372
- "name": "apply-cmd",
373
- "hasDynamicHelp": false,
374
- "multiple": false,
375
- "type": "option"
376
- },
377
- "row-compare": {
378
- "description": "Row compare mode passed to the comparator.",
379
- "name": "row-compare",
380
- "default": "full",
155
+ "version": {
156
+ "description": "Specific version to install (default: latest)",
157
+ "name": "version",
381
158
  "hasDynamicHelp": false,
382
159
  "multiple": false,
383
- "options": [
384
- "full",
385
- "hash",
386
- "counts",
387
- "none"
388
- ],
389
160
  "type": "option"
390
161
  },
391
- "fail-on-diff": {
392
- "name": "fail-on-diff",
393
- "allowNo": false,
394
- "type": "boolean"
395
- },
396
- "keep-target": {
397
- "description": "Do not drop the target database after run (useful for debugging diffs).",
398
- "name": "keep-target",
162
+ "verbose": {
163
+ "char": "v",
164
+ "description": "Show detailed output",
165
+ "name": "verbose",
399
166
  "allowNo": false,
400
167
  "type": "boolean"
401
168
  },
402
- "verbose": {
403
- "name": "verbose",
169
+ "dangerously-ignore-dbl-underscore-schema-rule": {
170
+ "hidden": true,
171
+ "name": "dangerously-ignore-dbl-underscore-schema-rule",
404
172
  "allowNo": false,
405
173
  "type": "boolean"
406
174
  }
407
175
  },
408
176
  "hasDynamicHelp": false,
409
177
  "hiddenAliases": [],
410
- "id": "baseline:roundtrip",
178
+ "id": "app:install",
411
179
  "pluginAlias": "@memberjunction/cli",
412
180
  "pluginName": "@memberjunction/cli",
413
181
  "pluginType": "core",
@@ -417,21 +185,29 @@
417
185
  "relativePath": [
418
186
  "dist",
419
187
  "commands",
420
- "baseline",
421
- "roundtrip.js"
188
+ "app",
189
+ "install.js"
422
190
  ]
423
191
  },
424
- "app:check-updates": {
192
+ "app:list": {
425
193
  "aliases": [],
426
194
  "args": {},
427
- "description": "Check for available upgrades for installed MJ Open Apps",
195
+ "description": "List all installed MJ Open Apps",
428
196
  "examples": [
429
- "<%= config.bin %> app check-updates"
197
+ "<%= config.bin %> app list"
430
198
  ],
431
- "flags": {},
199
+ "flags": {
200
+ "verbose": {
201
+ "char": "v",
202
+ "description": "Show detailed output",
203
+ "name": "verbose",
204
+ "allowNo": false,
205
+ "type": "boolean"
206
+ }
207
+ },
432
208
  "hasDynamicHelp": false,
433
209
  "hiddenAliases": [],
434
- "id": "app:check-updates",
210
+ "id": "app:list",
435
211
  "pluginAlias": "@memberjunction/cli",
436
212
  "pluginName": "@memberjunction/cli",
437
213
  "pluginType": "core",
@@ -442,26 +218,61 @@
442
218
  "dist",
443
219
  "commands",
444
220
  "app",
445
- "check-updates.js"
221
+ "list.js"
446
222
  ]
447
223
  },
448
- "app:disable": {
224
+ "app:remove": {
449
225
  "aliases": [],
450
226
  "args": {
451
227
  "name": {
452
- "description": "Name of the installed app to disable",
228
+ "description": "Name of the installed app to remove",
453
229
  "name": "name",
454
230
  "required": true
455
231
  }
456
232
  },
457
- "description": "Disable an installed MJ Open App without removing it",
233
+ "description": "Remove an installed MJ Open App",
458
234
  "examples": [
459
- "<%= config.bin %> app disable acme-crm"
235
+ "<%= config.bin %> app remove acme-crm",
236
+ "<%= config.bin %> app remove acme-crm --keep-data",
237
+ "<%= config.bin %> app remove acme-crm --force"
460
238
  ],
461
- "flags": {},
239
+ "flags": {
240
+ "keep-data": {
241
+ "description": "Keep the database schema and data",
242
+ "name": "keep-data",
243
+ "allowNo": false,
244
+ "type": "boolean"
245
+ },
246
+ "force": {
247
+ "description": "Force removal even if other apps depend on this one",
248
+ "name": "force",
249
+ "allowNo": false,
250
+ "type": "boolean"
251
+ },
252
+ "yes": {
253
+ "char": "y",
254
+ "description": "Skip confirmation prompt",
255
+ "name": "yes",
256
+ "allowNo": false,
257
+ "type": "boolean"
258
+ },
259
+ "verbose": {
260
+ "char": "v",
261
+ "description": "Show detailed output",
262
+ "name": "verbose",
263
+ "allowNo": false,
264
+ "type": "boolean"
265
+ },
266
+ "dangerously-ignore-dbl-underscore-schema-rule": {
267
+ "hidden": true,
268
+ "name": "dangerously-ignore-dbl-underscore-schema-rule",
269
+ "allowNo": false,
270
+ "type": "boolean"
271
+ }
272
+ },
462
273
  "hasDynamicHelp": false,
463
274
  "hiddenAliases": [],
464
- "id": "app:disable",
275
+ "id": "app:remove",
465
276
  "pluginAlias": "@memberjunction/cli",
466
277
  "pluginName": "@memberjunction/cli",
467
278
  "pluginType": "core",
@@ -472,26 +283,48 @@
472
283
  "dist",
473
284
  "commands",
474
285
  "app",
475
- "disable.js"
286
+ "remove.js"
476
287
  ]
477
288
  },
478
- "app:enable": {
289
+ "app:upgrade": {
479
290
  "aliases": [],
480
291
  "args": {
481
292
  "name": {
482
- "description": "Name of the installed app to enable",
293
+ "description": "Name of the installed app to upgrade",
483
294
  "name": "name",
484
295
  "required": true
485
296
  }
486
297
  },
487
- "description": "Re-enable a disabled MJ Open App",
298
+ "description": "Upgrade an installed MJ Open App to a newer version",
488
299
  "examples": [
489
- "<%= config.bin %> app enable acme-crm"
300
+ "<%= config.bin %> app upgrade acme-crm",
301
+ "<%= config.bin %> app upgrade acme-crm --version 1.3.0"
490
302
  ],
491
- "flags": {},
303
+ "flags": {
304
+ "version": {
305
+ "description": "Specific version to upgrade to (default: latest)",
306
+ "name": "version",
307
+ "hasDynamicHelp": false,
308
+ "multiple": false,
309
+ "type": "option"
310
+ },
311
+ "verbose": {
312
+ "char": "v",
313
+ "description": "Show detailed output",
314
+ "name": "verbose",
315
+ "allowNo": false,
316
+ "type": "boolean"
317
+ },
318
+ "dangerously-ignore-dbl-underscore-schema-rule": {
319
+ "hidden": true,
320
+ "name": "dangerously-ignore-dbl-underscore-schema-rule",
321
+ "allowNo": false,
322
+ "type": "boolean"
323
+ }
324
+ },
492
325
  "hasDynamicHelp": false,
493
326
  "hiddenAliases": [],
494
- "id": "app:enable",
327
+ "id": "app:upgrade",
495
328
  "pluginAlias": "@memberjunction/cli",
496
329
  "pluginName": "@memberjunction/cli",
497
330
  "pluginType": "core",
@@ -502,26 +335,95 @@
502
335
  "dist",
503
336
  "commands",
504
337
  "app",
505
- "enable.js"
338
+ "upgrade.js"
506
339
  ]
507
340
  },
508
- "app:info": {
341
+ "baseline:build": {
509
342
  "aliases": [],
510
- "args": {
511
- "name": {
512
- "description": "Name of the installed app",
513
- "name": "name",
514
- "required": true
515
- }
516
- },
517
- "description": "Show detailed information about an installed MJ Open App",
343
+ "args": {},
344
+ "description": "Generate a deterministic baseline SQL script from the END-STATE of a migrated MSSQL database.",
518
345
  "examples": [
519
- "<%= config.bin %> app info acme-crm"
346
+ "<%= config.bin %> <%= command.id %> --out ./migrations/v5/ # auto: within-major rebaseline",
347
+ "<%= config.bin %> <%= command.id %> --source-dir ./migrations/v5 --out ./migrations/v5/",
348
+ "<%= config.bin %> <%= command.id %> --baseline-version 6.0 --out ./migrations/v6/ # explicit major-boundary",
349
+ "<%= config.bin %> <%= command.id %> --baseline-version 5.32 --database MJ_BL_Stack --out /tmp/baseline/"
520
350
  ],
521
- "flags": {},
351
+ "flags": {
352
+ "baseline-version": {
353
+ "description": "Baseline version stamp in Major.Minor format (literal x is appended for patch, matching the V-file convention). Omit to auto-detect from --source-dir (within-major rebaseline mode).",
354
+ "name": "baseline-version",
355
+ "hasDynamicHelp": false,
356
+ "multiple": false,
357
+ "type": "option"
358
+ },
359
+ "source-dir": {
360
+ "description": "Migrations source directory (e.g. ./migrations/v5). Used to auto-detect the next baseline version + timestamp when --baseline-version is omitted. Defaults to the highest migrations/v*/ directory walked up from cwd.",
361
+ "name": "source-dir",
362
+ "hasDynamicHelp": false,
363
+ "multiple": false,
364
+ "type": "option"
365
+ },
366
+ "description": {
367
+ "description": "Human-readable description embedded in the file header.",
368
+ "name": "description",
369
+ "default": "MemberJunction Baseline",
370
+ "hasDynamicHelp": false,
371
+ "multiple": false,
372
+ "type": "option"
373
+ },
374
+ "database": {
375
+ "description": "Override database name (host/user/password come from MJ config).",
376
+ "name": "database",
377
+ "hasDynamicHelp": false,
378
+ "multiple": false,
379
+ "type": "option"
380
+ },
381
+ "out": {
382
+ "description": "Output directory. Filename is auto-generated.",
383
+ "name": "out",
384
+ "default": ".",
385
+ "hasDynamicHelp": false,
386
+ "multiple": false,
387
+ "type": "option"
388
+ },
389
+ "exclude-data": {
390
+ "description": "Comma-separated list of tables (schema-qualified or not) to skip data dump for.",
391
+ "name": "exclude-data",
392
+ "default": "",
393
+ "hasDynamicHelp": false,
394
+ "multiple": false,
395
+ "type": "option"
396
+ },
397
+ "batch-size": {
398
+ "description": "Rows per INSERT batch.",
399
+ "name": "batch-size",
400
+ "default": 1000,
401
+ "hasDynamicHelp": false,
402
+ "multiple": false,
403
+ "type": "option"
404
+ },
405
+ "no-data": {
406
+ "description": "Emit schema only, no data inserts.",
407
+ "name": "no-data",
408
+ "allowNo": false,
409
+ "type": "boolean"
410
+ },
411
+ "verbose": {
412
+ "description": "Print per-object progress.",
413
+ "name": "verbose",
414
+ "allowNo": false,
415
+ "type": "boolean"
416
+ },
417
+ "dry-run": {
418
+ "description": "Print to stdout instead of writing a file.",
419
+ "name": "dry-run",
420
+ "allowNo": false,
421
+ "type": "boolean"
422
+ }
423
+ },
522
424
  "hasDynamicHelp": false,
523
425
  "hiddenAliases": [],
524
- "id": "app:info",
426
+ "id": "baseline:build",
525
427
  "pluginAlias": "@memberjunction/cli",
526
428
  "pluginName": "@memberjunction/cli",
527
429
  "pluginType": "core",
@@ -531,74 +433,106 @@
531
433
  "relativePath": [
532
434
  "dist",
533
435
  "commands",
534
- "app",
535
- "info.js"
436
+ "baseline",
437
+ "build.js"
536
438
  ]
537
439
  },
538
- "app:install": {
440
+ "baseline:compare": {
539
441
  "aliases": [],
540
- "args": {
541
- "source": {
542
- "description": "GitHub repository URL of the Open App",
543
- "name": "source",
544
- "required": true
545
- }
546
- },
547
- "description": "Install an MJ Open App from a GitHub repository",
442
+ "args": {},
443
+ "description": "Deterministically compare two databases object-by-object and row-by-row.",
548
444
  "examples": [
549
- "<%= config.bin %> app install https://github.com/acme/mj-crm",
550
- "<%= config.bin %> app install https://github.com/acme/mj-crm --version 1.2.0",
551
- "<%= config.bin %> app install https://github.com/acme/mj-crm --verbose"
445
+ "<%= config.bin %> <%= command.id %> --left MJ_BL_Stack --right MJ_BL_New",
446
+ "<%= config.bin %> <%= command.id %> --left A --right B --row-compare counts",
447
+ "<%= config.bin %> <%= command.id %> --left A --right B --fail-on-diff --out ./diffs/"
552
448
  ],
553
449
  "flags": {
554
- "version": {
555
- "description": "Specific version to install (default: latest)",
556
- "name": "version",
450
+ "left": {
451
+ "description": "Left database name (override).",
452
+ "name": "left",
453
+ "required": true,
454
+ "hasDynamicHelp": false,
455
+ "multiple": false,
456
+ "type": "option"
457
+ },
458
+ "right": {
459
+ "description": "Right database name (override).",
460
+ "name": "right",
461
+ "required": true,
462
+ "hasDynamicHelp": false,
463
+ "multiple": false,
464
+ "type": "option"
465
+ },
466
+ "dialect": {
467
+ "description": "Dialect of both DBs (must match).",
468
+ "name": "dialect",
469
+ "default": "mssql",
470
+ "hasDynamicHelp": false,
471
+ "multiple": false,
472
+ "options": [
473
+ "mssql",
474
+ "postgres"
475
+ ],
476
+ "type": "option"
477
+ },
478
+ "row-compare": {
479
+ "description": "Row comparison mode.",
480
+ "name": "row-compare",
481
+ "default": "full",
482
+ "hasDynamicHelp": false,
483
+ "multiple": false,
484
+ "options": [
485
+ "full",
486
+ "hash",
487
+ "counts",
488
+ "none"
489
+ ],
490
+ "type": "option"
491
+ },
492
+ "row-hash-algo": {
493
+ "description": "Hash algorithm when --row-compare hash.",
494
+ "name": "row-hash-algo",
495
+ "default": "sha256",
496
+ "hasDynamicHelp": false,
497
+ "multiple": false,
498
+ "options": [
499
+ "sha256",
500
+ "md5",
501
+ "checksum_agg"
502
+ ],
503
+ "type": "option"
504
+ },
505
+ "ignore": {
506
+ "description": "Regex of object names to skip.",
507
+ "name": "ignore",
508
+ "default": "^flyway_schema_history$",
557
509
  "hasDynamicHelp": false,
558
510
  "multiple": false,
559
511
  "type": "option"
560
512
  },
561
- "verbose": {
562
- "char": "v",
563
- "description": "Show detailed output",
564
- "name": "verbose",
565
- "allowNo": false,
566
- "type": "boolean"
513
+ "sample-limit": {
514
+ "description": "Maximum row diffs to capture per table.",
515
+ "name": "sample-limit",
516
+ "default": 100,
517
+ "hasDynamicHelp": false,
518
+ "multiple": false,
519
+ "type": "option"
567
520
  },
568
- "dangerously-ignore-dbl-underscore-schema-rule": {
569
- "hidden": true,
570
- "name": "dangerously-ignore-dbl-underscore-schema-rule",
521
+ "out": {
522
+ "description": "Directory to write JSON + Markdown reports.",
523
+ "name": "out",
524
+ "hasDynamicHelp": false,
525
+ "multiple": false,
526
+ "type": "option"
527
+ },
528
+ "fail-on-diff": {
529
+ "description": "Exit non-zero if any diff is found.",
530
+ "name": "fail-on-diff",
571
531
  "allowNo": false,
572
532
  "type": "boolean"
573
- }
574
- },
575
- "hasDynamicHelp": false,
576
- "hiddenAliases": [],
577
- "id": "app:install",
578
- "pluginAlias": "@memberjunction/cli",
579
- "pluginName": "@memberjunction/cli",
580
- "pluginType": "core",
581
- "strict": true,
582
- "enableJsonFlag": false,
583
- "isESM": true,
584
- "relativePath": [
585
- "dist",
586
- "commands",
587
- "app",
588
- "install.js"
589
- ]
590
- },
591
- "app:list": {
592
- "aliases": [],
593
- "args": {},
594
- "description": "List all installed MJ Open Apps",
595
- "examples": [
596
- "<%= config.bin %> app list"
597
- ],
598
- "flags": {
533
+ },
599
534
  "verbose": {
600
- "char": "v",
601
- "description": "Show detailed output",
535
+ "description": "Print per-phase progress.",
602
536
  "name": "verbose",
603
537
  "allowNo": false,
604
538
  "type": "boolean"
@@ -606,7 +540,7 @@
606
540
  },
607
541
  "hasDynamicHelp": false,
608
542
  "hiddenAliases": [],
609
- "id": "app:list",
543
+ "id": "baseline:compare",
610
544
  "pluginAlias": "@memberjunction/cli",
611
545
  "pluginName": "@memberjunction/cli",
612
546
  "pluginType": "core",
@@ -616,62 +550,119 @@
616
550
  "relativePath": [
617
551
  "dist",
618
552
  "commands",
619
- "app",
620
- "list.js"
553
+ "baseline",
554
+ "compare.js"
621
555
  ]
622
556
  },
623
- "app:remove": {
557
+ "baseline:roundtrip": {
624
558
  "aliases": [],
625
- "args": {
626
- "name": {
627
- "description": "Name of the installed app to remove",
628
- "name": "name",
629
- "required": true
630
- }
631
- },
632
- "description": "Remove an installed MJ Open App",
559
+ "args": {},
560
+ "description": "Build a baseline from a V-stack database, apply it to a fresh DB, and prove byte-equivalence.",
633
561
  "examples": [
634
- "<%= config.bin %> app remove acme-crm",
635
- "<%= config.bin %> app remove acme-crm --keep-data",
636
- "<%= config.bin %> app remove acme-crm --force"
562
+ "<%= config.bin %> <%= command.id %> --source MJ_BL_Stack --target MJ_BL_New # auto: within-major",
563
+ "<%= config.bin %> <%= command.id %> --baseline-version 6.0 --source MJ_BL_Stack --target MJ_BL_New # explicit major-boundary",
564
+ "<%= config.bin %> <%= command.id %> --source-dir ./migrations/v5 --source MJ_BL_Stack --target MJ_BL_New"
637
565
  ],
638
566
  "flags": {
639
- "keep-data": {
640
- "description": "Keep the database schema and data",
641
- "name": "keep-data",
642
- "allowNo": false,
643
- "type": "boolean"
567
+ "baseline-version": {
568
+ "description": "Major.Minor version stamp. Omit to auto-detect from --source-dir (within-major rebaseline).",
569
+ "name": "baseline-version",
570
+ "hasDynamicHelp": false,
571
+ "multiple": false,
572
+ "type": "option"
644
573
  },
645
- "force": {
646
- "description": "Force removal even if other apps depend on this one",
647
- "name": "force",
574
+ "source-dir": {
575
+ "description": "Migrations source directory used to auto-detect baseline version + timestamp when --baseline-version is omitted. Defaults to the highest migrations/v*/ near cwd.",
576
+ "name": "source-dir",
577
+ "hasDynamicHelp": false,
578
+ "multiple": false,
579
+ "type": "option"
580
+ },
581
+ "description": {
582
+ "description": "Header description.",
583
+ "name": "description",
584
+ "default": "MemberJunction Baseline",
585
+ "hasDynamicHelp": false,
586
+ "multiple": false,
587
+ "type": "option"
588
+ },
589
+ "dialect": {
590
+ "description": "Dialect to test. PG path runs the converter via /pg-migrate first.",
591
+ "name": "dialect",
592
+ "default": "mssql",
593
+ "hasDynamicHelp": false,
594
+ "multiple": false,
595
+ "options": [
596
+ "mssql",
597
+ "postgres"
598
+ ],
599
+ "type": "option"
600
+ },
601
+ "source": {
602
+ "description": "Database name with the V-stack already applied (used as comparison gold standard).",
603
+ "name": "source",
604
+ "required": true,
605
+ "hasDynamicHelp": false,
606
+ "multiple": false,
607
+ "type": "option"
608
+ },
609
+ "target": {
610
+ "description": "Empty database name to apply the new baseline to.",
611
+ "name": "target",
612
+ "required": true,
613
+ "hasDynamicHelp": false,
614
+ "multiple": false,
615
+ "type": "option"
616
+ },
617
+ "out": {
618
+ "description": "Output directory for baseline file + reports.",
619
+ "name": "out",
620
+ "default": ".",
621
+ "hasDynamicHelp": false,
622
+ "multiple": false,
623
+ "type": "option"
624
+ },
625
+ "apply-cmd": {
626
+ "description": "Command template to apply the baseline. Tokens: {file} {database}. Defaults to sqlcmd.",
627
+ "name": "apply-cmd",
628
+ "hasDynamicHelp": false,
629
+ "multiple": false,
630
+ "type": "option"
631
+ },
632
+ "row-compare": {
633
+ "description": "Row compare mode passed to the comparator.",
634
+ "name": "row-compare",
635
+ "default": "full",
636
+ "hasDynamicHelp": false,
637
+ "multiple": false,
638
+ "options": [
639
+ "full",
640
+ "hash",
641
+ "counts",
642
+ "none"
643
+ ],
644
+ "type": "option"
645
+ },
646
+ "fail-on-diff": {
647
+ "name": "fail-on-diff",
648
648
  "allowNo": false,
649
649
  "type": "boolean"
650
650
  },
651
- "yes": {
652
- "char": "y",
653
- "description": "Skip confirmation prompt",
654
- "name": "yes",
651
+ "keep-target": {
652
+ "description": "Do not drop the target database after run (useful for debugging diffs).",
653
+ "name": "keep-target",
655
654
  "allowNo": false,
656
655
  "type": "boolean"
657
656
  },
658
657
  "verbose": {
659
- "char": "v",
660
- "description": "Show detailed output",
661
658
  "name": "verbose",
662
659
  "allowNo": false,
663
660
  "type": "boolean"
664
- },
665
- "dangerously-ignore-dbl-underscore-schema-rule": {
666
- "hidden": true,
667
- "name": "dangerously-ignore-dbl-underscore-schema-rule",
668
- "allowNo": false,
669
- "type": "boolean"
670
661
  }
671
662
  },
672
663
  "hasDynamicHelp": false,
673
664
  "hiddenAliases": [],
674
- "id": "app:remove",
665
+ "id": "baseline:roundtrip",
675
666
  "pluginAlias": "@memberjunction/cli",
676
667
  "pluginName": "@memberjunction/cli",
677
668
  "pluginType": "core",
@@ -681,49 +672,58 @@
681
672
  "relativePath": [
682
673
  "dist",
683
674
  "commands",
684
- "app",
685
- "remove.js"
675
+ "baseline",
676
+ "roundtrip.js"
686
677
  ]
687
678
  },
688
- "app:upgrade": {
679
+ "artifacts:reclassify": {
689
680
  "aliases": [],
690
- "args": {
691
- "name": {
692
- "description": "Name of the installed app to upgrade",
693
- "name": "name",
694
- "required": true
695
- }
696
- },
697
- "description": "Upgrade an installed MJ Open App to a newer version",
681
+ "args": {},
682
+ "description": "Upgrade-recovery utility for v5.35 artifact unification. Re-evaluates rows whose TypeID is the deleted JSON fallback but whose actual content does not parse as JSON. Normally a no-op: the v5.35 backfill migration handles this automatically. This command is only relevant when the migration ran BEFORE the artifact-type metadata (Generic Text / Generic Binary) was pushed via `mj sync push`, in which case the migration prints a notice telling you to run this. Reports \"no candidates\" once everything is reconciled. Dry-run by default; --apply writes through Record Changes.",
698
683
  "examples": [
699
- "<%= config.bin %> app upgrade acme-crm",
700
- "<%= config.bin %> app upgrade acme-crm --version 1.3.0"
684
+ "<%= config.bin %> <%= command.id %>",
685
+ "<%= config.bin %> <%= command.id %> --apply --limit 50"
701
686
  ],
702
687
  "flags": {
703
- "version": {
704
- "description": "Specific version to upgrade to (default: latest)",
705
- "name": "version",
688
+ "conversation-id": {
689
+ "description": "Scope to artifacts attached to the given conversation.",
690
+ "name": "conversation-id",
706
691
  "hasDynamicHelp": false,
707
692
  "multiple": false,
708
693
  "type": "option"
709
694
  },
710
- "verbose": {
711
- "char": "v",
712
- "description": "Show detailed output",
713
- "name": "verbose",
695
+ "since": {
696
+ "description": "Scope to artifacts created on/after this ISO date.",
697
+ "name": "since",
698
+ "hasDynamicHelp": false,
699
+ "multiple": false,
700
+ "type": "option"
701
+ },
702
+ "limit": {
703
+ "description": "Maximum number of rows to inspect.",
704
+ "name": "limit",
705
+ "default": 100,
706
+ "hasDynamicHelp": false,
707
+ "multiple": false,
708
+ "type": "option"
709
+ },
710
+ "apply": {
711
+ "description": "Write changes. Without this flag, this command only reports what it would do.",
712
+ "name": "apply",
714
713
  "allowNo": false,
715
714
  "type": "boolean"
716
715
  },
717
- "dangerously-ignore-dbl-underscore-schema-rule": {
718
- "hidden": true,
719
- "name": "dangerously-ignore-dbl-underscore-schema-rule",
716
+ "verbose": {
717
+ "char": "v",
718
+ "description": "Print every candidate row, not just the summary.",
719
+ "name": "verbose",
720
720
  "allowNo": false,
721
721
  "type": "boolean"
722
722
  }
723
723
  },
724
724
  "hasDynamicHelp": false,
725
725
  "hiddenAliases": [],
726
- "id": "app:upgrade",
726
+ "id": "artifacts:reclassify",
727
727
  "pluginAlias": "@memberjunction/cli",
728
728
  "pluginName": "@memberjunction/cli",
729
729
  "pluginType": "core",
@@ -733,8 +733,8 @@
733
733
  "relativePath": [
734
734
  "dist",
735
735
  "commands",
736
- "app",
737
- "upgrade.js"
736
+ "artifacts",
737
+ "reclassify.js"
738
738
  ]
739
739
  },
740
740
  "bump": {
@@ -2818,6 +2818,12 @@
2818
2818
  "name": "incremental",
2819
2819
  "allowNo": false,
2820
2820
  "type": "boolean"
2821
+ },
2822
+ "change-detail": {
2823
+ "description": "Write a detailed per-record change report (primary keys + field diffs) to a file",
2824
+ "name": "change-detail",
2825
+ "allowNo": false,
2826
+ "type": "boolean"
2821
2827
  }
2822
2828
  },
2823
2829
  "hasDynamicHelp": false,
@@ -4760,5 +4766,5 @@
4760
4766
  ]
4761
4767
  }
4762
4768
  },
4763
- "version": "5.40.2"
4769
+ "version": "5.41.0"
4764
4770
  }