@memberjunction/cli 5.40.0 → 5.40.2

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,47 +22,54 @@
22
22
  "index.js"
23
23
  ]
24
24
  },
25
- "app:check-updates": {
25
+ "artifacts:reclassify": {
26
26
  "aliases": [],
27
27
  "args": {},
28
- "description": "Check for available upgrades for installed MJ Open Apps",
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.",
29
29
  "examples": [
30
- "<%= config.bin %> app check-updates"
30
+ "<%= config.bin %> <%= command.id %>",
31
+ "<%= config.bin %> <%= command.id %> --apply --limit 50"
31
32
  ],
32
- "flags": {},
33
- "hasDynamicHelp": false,
34
- "hiddenAliases": [],
35
- "id": "app:check-updates",
36
- "pluginAlias": "@memberjunction/cli",
37
- "pluginName": "@memberjunction/cli",
38
- "pluginType": "core",
39
- "strict": true,
40
- "enableJsonFlag": false,
41
- "isESM": true,
42
- "relativePath": [
43
- "dist",
44
- "commands",
45
- "app",
46
- "check-updates.js"
47
- ]
48
- },
49
- "app:disable": {
50
- "aliases": [],
51
- "args": {
52
- "name": {
53
- "description": "Name of the installed app to disable",
54
- "name": "name",
55
- "required": true
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"
56
68
  }
57
69
  },
58
- "description": "Disable an installed MJ Open App without removing it",
59
- "examples": [
60
- "<%= config.bin %> app disable acme-crm"
61
- ],
62
- "flags": {},
63
70
  "hasDynamicHelp": false,
64
71
  "hiddenAliases": [],
65
- "id": "app:disable",
72
+ "id": "artifacts:reclassify",
66
73
  "pluginAlias": "@memberjunction/cli",
67
74
  "pluginName": "@memberjunction/cli",
68
75
  "pluginType": "core",
@@ -72,57 +79,96 @@
72
79
  "relativePath": [
73
80
  "dist",
74
81
  "commands",
75
- "app",
76
- "disable.js"
82
+ "artifacts",
83
+ "reclassify.js"
77
84
  ]
78
85
  },
79
- "app:enable": {
86
+ "baseline:build": {
80
87
  "aliases": [],
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",
88
+ "args": {},
89
+ "description": "Generate a deterministic baseline SQL script from the END-STATE of a migrated MSSQL database.",
89
90
  "examples": [
90
- "<%= config.bin %> app enable acme-crm"
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/"
91
95
  ],
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
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"
116
167
  }
117
168
  },
118
- "description": "Show detailed information about an installed MJ Open App",
119
- "examples": [
120
- "<%= config.bin %> app info acme-crm"
121
- ],
122
- "flags": {},
123
169
  "hasDynamicHelp": false,
124
170
  "hiddenAliases": [],
125
- "id": "app:info",
171
+ "id": "baseline:build",
126
172
  "pluginAlias": "@memberjunction/cli",
127
173
  "pluginName": "@memberjunction/cli",
128
174
  "pluginType": "core",
@@ -132,50 +178,114 @@
132
178
  "relativePath": [
133
179
  "dist",
134
180
  "commands",
135
- "app",
136
- "info.js"
181
+ "baseline",
182
+ "build.js"
137
183
  ]
138
184
  },
139
- "app:install": {
185
+ "baseline:compare": {
140
186
  "aliases": [],
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",
187
+ "args": {},
188
+ "description": "Deterministically compare two databases object-by-object and row-by-row.",
149
189
  "examples": [
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"
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/"
153
193
  ],
154
194
  "flags": {
155
- "version": {
156
- "description": "Specific version to install (default: latest)",
157
- "name": "version",
195
+ "left": {
196
+ "description": "Left database name (override).",
197
+ "name": "left",
198
+ "required": true,
158
199
  "hasDynamicHelp": false,
159
200
  "multiple": false,
160
201
  "type": "option"
161
202
  },
162
- "verbose": {
163
- "char": "v",
164
- "description": "Show detailed output",
165
- "name": "verbose",
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",
166
276
  "allowNo": false,
167
277
  "type": "boolean"
168
278
  },
169
- "dangerously-ignore-dbl-underscore-schema-rule": {
170
- "hidden": true,
171
- "name": "dangerously-ignore-dbl-underscore-schema-rule",
279
+ "verbose": {
280
+ "description": "Print per-phase progress.",
281
+ "name": "verbose",
172
282
  "allowNo": false,
173
283
  "type": "boolean"
174
284
  }
175
285
  },
176
286
  "hasDynamicHelp": false,
177
287
  "hiddenAliases": [],
178
- "id": "app:install",
288
+ "id": "baseline:compare",
179
289
  "pluginAlias": "@memberjunction/cli",
180
290
  "pluginName": "@memberjunction/cli",
181
291
  "pluginType": "core",
@@ -185,21 +295,111 @@
185
295
  "relativePath": [
186
296
  "dist",
187
297
  "commands",
188
- "app",
189
- "install.js"
298
+ "baseline",
299
+ "compare.js"
190
300
  ]
191
301
  },
192
- "app:list": {
302
+ "baseline:roundtrip": {
193
303
  "aliases": [],
194
304
  "args": {},
195
- "description": "List all installed MJ Open Apps",
305
+ "description": "Build a baseline from a V-stack database, apply it to a fresh DB, and prove byte-equivalence.",
196
306
  "examples": [
197
- "<%= config.bin %> app list"
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"
198
310
  ],
199
311
  "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",
381
+ "hasDynamicHelp": false,
382
+ "multiple": false,
383
+ "options": [
384
+ "full",
385
+ "hash",
386
+ "counts",
387
+ "none"
388
+ ],
389
+ "type": "option"
390
+ },
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",
399
+ "allowNo": false,
400
+ "type": "boolean"
401
+ },
200
402
  "verbose": {
201
- "char": "v",
202
- "description": "Show detailed output",
203
403
  "name": "verbose",
204
404
  "allowNo": false,
205
405
  "type": "boolean"
@@ -207,7 +407,7 @@
207
407
  },
208
408
  "hasDynamicHelp": false,
209
409
  "hiddenAliases": [],
210
- "id": "app:list",
410
+ "id": "baseline:roundtrip",
211
411
  "pluginAlias": "@memberjunction/cli",
212
412
  "pluginName": "@memberjunction/cli",
213
413
  "pluginType": "core",
@@ -217,62 +417,51 @@
217
417
  "relativePath": [
218
418
  "dist",
219
419
  "commands",
220
- "app",
221
- "list.js"
420
+ "baseline",
421
+ "roundtrip.js"
222
422
  ]
223
423
  },
224
- "app:remove": {
424
+ "app:check-updates": {
225
425
  "aliases": [],
226
- "args": {
227
- "name": {
228
- "description": "Name of the installed app to remove",
229
- "name": "name",
230
- "required": true
231
- }
232
- },
233
- "description": "Remove an installed MJ Open App",
426
+ "args": {},
427
+ "description": "Check for available upgrades for installed MJ Open Apps",
234
428
  "examples": [
235
- "<%= config.bin %> app remove acme-crm",
236
- "<%= config.bin %> app remove acme-crm --keep-data",
237
- "<%= config.bin %> app remove acme-crm --force"
429
+ "<%= config.bin %> app check-updates"
238
430
  ],
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"
431
+ "flags": {},
432
+ "hasDynamicHelp": false,
433
+ "hiddenAliases": [],
434
+ "id": "app:check-updates",
435
+ "pluginAlias": "@memberjunction/cli",
436
+ "pluginName": "@memberjunction/cli",
437
+ "pluginType": "core",
438
+ "strict": true,
439
+ "enableJsonFlag": false,
440
+ "isESM": true,
441
+ "relativePath": [
442
+ "dist",
443
+ "commands",
444
+ "app",
445
+ "check-updates.js"
446
+ ]
447
+ },
448
+ "app:disable": {
449
+ "aliases": [],
450
+ "args": {
451
+ "name": {
452
+ "description": "Name of the installed app to disable",
453
+ "name": "name",
454
+ "required": true
271
455
  }
272
456
  },
457
+ "description": "Disable an installed MJ Open App without removing it",
458
+ "examples": [
459
+ "<%= config.bin %> app disable acme-crm"
460
+ ],
461
+ "flags": {},
273
462
  "hasDynamicHelp": false,
274
463
  "hiddenAliases": [],
275
- "id": "app:remove",
464
+ "id": "app:disable",
276
465
  "pluginAlias": "@memberjunction/cli",
277
466
  "pluginName": "@memberjunction/cli",
278
467
  "pluginType": "core",
@@ -283,48 +472,26 @@
283
472
  "dist",
284
473
  "commands",
285
474
  "app",
286
- "remove.js"
475
+ "disable.js"
287
476
  ]
288
477
  },
289
- "app:upgrade": {
478
+ "app:enable": {
290
479
  "aliases": [],
291
480
  "args": {
292
481
  "name": {
293
- "description": "Name of the installed app to upgrade",
482
+ "description": "Name of the installed app to enable",
294
483
  "name": "name",
295
484
  "required": true
296
485
  }
297
486
  },
298
- "description": "Upgrade an installed MJ Open App to a newer version",
487
+ "description": "Re-enable a disabled MJ Open App",
299
488
  "examples": [
300
- "<%= config.bin %> app upgrade acme-crm",
301
- "<%= config.bin %> app upgrade acme-crm --version 1.3.0"
489
+ "<%= config.bin %> app enable acme-crm"
302
490
  ],
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
- },
491
+ "flags": {},
325
492
  "hasDynamicHelp": false,
326
493
  "hiddenAliases": [],
327
- "id": "app:upgrade",
494
+ "id": "app:enable",
328
495
  "pluginAlias": "@memberjunction/cli",
329
496
  "pluginName": "@memberjunction/cli",
330
497
  "pluginType": "core",
@@ -335,95 +502,26 @@
335
502
  "dist",
336
503
  "commands",
337
504
  "app",
338
- "upgrade.js"
505
+ "enable.js"
339
506
  ]
340
507
  },
341
- "baseline:build": {
508
+ "app:info": {
342
509
  "aliases": [],
343
- "args": {},
344
- "description": "Generate a deterministic baseline SQL script from the END-STATE of a migrated MSSQL database.",
345
- "examples": [
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/"
350
- ],
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"
510
+ "args": {
511
+ "name": {
512
+ "description": "Name of the installed app",
513
+ "name": "name",
514
+ "required": true
422
515
  }
423
516
  },
517
+ "description": "Show detailed information about an installed MJ Open App",
518
+ "examples": [
519
+ "<%= config.bin %> app info acme-crm"
520
+ ],
521
+ "flags": {},
424
522
  "hasDynamicHelp": false,
425
523
  "hiddenAliases": [],
426
- "id": "baseline:build",
524
+ "id": "app:info",
427
525
  "pluginAlias": "@memberjunction/cli",
428
526
  "pluginName": "@memberjunction/cli",
429
527
  "pluginType": "core",
@@ -433,114 +531,50 @@
433
531
  "relativePath": [
434
532
  "dist",
435
533
  "commands",
436
- "baseline",
437
- "build.js"
534
+ "app",
535
+ "info.js"
438
536
  ]
439
537
  },
440
- "baseline:compare": {
538
+ "app:install": {
441
539
  "aliases": [],
442
- "args": {},
443
- "description": "Deterministically compare two databases object-by-object and row-by-row.",
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",
444
548
  "examples": [
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/"
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"
448
552
  ],
449
553
  "flags": {
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$",
509
- "hasDynamicHelp": false,
510
- "multiple": false,
511
- "type": "option"
512
- },
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"
520
- },
521
- "out": {
522
- "description": "Directory to write JSON + Markdown reports.",
523
- "name": "out",
554
+ "version": {
555
+ "description": "Specific version to install (default: latest)",
556
+ "name": "version",
524
557
  "hasDynamicHelp": false,
525
558
  "multiple": false,
526
559
  "type": "option"
527
560
  },
528
- "fail-on-diff": {
529
- "description": "Exit non-zero if any diff is found.",
530
- "name": "fail-on-diff",
561
+ "verbose": {
562
+ "char": "v",
563
+ "description": "Show detailed output",
564
+ "name": "verbose",
531
565
  "allowNo": false,
532
566
  "type": "boolean"
533
567
  },
534
- "verbose": {
535
- "description": "Print per-phase progress.",
536
- "name": "verbose",
568
+ "dangerously-ignore-dbl-underscore-schema-rule": {
569
+ "hidden": true,
570
+ "name": "dangerously-ignore-dbl-underscore-schema-rule",
537
571
  "allowNo": false,
538
572
  "type": "boolean"
539
573
  }
540
574
  },
541
575
  "hasDynamicHelp": false,
542
576
  "hiddenAliases": [],
543
- "id": "baseline:compare",
577
+ "id": "app:install",
544
578
  "pluginAlias": "@memberjunction/cli",
545
579
  "pluginName": "@memberjunction/cli",
546
580
  "pluginType": "core",
@@ -550,111 +584,21 @@
550
584
  "relativePath": [
551
585
  "dist",
552
586
  "commands",
553
- "baseline",
554
- "compare.js"
587
+ "app",
588
+ "install.js"
555
589
  ]
556
590
  },
557
- "baseline:roundtrip": {
591
+ "app:list": {
558
592
  "aliases": [],
559
593
  "args": {},
560
- "description": "Build a baseline from a V-stack database, apply it to a fresh DB, and prove byte-equivalence.",
594
+ "description": "List all installed MJ Open Apps",
561
595
  "examples": [
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"
596
+ "<%= config.bin %> app list"
565
597
  ],
566
598
  "flags": {
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"
573
- },
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
- "allowNo": false,
649
- "type": "boolean"
650
- },
651
- "keep-target": {
652
- "description": "Do not drop the target database after run (useful for debugging diffs).",
653
- "name": "keep-target",
654
- "allowNo": false,
655
- "type": "boolean"
656
- },
657
599
  "verbose": {
600
+ "char": "v",
601
+ "description": "Show detailed output",
658
602
  "name": "verbose",
659
603
  "allowNo": false,
660
604
  "type": "boolean"
@@ -662,7 +606,7 @@
662
606
  },
663
607
  "hasDynamicHelp": false,
664
608
  "hiddenAliases": [],
665
- "id": "baseline:roundtrip",
609
+ "id": "app:list",
666
610
  "pluginAlias": "@memberjunction/cli",
667
611
  "pluginName": "@memberjunction/cli",
668
612
  "pluginType": "core",
@@ -672,69 +616,114 @@
672
616
  "relativePath": [
673
617
  "dist",
674
618
  "commands",
675
- "baseline",
676
- "roundtrip.js"
619
+ "app",
620
+ "list.js"
677
621
  ]
678
622
  },
679
- "bump": {
623
+ "app:remove": {
680
624
  "aliases": [],
681
- "args": {},
682
- "description": "Bumps MemberJunction dependency versions",
683
- "examples": [
684
- {
685
- "command": "<%= config.bin %> <%= command.id %>",
686
- "description": "Bump all @memberjunction/* dependencies in the current directory's package.json to the CLI version"
687
- },
688
- {
689
- "command": "<%= config.bin %> <%= command.id %> -rdv",
690
- "description": "Preview all recursive packages bumps without writing any changes."
691
- },
692
- {
693
- "command": "<%= config.bin %> <%= command.id %> -rqt v2.10.0 | xargs -n1 -I{} npm install --prefix {}",
694
- "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."
625
+ "args": {
626
+ "name": {
627
+ "description": "Name of the installed app to remove",
628
+ "name": "name",
629
+ "required": true
695
630
  }
631
+ },
632
+ "description": "Remove an installed MJ Open App",
633
+ "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"
696
637
  ],
697
638
  "flags": {
639
+ "keep-data": {
640
+ "description": "Keep the database schema and data",
641
+ "name": "keep-data",
642
+ "allowNo": false,
643
+ "type": "boolean"
644
+ },
645
+ "force": {
646
+ "description": "Force removal even if other apps depend on this one",
647
+ "name": "force",
648
+ "allowNo": false,
649
+ "type": "boolean"
650
+ },
651
+ "yes": {
652
+ "char": "y",
653
+ "description": "Skip confirmation prompt",
654
+ "name": "yes",
655
+ "allowNo": false,
656
+ "type": "boolean"
657
+ },
698
658
  "verbose": {
699
659
  "char": "v",
700
- "description": "Enable additional logging",
660
+ "description": "Show detailed output",
701
661
  "name": "verbose",
702
662
  "allowNo": false,
703
663
  "type": "boolean"
704
664
  },
705
- "recursive": {
706
- "char": "r",
707
- "description": "Bump version in current directory and all subdirectories",
708
- "name": "recursive",
665
+ "dangerously-ignore-dbl-underscore-schema-rule": {
666
+ "hidden": true,
667
+ "name": "dangerously-ignore-dbl-underscore-schema-rule",
709
668
  "allowNo": false,
710
669
  "type": "boolean"
711
- },
712
- "tag": {
713
- "char": "t",
714
- "description": "Version tag to bump target for bump (e.g. v2.10.0), defaults to the CLI version",
715
- "name": "tag",
670
+ }
671
+ },
672
+ "hasDynamicHelp": false,
673
+ "hiddenAliases": [],
674
+ "id": "app:remove",
675
+ "pluginAlias": "@memberjunction/cli",
676
+ "pluginName": "@memberjunction/cli",
677
+ "pluginType": "core",
678
+ "strict": true,
679
+ "enableJsonFlag": false,
680
+ "isESM": true,
681
+ "relativePath": [
682
+ "dist",
683
+ "commands",
684
+ "app",
685
+ "remove.js"
686
+ ]
687
+ },
688
+ "app:upgrade": {
689
+ "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",
698
+ "examples": [
699
+ "<%= config.bin %> app upgrade acme-crm",
700
+ "<%= config.bin %> app upgrade acme-crm --version 1.3.0"
701
+ ],
702
+ "flags": {
703
+ "version": {
704
+ "description": "Specific version to upgrade to (default: latest)",
705
+ "name": "version",
716
706
  "hasDynamicHelp": false,
717
707
  "multiple": false,
718
708
  "type": "option"
719
709
  },
720
- "quiet": {
721
- "char": "q",
722
- "description": "Only output paths for updated packages",
723
- "name": "quiet",
710
+ "verbose": {
711
+ "char": "v",
712
+ "description": "Show detailed output",
713
+ "name": "verbose",
724
714
  "allowNo": false,
725
715
  "type": "boolean"
726
716
  },
727
- "dry": {
728
- "char": "d",
729
- "description": "Dry run, do not write changes to package.json files",
730
- "name": "dry",
717
+ "dangerously-ignore-dbl-underscore-schema-rule": {
718
+ "hidden": true,
719
+ "name": "dangerously-ignore-dbl-underscore-schema-rule",
731
720
  "allowNo": false,
732
721
  "type": "boolean"
733
722
  }
734
723
  },
735
724
  "hasDynamicHelp": false,
736
725
  "hiddenAliases": [],
737
- "id": "bump",
726
+ "id": "app:upgrade",
738
727
  "pluginAlias": "@memberjunction/cli",
739
728
  "pluginName": "@memberjunction/cli",
740
729
  "pluginType": "core",
@@ -744,58 +733,69 @@
744
733
  "relativePath": [
745
734
  "dist",
746
735
  "commands",
747
- "bump",
748
- "index.js"
736
+ "app",
737
+ "upgrade.js"
749
738
  ]
750
739
  },
751
- "artifacts:reclassify": {
740
+ "bump": {
752
741
  "aliases": [],
753
742
  "args": {},
754
- "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.",
743
+ "description": "Bumps MemberJunction dependency versions",
755
744
  "examples": [
756
- "<%= config.bin %> <%= command.id %>",
757
- "<%= config.bin %> <%= command.id %> --apply --limit 50"
745
+ {
746
+ "command": "<%= config.bin %> <%= command.id %>",
747
+ "description": "Bump all @memberjunction/* dependencies in the current directory's package.json to the CLI version"
748
+ },
749
+ {
750
+ "command": "<%= config.bin %> <%= command.id %> -rdv",
751
+ "description": "Preview all recursive packages bumps without writing any changes."
752
+ },
753
+ {
754
+ "command": "<%= config.bin %> <%= command.id %> -rqt v2.10.0 | xargs -n1 -I{} npm install --prefix {}",
755
+ "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."
756
+ }
758
757
  ],
759
758
  "flags": {
760
- "conversation-id": {
761
- "description": "Scope to artifacts attached to the given conversation.",
762
- "name": "conversation-id",
763
- "hasDynamicHelp": false,
764
- "multiple": false,
765
- "type": "option"
759
+ "verbose": {
760
+ "char": "v",
761
+ "description": "Enable additional logging",
762
+ "name": "verbose",
763
+ "allowNo": false,
764
+ "type": "boolean"
766
765
  },
767
- "since": {
768
- "description": "Scope to artifacts created on/after this ISO date.",
769
- "name": "since",
770
- "hasDynamicHelp": false,
771
- "multiple": false,
772
- "type": "option"
766
+ "recursive": {
767
+ "char": "r",
768
+ "description": "Bump version in current directory and all subdirectories",
769
+ "name": "recursive",
770
+ "allowNo": false,
771
+ "type": "boolean"
773
772
  },
774
- "limit": {
775
- "description": "Maximum number of rows to inspect.",
776
- "name": "limit",
777
- "default": 100,
773
+ "tag": {
774
+ "char": "t",
775
+ "description": "Version tag to bump target for bump (e.g. v2.10.0), defaults to the CLI version",
776
+ "name": "tag",
778
777
  "hasDynamicHelp": false,
779
778
  "multiple": false,
780
779
  "type": "option"
781
780
  },
782
- "apply": {
783
- "description": "Write changes. Without this flag, this command only reports what it would do.",
784
- "name": "apply",
781
+ "quiet": {
782
+ "char": "q",
783
+ "description": "Only output paths for updated packages",
784
+ "name": "quiet",
785
785
  "allowNo": false,
786
786
  "type": "boolean"
787
787
  },
788
- "verbose": {
789
- "char": "v",
790
- "description": "Print every candidate row, not just the summary.",
791
- "name": "verbose",
788
+ "dry": {
789
+ "char": "d",
790
+ "description": "Dry run, do not write changes to package.json files",
791
+ "name": "dry",
792
792
  "allowNo": false,
793
793
  "type": "boolean"
794
794
  }
795
795
  },
796
796
  "hasDynamicHelp": false,
797
797
  "hiddenAliases": [],
798
- "id": "artifacts:reclassify",
798
+ "id": "bump",
799
799
  "pluginAlias": "@memberjunction/cli",
800
800
  "pluginName": "@memberjunction/cli",
801
801
  "pluginType": "core",
@@ -805,8 +805,8 @@
805
805
  "relativePath": [
806
806
  "dist",
807
807
  "commands",
808
- "artifacts",
809
- "reclassify.js"
808
+ "bump",
809
+ "index.js"
810
810
  ]
811
811
  },
812
812
  "bundle": {
@@ -3001,105 +3001,6 @@
3001
3001
  "watch.js"
3002
3002
  ]
3003
3003
  },
3004
- "translate-sql": {
3005
- "aliases": [],
3006
- "args": {},
3007
- "description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
3008
- "examples": [
3009
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
3010
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
3011
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --sql \"SELECT TOP 10 [Name] FROM [Users]\"",
3012
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope all --output ./reports"
3013
- ],
3014
- "flags": {
3015
- "from": {
3016
- "description": "Source SQL dialect",
3017
- "name": "from",
3018
- "required": true,
3019
- "hasDynamicHelp": false,
3020
- "multiple": false,
3021
- "options": [
3022
- "sqlserver",
3023
- "postgresql"
3024
- ],
3025
- "type": "option"
3026
- },
3027
- "to": {
3028
- "description": "Target SQL dialect",
3029
- "name": "to",
3030
- "required": true,
3031
- "hasDynamicHelp": false,
3032
- "multiple": false,
3033
- "options": [
3034
- "sqlserver",
3035
- "postgresql"
3036
- ],
3037
- "type": "option"
3038
- },
3039
- "scope": {
3040
- "description": "What to scan for translation",
3041
- "name": "scope",
3042
- "default": "all",
3043
- "hasDynamicHelp": false,
3044
- "multiple": false,
3045
- "options": [
3046
- "queries",
3047
- "views",
3048
- "filters",
3049
- "all"
3050
- ],
3051
- "type": "option"
3052
- },
3053
- "sql": {
3054
- "description": "Translate a single SQL fragment (inline mode)",
3055
- "name": "sql",
3056
- "hasDynamicHelp": false,
3057
- "multiple": false,
3058
- "type": "option"
3059
- },
3060
- "dry-run": {
3061
- "description": "Show what would be translated without making changes",
3062
- "name": "dry-run",
3063
- "allowNo": false,
3064
- "type": "boolean"
3065
- },
3066
- "review": {
3067
- "description": "Generate review report only (no writes to database)",
3068
- "name": "review",
3069
- "allowNo": false,
3070
- "type": "boolean"
3071
- },
3072
- "output": {
3073
- "char": "o",
3074
- "description": "Output directory for the translation report",
3075
- "name": "output",
3076
- "hasDynamicHelp": false,
3077
- "multiple": false,
3078
- "type": "option"
3079
- },
3080
- "force": {
3081
- "description": "Re-translate even if platform variants already exist",
3082
- "name": "force",
3083
- "allowNo": false,
3084
- "type": "boolean"
3085
- }
3086
- },
3087
- "hasDynamicHelp": false,
3088
- "hiddenAliases": [],
3089
- "id": "translate-sql",
3090
- "pluginAlias": "@memberjunction/cli",
3091
- "pluginName": "@memberjunction/cli",
3092
- "pluginType": "core",
3093
- "strict": true,
3094
- "enableJsonFlag": false,
3095
- "isESM": true,
3096
- "relativePath": [
3097
- "dist",
3098
- "commands",
3099
- "translate-sql",
3100
- "index.js"
3101
- ]
3102
- },
3103
3004
  "test:compare": {
3104
3005
  "aliases": [],
3105
3006
  "args": {
@@ -3712,6 +3613,105 @@
3712
3613
  "validate.js"
3713
3614
  ]
3714
3615
  },
3616
+ "translate-sql": {
3617
+ "aliases": [],
3618
+ "args": {},
3619
+ "description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
3620
+ "examples": [
3621
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
3622
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
3623
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --sql \"SELECT TOP 10 [Name] FROM [Users]\"",
3624
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope all --output ./reports"
3625
+ ],
3626
+ "flags": {
3627
+ "from": {
3628
+ "description": "Source SQL dialect",
3629
+ "name": "from",
3630
+ "required": true,
3631
+ "hasDynamicHelp": false,
3632
+ "multiple": false,
3633
+ "options": [
3634
+ "sqlserver",
3635
+ "postgresql"
3636
+ ],
3637
+ "type": "option"
3638
+ },
3639
+ "to": {
3640
+ "description": "Target SQL dialect",
3641
+ "name": "to",
3642
+ "required": true,
3643
+ "hasDynamicHelp": false,
3644
+ "multiple": false,
3645
+ "options": [
3646
+ "sqlserver",
3647
+ "postgresql"
3648
+ ],
3649
+ "type": "option"
3650
+ },
3651
+ "scope": {
3652
+ "description": "What to scan for translation",
3653
+ "name": "scope",
3654
+ "default": "all",
3655
+ "hasDynamicHelp": false,
3656
+ "multiple": false,
3657
+ "options": [
3658
+ "queries",
3659
+ "views",
3660
+ "filters",
3661
+ "all"
3662
+ ],
3663
+ "type": "option"
3664
+ },
3665
+ "sql": {
3666
+ "description": "Translate a single SQL fragment (inline mode)",
3667
+ "name": "sql",
3668
+ "hasDynamicHelp": false,
3669
+ "multiple": false,
3670
+ "type": "option"
3671
+ },
3672
+ "dry-run": {
3673
+ "description": "Show what would be translated without making changes",
3674
+ "name": "dry-run",
3675
+ "allowNo": false,
3676
+ "type": "boolean"
3677
+ },
3678
+ "review": {
3679
+ "description": "Generate review report only (no writes to database)",
3680
+ "name": "review",
3681
+ "allowNo": false,
3682
+ "type": "boolean"
3683
+ },
3684
+ "output": {
3685
+ "char": "o",
3686
+ "description": "Output directory for the translation report",
3687
+ "name": "output",
3688
+ "hasDynamicHelp": false,
3689
+ "multiple": false,
3690
+ "type": "option"
3691
+ },
3692
+ "force": {
3693
+ "description": "Re-translate even if platform variants already exist",
3694
+ "name": "force",
3695
+ "allowNo": false,
3696
+ "type": "boolean"
3697
+ }
3698
+ },
3699
+ "hasDynamicHelp": false,
3700
+ "hiddenAliases": [],
3701
+ "id": "translate-sql",
3702
+ "pluginAlias": "@memberjunction/cli",
3703
+ "pluginName": "@memberjunction/cli",
3704
+ "pluginType": "core",
3705
+ "strict": true,
3706
+ "enableJsonFlag": false,
3707
+ "isESM": true,
3708
+ "relativePath": [
3709
+ "dist",
3710
+ "commands",
3711
+ "translate-sql",
3712
+ "index.js"
3713
+ ]
3714
+ },
3715
3715
  "ai:actions:list": {
3716
3716
  "aliases": [],
3717
3717
  "args": {},
@@ -4760,5 +4760,5 @@
4760
4760
  ]
4761
4761
  }
4762
4762
  },
4763
- "version": "5.40.0"
4763
+ "version": "5.40.2"
4764
4764
  }