@memberjunction/cli 5.4.1 → 5.6.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.
Files changed (49) hide show
  1. package/dist/commands/doctor/index.d.ts +12 -0
  2. package/dist/commands/doctor/index.d.ts.map +1 -0
  3. package/dist/commands/doctor/index.js +69 -0
  4. package/dist/commands/doctor/index.js.map +1 -0
  5. package/dist/commands/install/index.d.ts +18 -136
  6. package/dist/commands/install/index.d.ts.map +1 -1
  7. package/dist/commands/install/index.js +189 -390
  8. package/dist/commands/install/index.js.map +1 -1
  9. package/dist/commands/sql-audit/index.d.ts +25 -0
  10. package/dist/commands/sql-audit/index.d.ts.map +1 -0
  11. package/dist/commands/sql-audit/index.js +198 -0
  12. package/dist/commands/sql-audit/index.js.map +1 -0
  13. package/dist/commands/sql-convert/index.d.ts +30 -0
  14. package/dist/commands/sql-convert/index.d.ts.map +1 -0
  15. package/dist/commands/sql-convert/index.js +128 -0
  16. package/dist/commands/sql-convert/index.js.map +1 -0
  17. package/dist/commands/translate-sql/index.d.ts +39 -0
  18. package/dist/commands/translate-sql/index.d.ts.map +1 -0
  19. package/dist/commands/translate-sql/index.js +229 -0
  20. package/dist/commands/translate-sql/index.js.map +1 -0
  21. package/dist/lib/legacy-install.d.ts +29 -0
  22. package/dist/lib/legacy-install.d.ts.map +1 -0
  23. package/dist/lib/legacy-install.js +391 -0
  24. package/dist/lib/legacy-install.js.map +1 -0
  25. package/dist/light-commands.d.ts.map +1 -1
  26. package/dist/light-commands.js +6 -1
  27. package/dist/light-commands.js.map +1 -1
  28. package/dist/translate-sql/classifier.d.ts +27 -0
  29. package/dist/translate-sql/classifier.d.ts.map +1 -0
  30. package/dist/translate-sql/classifier.js +118 -0
  31. package/dist/translate-sql/classifier.js.map +1 -0
  32. package/dist/translate-sql/groundTruth.d.ts +25 -0
  33. package/dist/translate-sql/groundTruth.d.ts.map +1 -0
  34. package/dist/translate-sql/groundTruth.js +93 -0
  35. package/dist/translate-sql/groundTruth.js.map +1 -0
  36. package/dist/translate-sql/index.d.ts +5 -0
  37. package/dist/translate-sql/index.d.ts.map +1 -0
  38. package/dist/translate-sql/index.js +5 -0
  39. package/dist/translate-sql/index.js.map +1 -0
  40. package/dist/translate-sql/reportGenerator.d.ts +26 -0
  41. package/dist/translate-sql/reportGenerator.d.ts.map +1 -0
  42. package/dist/translate-sql/reportGenerator.js +83 -0
  43. package/dist/translate-sql/reportGenerator.js.map +1 -0
  44. package/dist/translate-sql/ruleTranslator.d.ts +21 -0
  45. package/dist/translate-sql/ruleTranslator.d.ts.map +1 -0
  46. package/dist/translate-sql/ruleTranslator.js +74 -0
  47. package/dist/translate-sql/ruleTranslator.js.map +1 -0
  48. package/oclif.manifest.json +839 -475
  49. package/package.json +14 -12
@@ -424,68 +424,38 @@
424
424
  "index.js"
425
425
  ]
426
426
  },
427
- "codegen:5-0-fix-entity-names": {
427
+ "dbdoc:analyze": {
428
428
  "aliases": [],
429
429
  "args": {},
430
- "description": "[v5.0 Migration] Scan TypeScript files for entity names AND class names that need updating.\n\nThree strategies are applied:\n 1. Class name renames (regex) ActionEntity -> MJActionEntity, ActionSchema -> MJActionSchema,\n ActionEntityExtended -> MJActionEntityExtended (extended subclasses),\n ActionEntityServerEntity -> MJActionEntityServer (server subclass suffix standardization),\n ActionFormComponentExtended -> MJActionFormComponentExtended (Angular form components).\n Explicit subclass mappings (57 entries from subclass-rename-map.json) take priority over\n auto-generated suffix rules, enabling suffix changes (e.g., _Server -> Server, ServerEntity -> Server).\n 2. Multi-word entity name renames (regex) — 'AI Models' -> 'MJ: AI Models'\n 3. Single-word entity name renames (AST) — 'Actions' -> 'MJ: Actions' in GetEntityObject, OpenEntityRecord,\n navigateToEntity, EntityName: assignments, .Name === comparisons, @RegisterClass decorators.\n\nThe rename map (272 entity entries + 57 subclass entries) is built from entity_subclasses.ts @RegisterClass\ndecorators plus embedded rename maps. Runs in dry-run mode by default; use --fix to apply.",
430
+ "description": "Analyze database and generate documentation (delegates to db-auto-doc analyze)",
431
431
  "examples": [
432
- {
433
- "description": "Dry-run scan of the packages directory",
434
- "command": "<%= config.bin %> <%= command.id %> --path packages/"
435
- },
436
- {
437
- "description": "Scan a single file",
438
- "command": "<%= config.bin %> <%= command.id %> --path packages/Angular/Explorer/dashboards/src/Actions/components/actions-overview.component.ts"
439
- },
440
- {
441
- "description": "Apply fixes across the codebase",
442
- "command": "<%= config.bin %> <%= command.id %> --path packages/ --fix"
443
- },
444
- {
445
- "description": "Quiet mode (summary only)",
446
- "command": "<%= config.bin %> <%= command.id %> --path packages/ -q"
447
- }
432
+ "<%= config.bin %> <%= command.id %>",
433
+ "<%= config.bin %> <%= command.id %> --resume ./output/run-6/state.json",
434
+ "<%= config.bin %> <%= command.id %> --config ./my-config.json"
448
435
  ],
449
436
  "flags": {
450
- "path": {
451
- "char": "p",
452
- "description": "File or directory to scan. Accepts a single .ts file or a directory (scanned recursively). Defaults to the current working directory.",
453
- "name": "path",
437
+ "resume": {
438
+ "char": "r",
439
+ "description": "Resume from an existing state file",
440
+ "name": "resume",
441
+ "required": false,
454
442
  "hasDynamicHelp": false,
455
443
  "multiple": false,
456
444
  "type": "option"
457
445
  },
458
- "fix": {
459
- "description": "Apply fixes in place. Without this flag, the command runs in dry-run mode and only reports findings.",
460
- "name": "fix",
461
- "allowNo": false,
462
- "type": "boolean"
463
- },
464
- "entity-subclasses": {
465
- "description": "Explicit path to entity_subclasses.ts for building the rename map. If omitted, the tool searches common locations relative to the target path.",
466
- "name": "entity-subclasses",
446
+ "config": {
447
+ "char": "c",
448
+ "description": "Path to config file",
449
+ "name": "config",
450
+ "default": "./config.json",
467
451
  "hasDynamicHelp": false,
468
452
  "multiple": false,
469
453
  "type": "option"
470
- },
471
- "quiet": {
472
- "char": "q",
473
- "description": "Suppress detailed per-file output; only show the final summary counts.",
474
- "name": "quiet",
475
- "allowNo": false,
476
- "type": "boolean"
477
- },
478
- "verbose": {
479
- "char": "v",
480
- "description": "Show detailed progress including each file being scanned.",
481
- "name": "verbose",
482
- "allowNo": false,
483
- "type": "boolean"
484
454
  }
485
455
  },
486
456
  "hasDynamicHelp": false,
487
457
  "hiddenAliases": [],
488
- "id": "codegen:5-0-fix-entity-names",
458
+ "id": "dbdoc:analyze",
489
459
  "pluginAlias": "@memberjunction/cli",
490
460
  "pluginName": "@memberjunction/cli",
491
461
  "pluginType": "core",
@@ -495,72 +465,105 @@
495
465
  "relativePath": [
496
466
  "dist",
497
467
  "commands",
498
- "codegen",
499
- "5-0-fix-entity-names.js"
468
+ "dbdoc",
469
+ "analyze.js"
500
470
  ]
501
471
  },
502
- "codegen:5-0-fix-html-entity-names": {
472
+ "dbdoc:export-sample-queries": {
503
473
  "aliases": [],
504
474
  "args": {},
505
- "description": "[v5.0 Migration] Scan Angular HTML template files for hardcoded entity names that need \"MJ: \" prefix updates.\n\nUses targeted regex patterns to find entity name references in template expressions\nand attribute values. Detects method calls like navigateToEntity('Actions'),\nOpenEntityRecord('Entities', id), and attribute values like RowsEntityName=\"Users\".\nRuns in dry-run mode by default; use --fix to apply.\n\nThe rename map is built dynamically from entity_subclasses.ts by parsing all\n@RegisterClass(BaseEntity, 'MJ: XYZ') decorators (~272 entries).",
475
+ "description": "Export sample queries to MemberJunction metadata format (delegates to db-auto-doc export-sample-queries)",
506
476
  "examples": [
507
- {
508
- "description": "Dry-run scan of Angular templates",
509
- "command": "<%= config.bin %> <%= command.id %> --path packages/Angular/"
510
- },
511
- {
512
- "description": "Apply fixes to HTML templates",
513
- "command": "<%= config.bin %> <%= command.id %> --path packages/Angular/ --fix"
514
- },
515
- {
516
- "description": "Scan with verbose output",
517
- "command": "<%= config.bin %> <%= command.id %> --path packages/ -v"
518
- },
519
- {
520
- "description": "Scan a single template file",
521
- "command": "<%= config.bin %> <%= command.id %> --path packages/Angular/Explorer/dashboards/src/Actions/actions-dashboard.component.html"
522
- }
477
+ "<%= config.bin %> <%= command.id %> --input ./output/sample-queries.json --output ./metadata/queries/.queries.json",
478
+ "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./metadata/queries/.queries.json --separate-sql-files",
479
+ "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --category \"Database Documentation\"",
480
+ "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --status Pending --min-confidence 0.8"
523
481
  ],
524
482
  "flags": {
525
- "path": {
526
- "char": "p",
527
- "description": "File or directory to scan. Accepts a single .html file or a directory (scanned recursively). Defaults to the current working directory.",
528
- "name": "path",
483
+ "input": {
484
+ "char": "i",
485
+ "description": "Path to sample-queries.json file generated by generate-queries command",
486
+ "name": "input",
487
+ "required": true,
529
488
  "hasDynamicHelp": false,
530
489
  "multiple": false,
531
490
  "type": "option"
532
491
  },
533
- "fix": {
534
- "description": "Apply fixes in place. Without this flag, the command runs in dry-run mode and only reports findings.",
535
- "name": "fix",
492
+ "output": {
493
+ "char": "o",
494
+ "description": "Output path for the .queries.json metadata file",
495
+ "name": "output",
496
+ "required": true,
497
+ "hasDynamicHelp": false,
498
+ "multiple": false,
499
+ "type": "option"
500
+ },
501
+ "separate-sql-files": {
502
+ "description": "Write SQL to separate files and use @file: references",
503
+ "name": "separate-sql-files",
536
504
  "allowNo": false,
537
505
  "type": "boolean"
538
506
  },
539
- "entity-subclasses": {
540
- "description": "Explicit path to entity_subclasses.ts for building the rename map. If omitted, the tool searches common locations relative to the target path.",
541
- "name": "entity-subclasses",
507
+ "sql-dir": {
508
+ "description": "Directory for SQL files when using --separate-sql-files (relative to output file)",
509
+ "name": "sql-dir",
510
+ "default": "SQL",
542
511
  "hasDynamicHelp": false,
543
512
  "multiple": false,
544
513
  "type": "option"
545
514
  },
546
- "quiet": {
547
- "char": "q",
548
- "description": "Suppress detailed per-file output; only show the final summary counts.",
549
- "name": "quiet",
515
+ "category": {
516
+ "description": "Category name for @lookup reference (e.g., \"Database Documentation\")",
517
+ "name": "category",
518
+ "required": false,
519
+ "hasDynamicHelp": false,
520
+ "multiple": false,
521
+ "type": "option"
522
+ },
523
+ "status": {
524
+ "description": "Status to assign to exported queries",
525
+ "name": "status",
526
+ "default": "Pending",
527
+ "hasDynamicHelp": false,
528
+ "multiple": false,
529
+ "options": [
530
+ "Approved",
531
+ "Pending",
532
+ "Rejected",
533
+ "Expired"
534
+ ],
535
+ "type": "option"
536
+ },
537
+ "min-confidence": {
538
+ "description": "Minimum confidence threshold to export (0-1)",
539
+ "name": "min-confidence",
540
+ "default": "0",
541
+ "hasDynamicHelp": false,
542
+ "multiple": false,
543
+ "type": "option"
544
+ },
545
+ "validated-only": {
546
+ "description": "Only export queries that were successfully validated",
547
+ "name": "validated-only",
550
548
  "allowNo": false,
551
549
  "type": "boolean"
552
550
  },
553
- "verbose": {
554
- "char": "v",
555
- "description": "Show detailed progress including each file being scanned.",
556
- "name": "verbose",
551
+ "append": {
552
+ "description": "Append to existing metadata file instead of overwriting",
553
+ "name": "append",
554
+ "allowNo": false,
555
+ "type": "boolean"
556
+ },
557
+ "include-primary-key": {
558
+ "description": "Include primaryKey and sync fields (for updating existing records)",
559
+ "name": "include-primary-key",
557
560
  "allowNo": false,
558
561
  "type": "boolean"
559
562
  }
560
563
  },
561
564
  "hasDynamicHelp": false,
562
565
  "hiddenAliases": [],
563
- "id": "codegen:5-0-fix-html-entity-names",
566
+ "id": "dbdoc:export-sample-queries",
564
567
  "pluginAlias": "@memberjunction/cli",
565
568
  "pluginName": "@memberjunction/cli",
566
569
  "pluginType": "core",
@@ -570,72 +573,100 @@
570
573
  "relativePath": [
571
574
  "dist",
572
575
  "commands",
573
- "codegen",
574
- "5-0-fix-html-entity-names.js"
576
+ "dbdoc",
577
+ "export-sample-queries.js"
575
578
  ]
576
579
  },
577
- "codegen:5-0-fix-metadata-names": {
580
+ "dbdoc:export": {
578
581
  "aliases": [],
579
582
  "args": {},
580
- "description": "[v5.0 Migration] Scan metadata JSON files for entity names that need \"MJ: \" prefix updates.\n\nTargets the metadata/ directory used by \"mj sync\". Detects entity name references in\n@lookup: directives (both the entity name and lookup value), .mj-sync.json and\n.mj-folder.json config files (entity/entityName fields), relatedEntities object keys,\nand fields.Name values in Entities-managing folders. Runs in dry-run mode by default;\nuse --fix to apply.\n\nThe rename map is built dynamically from entity_subclasses.ts by parsing all\n@RegisterClass(BaseEntity, 'MJ: XYZ') decorators (~272 entries).",
583
+ "description": "Export documentation in multiple formats (delegates to db-auto-doc export)",
581
584
  "examples": [
582
- {
583
- "description": "Dry-run scan of the metadata directory",
584
- "command": "<%= config.bin %> <%= command.id %> --path metadata/"
585
- },
586
- {
587
- "description": "Apply fixes to metadata files",
588
- "command": "<%= config.bin %> <%= command.id %> --path metadata/ --fix"
589
- },
590
- {
591
- "description": "Scan a specific subdirectory",
592
- "command": "<%= config.bin %> <%= command.id %> --path metadata/resource-types"
593
- },
594
- {
595
- "description": "Scan and fix a single metadata file",
596
- "command": "<%= config.bin %> <%= command.id %> --path metadata/entities/.audit-related-entities.json --fix"
597
- }
585
+ "<%= config.bin %> <%= command.id %> --state-file=./db-doc-state.json",
586
+ "<%= config.bin %> <%= command.id %> --sql",
587
+ "<%= config.bin %> <%= command.id %> --markdown",
588
+ "<%= config.bin %> <%= command.id %> --html",
589
+ "<%= config.bin %> <%= command.id %> --csv",
590
+ "<%= config.bin %> <%= command.id %> --mermaid",
591
+ "<%= config.bin %> <%= command.id %> --sql --markdown --html --csv --mermaid --apply"
598
592
  ],
599
593
  "flags": {
600
- "path": {
601
- "char": "p",
602
- "description": "File or directory to scan. Accepts a single .json file or a directory (scanned recursively, including dotfiles like .mj-sync.json). Defaults to the current working directory.",
603
- "name": "path",
594
+ "state-file": {
595
+ "char": "s",
596
+ "description": "Path to state JSON file",
597
+ "name": "state-file",
604
598
  "hasDynamicHelp": false,
605
599
  "multiple": false,
606
600
  "type": "option"
607
601
  },
608
- "fix": {
609
- "description": "Apply fixes in place. Without this flag, the command runs in dry-run mode and only reports findings.",
610
- "name": "fix",
611
- "allowNo": false,
612
- "type": "boolean"
613
- },
614
- "entity-subclasses": {
615
- "description": "Explicit path to entity_subclasses.ts for building the rename map. If omitted, the tool searches common locations relative to the target path.",
616
- "name": "entity-subclasses",
602
+ "output-dir": {
603
+ "char": "o",
604
+ "description": "Output directory for generated files",
605
+ "name": "output-dir",
617
606
  "hasDynamicHelp": false,
618
607
  "multiple": false,
619
608
  "type": "option"
620
609
  },
621
- "quiet": {
622
- "char": "q",
623
- "description": "Suppress detailed per-file output; only show the final summary counts.",
624
- "name": "quiet",
610
+ "sql": {
611
+ "description": "Generate SQL script",
612
+ "name": "sql",
625
613
  "allowNo": false,
626
614
  "type": "boolean"
627
615
  },
628
- "verbose": {
629
- "char": "v",
630
- "description": "Show detailed progress including each file being scanned.",
631
- "name": "verbose",
616
+ "markdown": {
617
+ "description": "Generate Markdown documentation",
618
+ "name": "markdown",
619
+ "allowNo": false,
620
+ "type": "boolean"
621
+ },
622
+ "html": {
623
+ "description": "Generate interactive HTML documentation",
624
+ "name": "html",
625
+ "allowNo": false,
626
+ "type": "boolean"
627
+ },
628
+ "csv": {
629
+ "description": "Generate CSV exports (tables and columns)",
630
+ "name": "csv",
631
+ "allowNo": false,
632
+ "type": "boolean"
633
+ },
634
+ "mermaid": {
635
+ "description": "Generate Mermaid ERD diagram files",
636
+ "name": "mermaid",
637
+ "allowNo": false,
638
+ "type": "boolean"
639
+ },
640
+ "report": {
641
+ "description": "Generate analysis report",
642
+ "name": "report",
643
+ "allowNo": false,
644
+ "type": "boolean"
645
+ },
646
+ "apply": {
647
+ "description": "Apply SQL to database",
648
+ "name": "apply",
649
+ "allowNo": false,
650
+ "type": "boolean"
651
+ },
652
+ "approved-only": {
653
+ "description": "Only export approved items",
654
+ "name": "approved-only",
632
655
  "allowNo": false,
633
656
  "type": "boolean"
657
+ },
658
+ "confidence-threshold": {
659
+ "description": "Minimum confidence threshold",
660
+ "name": "confidence-threshold",
661
+ "default": "0",
662
+ "hasDynamicHelp": false,
663
+ "multiple": false,
664
+ "type": "option"
634
665
  }
635
666
  },
636
667
  "hasDynamicHelp": false,
637
668
  "hiddenAliases": [],
638
- "id": "codegen:5-0-fix-metadata-names",
669
+ "id": "dbdoc:export",
639
670
  "pluginAlias": "@memberjunction/cli",
640
671
  "pluginName": "@memberjunction/cli",
641
672
  "pluginType": "core",
@@ -645,35 +676,65 @@
645
676
  "relativePath": [
646
677
  "dist",
647
678
  "commands",
648
- "codegen",
649
- "5-0-fix-metadata-names.js"
679
+ "dbdoc",
680
+ "export.js"
650
681
  ]
651
682
  },
652
- "codegen": {
683
+ "dbdoc:generate-queries": {
653
684
  "aliases": [],
654
685
  "args": {},
655
- "description": "Run the full MemberJunction code generation pipeline.\n\nAnalyzes your SQL Server database schema, updates MemberJunction metadata, and\ngenerates synchronized code across the entire stack:\n\n - SQL views, stored procedures, indexes, and permissions\n - TypeScript entity classes with Zod validation schemas\n - Angular form components with AI-driven layouts\n - GraphQL resolvers and type definitions\n - Action subclasses and DB schema JSON\n\nConfiguration is loaded from mj.config.cjs in the current directory (or parent\ndirectories). Database connection can also be set via environment variables:\nDB_HOST, DB_DATABASE, CODEGEN_DB_USERNAME, CODEGEN_DB_PASSWORD.\n\nUse --skipdb to skip all database operations (metadata sync, SQL object\ngeneration) and only regenerate TypeScript, Angular, and GraphQL output from\nexisting metadata.",
686
+ "description": "Generate sample SQL queries from existing analysis state (delegates to db-auto-doc generate-queries)",
656
687
  "examples": [
657
- {
658
- "command": "<%= config.bin %> <%= command.id %>",
659
- "description": "Run the full code generation pipeline"
660
- },
661
- {
662
- "command": "<%= config.bin %> <%= command.id %> --skipdb",
663
- "description": "Regenerate code files without touching the database"
664
- }
688
+ "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json",
689
+ "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --output-dir ./queries",
690
+ "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --queries-per-table 10"
665
691
  ],
666
692
  "flags": {
667
- "skipdb": {
668
- "description": "Skip database operations (metadata sync, SQL generation). Only regenerate TypeScript entities, Angular components, and GraphQL resolvers from existing metadata.",
669
- "name": "skipdb",
670
- "allowNo": false,
671
- "type": "boolean"
693
+ "from-state": {
694
+ "description": "Path to existing state.json file from previous analysis",
695
+ "name": "from-state",
696
+ "required": true,
697
+ "hasDynamicHelp": false,
698
+ "multiple": false,
699
+ "type": "option"
700
+ },
701
+ "output-dir": {
702
+ "description": "Output directory for generated queries",
703
+ "name": "output-dir",
704
+ "required": false,
705
+ "hasDynamicHelp": false,
706
+ "multiple": false,
707
+ "type": "option"
708
+ },
709
+ "config": {
710
+ "char": "c",
711
+ "description": "Path to config file (for database connection and AI settings)",
712
+ "name": "config",
713
+ "default": "./config.json",
714
+ "hasDynamicHelp": false,
715
+ "multiple": false,
716
+ "type": "option"
717
+ },
718
+ "queries-per-table": {
719
+ "description": "Number of queries to generate per table",
720
+ "name": "queries-per-table",
721
+ "required": false,
722
+ "hasDynamicHelp": false,
723
+ "multiple": false,
724
+ "type": "option"
725
+ },
726
+ "max-execution-time": {
727
+ "description": "Maximum execution time for query validation (ms)",
728
+ "name": "max-execution-time",
729
+ "required": false,
730
+ "hasDynamicHelp": false,
731
+ "multiple": false,
732
+ "type": "option"
672
733
  }
673
734
  },
674
735
  "hasDynamicHelp": false,
675
736
  "hiddenAliases": [],
676
- "id": "codegen",
737
+ "id": "dbdoc:generate-queries",
677
738
  "pluginAlias": "@memberjunction/cli",
678
739
  "pluginName": "@memberjunction/cli",
679
740
  "pluginType": "core",
@@ -683,84 +744,76 @@
683
744
  "relativePath": [
684
745
  "dist",
685
746
  "commands",
686
- "codegen",
747
+ "dbdoc",
748
+ "generate-queries.js"
749
+ ]
750
+ },
751
+ "dbdoc": {
752
+ "aliases": [],
753
+ "args": {},
754
+ "description": "AI-powered database documentation generator",
755
+ "flags": {},
756
+ "hasDynamicHelp": false,
757
+ "hidden": false,
758
+ "hiddenAliases": [],
759
+ "id": "dbdoc",
760
+ "pluginAlias": "@memberjunction/cli",
761
+ "pluginName": "@memberjunction/cli",
762
+ "pluginType": "core",
763
+ "strict": true,
764
+ "enableJsonFlag": false,
765
+ "isESM": true,
766
+ "relativePath": [
767
+ "dist",
768
+ "commands",
769
+ "dbdoc",
687
770
  "index.js"
688
771
  ]
689
772
  },
690
- "codegen:manifest": {
773
+ "dbdoc:init": {
691
774
  "aliases": [],
692
775
  "args": {},
693
- "description": "Generate a class registration manifest to prevent tree-shaking.\n\nMemberJunction uses @RegisterClass decorators with a dynamic class factory.\nModern bundlers (ESBuild, Vite) cannot detect dynamic instantiation and will\ntree-shake these classes out of production builds. This command scans the\ndependency tree for all @RegisterClass-decorated classes and emits a manifest\nfile with static imports that the bundler cannot eliminate.\n\nTypically used as a prebuild/prestart script for MJAPI and MJExplorer. For\nMJ distribution users, pre-built manifests ship inside @memberjunction/server-bootstrap\nand @memberjunction/ng-bootstrap -- use --exclude-packages @memberjunction to\ngenerate a supplemental manifest covering only your own application classes.",
776
+ "description": "Initialize DBAutoDoc project (delegates to db-auto-doc init)",
694
777
  "examples": [
695
- {
696
- "command": "<%= config.bin %> <%= command.id %>",
697
- "description": "Generate manifest with default output path"
698
- },
699
- {
700
- "command": "<%= config.bin %> <%= command.id %> --appDir ./packages/MJAPI --output ./packages/MJAPI/src/generated/class-registrations-manifest.ts",
701
- "description": "Generate manifest for a specific application directory"
702
- },
703
- {
704
- "command": "<%= config.bin %> <%= command.id %> --exclude-packages @memberjunction",
705
- "description": "Exclude MJ packages (use pre-built bootstrap manifests instead)"
706
- },
707
- {
708
- "command": "<%= config.bin %> <%= command.id %> --filter BaseEngine --filter BaseAction --verbose",
709
- "description": "Only include specific base classes with detailed progress"
710
- }
778
+ "<%= config.bin %> <%= command.id %>"
711
779
  ],
712
- "flags": {
713
- "output": {
714
- "char": "o",
715
- "description": "Output file path for the generated manifest. The file will contain named imports and a CLASS_REGISTRATIONS array.",
716
- "name": "output",
717
- "default": "./src/generated/class-registrations-manifest.ts",
718
- "hasDynamicHelp": false,
719
- "multiple": false,
720
- "type": "option"
721
- },
722
- "appDir": {
723
- "char": "a",
724
- "description": "Root directory of the application whose package.json dependency tree will be scanned. Defaults to the current working directory.",
725
- "name": "appDir",
726
- "hasDynamicHelp": false,
727
- "multiple": false,
728
- "type": "option"
729
- },
730
- "filter": {
780
+ "flags": {},
781
+ "hasDynamicHelp": false,
782
+ "hiddenAliases": [],
783
+ "id": "dbdoc:init",
784
+ "pluginAlias": "@memberjunction/cli",
785
+ "pluginName": "@memberjunction/cli",
786
+ "pluginType": "core",
787
+ "strict": true,
788
+ "enableJsonFlag": false,
789
+ "isESM": true,
790
+ "relativePath": [
791
+ "dist",
792
+ "commands",
793
+ "dbdoc",
794
+ "init.js"
795
+ ]
796
+ },
797
+ "dbdoc:reset": {
798
+ "aliases": [],
799
+ "args": {},
800
+ "description": "Reset analysis state (delegates to db-auto-doc reset)",
801
+ "examples": [
802
+ "<%= config.bin %> <%= command.id %>",
803
+ "<%= config.bin %> <%= command.id %> --force"
804
+ ],
805
+ "flags": {
806
+ "force": {
731
807
  "char": "f",
732
- "description": "Only include classes extending this base class. Can be repeated (e.g., --filter BaseEngine --filter BaseAction).",
733
- "name": "filter",
734
- "hasDynamicHelp": false,
735
- "multiple": true,
736
- "type": "option"
737
- },
738
- "exclude-packages": {
739
- "char": "e",
740
- "description": "Skip packages whose name starts with this prefix. Useful for excluding @memberjunction packages when using pre-built bootstrap manifests. Can be repeated.",
741
- "name": "exclude-packages",
742
- "hasDynamicHelp": false,
743
- "multiple": true,
744
- "type": "option"
745
- },
746
- "quiet": {
747
- "char": "q",
748
- "description": "Suppress all output except errors.",
749
- "name": "quiet",
750
- "allowNo": false,
751
- "type": "boolean"
752
- },
753
- "verbose": {
754
- "char": "v",
755
- "description": "Show detailed progress including per-package scanning info and skipped classes.",
756
- "name": "verbose",
808
+ "description": "Force reset without confirmation",
809
+ "name": "force",
757
810
  "allowNo": false,
758
811
  "type": "boolean"
759
812
  }
760
813
  },
761
814
  "hasDynamicHelp": false,
762
815
  "hiddenAliases": [],
763
- "id": "codegen:manifest",
816
+ "id": "dbdoc:reset",
764
817
  "pluginAlias": "@memberjunction/cli",
765
818
  "pluginName": "@memberjunction/cli",
766
819
  "pluginType": "core",
@@ -770,34 +823,23 @@
770
823
  "relativePath": [
771
824
  "dist",
772
825
  "commands",
773
- "codegen",
774
- "manifest.js"
826
+ "dbdoc",
827
+ "reset.js"
775
828
  ]
776
829
  },
777
- "dbdoc:analyze": {
830
+ "dbdoc:status": {
778
831
  "aliases": [],
779
832
  "args": {},
780
- "description": "Analyze database and generate documentation (delegates to db-auto-doc analyze)",
833
+ "description": "Show analysis status and progress (delegates to db-auto-doc status)",
781
834
  "examples": [
782
835
  "<%= config.bin %> <%= command.id %>",
783
- "<%= config.bin %> <%= command.id %> --resume ./output/run-6/state.json",
784
- "<%= config.bin %> <%= command.id %> --config ./my-config.json"
836
+ "<%= config.bin %> <%= command.id %> --state-file ./custom-state.json"
785
837
  ],
786
838
  "flags": {
787
- "resume": {
788
- "char": "r",
789
- "description": "Resume from an existing state file",
790
- "name": "resume",
791
- "required": false,
792
- "hasDynamicHelp": false,
793
- "multiple": false,
794
- "type": "option"
795
- },
796
- "config": {
797
- "char": "c",
798
- "description": "Path to config file",
799
- "name": "config",
800
- "default": "./config.json",
839
+ "state-file": {
840
+ "char": "s",
841
+ "description": "Path to state JSON file",
842
+ "name": "state-file",
801
843
  "hasDynamicHelp": false,
802
844
  "multiple": false,
803
845
  "type": "option"
@@ -805,7 +847,7 @@
805
847
  },
806
848
  "hasDynamicHelp": false,
807
849
  "hiddenAliases": [],
808
- "id": "dbdoc:analyze",
850
+ "id": "dbdoc:status",
809
851
  "pluginAlias": "@memberjunction/cli",
810
852
  "pluginName": "@memberjunction/cli",
811
853
  "pluginType": "core",
@@ -816,104 +858,71 @@
816
858
  "dist",
817
859
  "commands",
818
860
  "dbdoc",
819
- "analyze.js"
861
+ "status.js"
820
862
  ]
821
863
  },
822
- "dbdoc:export-sample-queries": {
864
+ "codegen:5-0-fix-entity-names": {
823
865
  "aliases": [],
824
866
  "args": {},
825
- "description": "Export sample queries to MemberJunction metadata format (delegates to db-auto-doc export-sample-queries)",
867
+ "description": "[v5.0 Migration] Scan TypeScript files for entity names AND class names that need updating.\n\nThree strategies are applied:\n 1. Class name renames (regex) ActionEntity -> MJActionEntity, ActionSchema -> MJActionSchema,\n ActionEntityExtended -> MJActionEntityExtended (extended subclasses),\n ActionEntityServerEntity -> MJActionEntityServer (server subclass suffix standardization),\n ActionFormComponentExtended -> MJActionFormComponentExtended (Angular form components).\n Explicit subclass mappings (57 entries from subclass-rename-map.json) take priority over\n auto-generated suffix rules, enabling suffix changes (e.g., _Server -> Server, ServerEntity -> Server).\n 2. Multi-word entity name renames (regex) — 'AI Models' -> 'MJ: AI Models'\n 3. Single-word entity name renames (AST) — 'Actions' -> 'MJ: Actions' in GetEntityObject, OpenEntityRecord,\n navigateToEntity, EntityName: assignments, .Name === comparisons, @RegisterClass decorators.\n\nThe rename map (272 entity entries + 57 subclass entries) is built from entity_subclasses.ts @RegisterClass\ndecorators plus embedded rename maps. Runs in dry-run mode by default; use --fix to apply.",
826
868
  "examples": [
827
- "<%= config.bin %> <%= command.id %> --input ./output/sample-queries.json --output ./metadata/queries/.queries.json",
828
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./metadata/queries/.queries.json --separate-sql-files",
829
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --category \"Database Documentation\"",
830
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --status Pending --min-confidence 0.8"
869
+ {
870
+ "description": "Dry-run scan of the packages directory",
871
+ "command": "<%= config.bin %> <%= command.id %> --path packages/"
872
+ },
873
+ {
874
+ "description": "Scan a single file",
875
+ "command": "<%= config.bin %> <%= command.id %> --path packages/Angular/Explorer/dashboards/src/Actions/components/actions-overview.component.ts"
876
+ },
877
+ {
878
+ "description": "Apply fixes across the codebase",
879
+ "command": "<%= config.bin %> <%= command.id %> --path packages/ --fix"
880
+ },
881
+ {
882
+ "description": "Quiet mode (summary only)",
883
+ "command": "<%= config.bin %> <%= command.id %> --path packages/ -q"
884
+ }
831
885
  ],
832
886
  "flags": {
833
- "input": {
834
- "char": "i",
835
- "description": "Path to sample-queries.json file generated by generate-queries command",
836
- "name": "input",
837
- "required": true,
838
- "hasDynamicHelp": false,
839
- "multiple": false,
840
- "type": "option"
841
- },
842
- "output": {
843
- "char": "o",
844
- "description": "Output path for the .queries.json metadata file",
845
- "name": "output",
846
- "required": true,
887
+ "path": {
888
+ "char": "p",
889
+ "description": "File or directory to scan. Accepts a single .ts file or a directory (scanned recursively). Defaults to the current working directory.",
890
+ "name": "path",
847
891
  "hasDynamicHelp": false,
848
892
  "multiple": false,
849
893
  "type": "option"
850
894
  },
851
- "separate-sql-files": {
852
- "description": "Write SQL to separate files and use @file: references",
853
- "name": "separate-sql-files",
895
+ "fix": {
896
+ "description": "Apply fixes in place. Without this flag, the command runs in dry-run mode and only reports findings.",
897
+ "name": "fix",
854
898
  "allowNo": false,
855
899
  "type": "boolean"
856
900
  },
857
- "sql-dir": {
858
- "description": "Directory for SQL files when using --separate-sql-files (relative to output file)",
859
- "name": "sql-dir",
860
- "default": "SQL",
861
- "hasDynamicHelp": false,
862
- "multiple": false,
863
- "type": "option"
864
- },
865
- "category": {
866
- "description": "Category name for @lookup reference (e.g., \"Database Documentation\")",
867
- "name": "category",
868
- "required": false,
869
- "hasDynamicHelp": false,
870
- "multiple": false,
871
- "type": "option"
872
- },
873
- "status": {
874
- "description": "Status to assign to exported queries",
875
- "name": "status",
876
- "default": "Pending",
877
- "hasDynamicHelp": false,
878
- "multiple": false,
879
- "options": [
880
- "Approved",
881
- "Pending",
882
- "Rejected",
883
- "Expired"
884
- ],
885
- "type": "option"
886
- },
887
- "min-confidence": {
888
- "description": "Minimum confidence threshold to export (0-1)",
889
- "name": "min-confidence",
890
- "default": "0",
901
+ "entity-subclasses": {
902
+ "description": "Explicit path to entity_subclasses.ts for building the rename map. If omitted, the tool searches common locations relative to the target path.",
903
+ "name": "entity-subclasses",
891
904
  "hasDynamicHelp": false,
892
905
  "multiple": false,
893
906
  "type": "option"
894
907
  },
895
- "validated-only": {
896
- "description": "Only export queries that were successfully validated",
897
- "name": "validated-only",
898
- "allowNo": false,
899
- "type": "boolean"
900
- },
901
- "append": {
902
- "description": "Append to existing metadata file instead of overwriting",
903
- "name": "append",
908
+ "quiet": {
909
+ "char": "q",
910
+ "description": "Suppress detailed per-file output; only show the final summary counts.",
911
+ "name": "quiet",
904
912
  "allowNo": false,
905
913
  "type": "boolean"
906
914
  },
907
- "include-primary-key": {
908
- "description": "Include primaryKey and sync fields (for updating existing records)",
909
- "name": "include-primary-key",
915
+ "verbose": {
916
+ "char": "v",
917
+ "description": "Show detailed progress including each file being scanned.",
918
+ "name": "verbose",
910
919
  "allowNo": false,
911
920
  "type": "boolean"
912
921
  }
913
922
  },
914
923
  "hasDynamicHelp": false,
915
924
  "hiddenAliases": [],
916
- "id": "dbdoc:export-sample-queries",
925
+ "id": "codegen:5-0-fix-entity-names",
917
926
  "pluginAlias": "@memberjunction/cli",
918
927
  "pluginName": "@memberjunction/cli",
919
928
  "pluginType": "core",
@@ -923,100 +932,72 @@
923
932
  "relativePath": [
924
933
  "dist",
925
934
  "commands",
926
- "dbdoc",
927
- "export-sample-queries.js"
935
+ "codegen",
936
+ "5-0-fix-entity-names.js"
928
937
  ]
929
938
  },
930
- "dbdoc:export": {
939
+ "codegen:5-0-fix-html-entity-names": {
931
940
  "aliases": [],
932
941
  "args": {},
933
- "description": "Export documentation in multiple formats (delegates to db-auto-doc export)",
942
+ "description": "[v5.0 Migration] Scan Angular HTML template files for hardcoded entity names that need \"MJ: \" prefix updates.\n\nUses targeted regex patterns to find entity name references in template expressions\nand attribute values. Detects method calls like navigateToEntity('Actions'),\nOpenEntityRecord('Entities', id), and attribute values like RowsEntityName=\"Users\".\nRuns in dry-run mode by default; use --fix to apply.\n\nThe rename map is built dynamically from entity_subclasses.ts by parsing all\n@RegisterClass(BaseEntity, 'MJ: XYZ') decorators (~272 entries).",
934
943
  "examples": [
935
- "<%= config.bin %> <%= command.id %> --state-file=./db-doc-state.json",
936
- "<%= config.bin %> <%= command.id %> --sql",
937
- "<%= config.bin %> <%= command.id %> --markdown",
938
- "<%= config.bin %> <%= command.id %> --html",
939
- "<%= config.bin %> <%= command.id %> --csv",
940
- "<%= config.bin %> <%= command.id %> --mermaid",
941
- "<%= config.bin %> <%= command.id %> --sql --markdown --html --csv --mermaid --apply"
944
+ {
945
+ "description": "Dry-run scan of Angular templates",
946
+ "command": "<%= config.bin %> <%= command.id %> --path packages/Angular/"
947
+ },
948
+ {
949
+ "description": "Apply fixes to HTML templates",
950
+ "command": "<%= config.bin %> <%= command.id %> --path packages/Angular/ --fix"
951
+ },
952
+ {
953
+ "description": "Scan with verbose output",
954
+ "command": "<%= config.bin %> <%= command.id %> --path packages/ -v"
955
+ },
956
+ {
957
+ "description": "Scan a single template file",
958
+ "command": "<%= config.bin %> <%= command.id %> --path packages/Angular/Explorer/dashboards/src/Actions/actions-dashboard.component.html"
959
+ }
942
960
  ],
943
961
  "flags": {
944
- "state-file": {
945
- "char": "s",
946
- "description": "Path to state JSON file",
947
- "name": "state-file",
948
- "hasDynamicHelp": false,
949
- "multiple": false,
950
- "type": "option"
951
- },
952
- "output-dir": {
953
- "char": "o",
954
- "description": "Output directory for generated files",
955
- "name": "output-dir",
962
+ "path": {
963
+ "char": "p",
964
+ "description": "File or directory to scan. Accepts a single .html file or a directory (scanned recursively). Defaults to the current working directory.",
965
+ "name": "path",
956
966
  "hasDynamicHelp": false,
957
967
  "multiple": false,
958
968
  "type": "option"
959
969
  },
960
- "sql": {
961
- "description": "Generate SQL script",
962
- "name": "sql",
963
- "allowNo": false,
964
- "type": "boolean"
965
- },
966
- "markdown": {
967
- "description": "Generate Markdown documentation",
968
- "name": "markdown",
969
- "allowNo": false,
970
- "type": "boolean"
971
- },
972
- "html": {
973
- "description": "Generate interactive HTML documentation",
974
- "name": "html",
975
- "allowNo": false,
976
- "type": "boolean"
977
- },
978
- "csv": {
979
- "description": "Generate CSV exports (tables and columns)",
980
- "name": "csv",
981
- "allowNo": false,
982
- "type": "boolean"
983
- },
984
- "mermaid": {
985
- "description": "Generate Mermaid ERD diagram files",
986
- "name": "mermaid",
987
- "allowNo": false,
988
- "type": "boolean"
989
- },
990
- "report": {
991
- "description": "Generate analysis report",
992
- "name": "report",
970
+ "fix": {
971
+ "description": "Apply fixes in place. Without this flag, the command runs in dry-run mode and only reports findings.",
972
+ "name": "fix",
993
973
  "allowNo": false,
994
974
  "type": "boolean"
995
975
  },
996
- "apply": {
997
- "description": "Apply SQL to database",
998
- "name": "apply",
976
+ "entity-subclasses": {
977
+ "description": "Explicit path to entity_subclasses.ts for building the rename map. If omitted, the tool searches common locations relative to the target path.",
978
+ "name": "entity-subclasses",
979
+ "hasDynamicHelp": false,
980
+ "multiple": false,
981
+ "type": "option"
982
+ },
983
+ "quiet": {
984
+ "char": "q",
985
+ "description": "Suppress detailed per-file output; only show the final summary counts.",
986
+ "name": "quiet",
999
987
  "allowNo": false,
1000
988
  "type": "boolean"
1001
989
  },
1002
- "approved-only": {
1003
- "description": "Only export approved items",
1004
- "name": "approved-only",
990
+ "verbose": {
991
+ "char": "v",
992
+ "description": "Show detailed progress including each file being scanned.",
993
+ "name": "verbose",
1005
994
  "allowNo": false,
1006
995
  "type": "boolean"
1007
- },
1008
- "confidence-threshold": {
1009
- "description": "Minimum confidence threshold",
1010
- "name": "confidence-threshold",
1011
- "default": "0",
1012
- "hasDynamicHelp": false,
1013
- "multiple": false,
1014
- "type": "option"
1015
996
  }
1016
997
  },
1017
998
  "hasDynamicHelp": false,
1018
999
  "hiddenAliases": [],
1019
- "id": "dbdoc:export",
1000
+ "id": "codegen:5-0-fix-html-entity-names",
1020
1001
  "pluginAlias": "@memberjunction/cli",
1021
1002
  "pluginName": "@memberjunction/cli",
1022
1003
  "pluginType": "core",
@@ -1026,65 +1007,72 @@
1026
1007
  "relativePath": [
1027
1008
  "dist",
1028
1009
  "commands",
1029
- "dbdoc",
1030
- "export.js"
1010
+ "codegen",
1011
+ "5-0-fix-html-entity-names.js"
1031
1012
  ]
1032
1013
  },
1033
- "dbdoc:generate-queries": {
1014
+ "codegen:5-0-fix-metadata-names": {
1034
1015
  "aliases": [],
1035
1016
  "args": {},
1036
- "description": "Generate sample SQL queries from existing analysis state (delegates to db-auto-doc generate-queries)",
1017
+ "description": "[v5.0 Migration] Scan metadata JSON files for entity names that need \"MJ: \" prefix updates.\n\nTargets the metadata/ directory used by \"mj sync\". Detects entity name references in\n@lookup: directives (both the entity name and lookup value), .mj-sync.json and\n.mj-folder.json config files (entity/entityName fields), relatedEntities object keys,\nand fields.Name values in Entities-managing folders. Runs in dry-run mode by default;\nuse --fix to apply.\n\nThe rename map is built dynamically from entity_subclasses.ts by parsing all\n@RegisterClass(BaseEntity, 'MJ: XYZ') decorators (~272 entries).",
1037
1018
  "examples": [
1038
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json",
1039
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --output-dir ./queries",
1040
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --queries-per-table 10"
1019
+ {
1020
+ "description": "Dry-run scan of the metadata directory",
1021
+ "command": "<%= config.bin %> <%= command.id %> --path metadata/"
1022
+ },
1023
+ {
1024
+ "description": "Apply fixes to metadata files",
1025
+ "command": "<%= config.bin %> <%= command.id %> --path metadata/ --fix"
1026
+ },
1027
+ {
1028
+ "description": "Scan a specific subdirectory",
1029
+ "command": "<%= config.bin %> <%= command.id %> --path metadata/resource-types"
1030
+ },
1031
+ {
1032
+ "description": "Scan and fix a single metadata file",
1033
+ "command": "<%= config.bin %> <%= command.id %> --path metadata/entities/.audit-related-entities.json --fix"
1034
+ }
1041
1035
  ],
1042
1036
  "flags": {
1043
- "from-state": {
1044
- "description": "Path to existing state.json file from previous analysis",
1045
- "name": "from-state",
1046
- "required": true,
1037
+ "path": {
1038
+ "char": "p",
1039
+ "description": "File or directory to scan. Accepts a single .json file or a directory (scanned recursively, including dotfiles like .mj-sync.json). Defaults to the current working directory.",
1040
+ "name": "path",
1047
1041
  "hasDynamicHelp": false,
1048
1042
  "multiple": false,
1049
1043
  "type": "option"
1050
1044
  },
1051
- "output-dir": {
1052
- "description": "Output directory for generated queries",
1053
- "name": "output-dir",
1054
- "required": false,
1055
- "hasDynamicHelp": false,
1056
- "multiple": false,
1057
- "type": "option"
1045
+ "fix": {
1046
+ "description": "Apply fixes in place. Without this flag, the command runs in dry-run mode and only reports findings.",
1047
+ "name": "fix",
1048
+ "allowNo": false,
1049
+ "type": "boolean"
1058
1050
  },
1059
- "config": {
1060
- "char": "c",
1061
- "description": "Path to config file (for database connection and AI settings)",
1062
- "name": "config",
1063
- "default": "./config.json",
1051
+ "entity-subclasses": {
1052
+ "description": "Explicit path to entity_subclasses.ts for building the rename map. If omitted, the tool searches common locations relative to the target path.",
1053
+ "name": "entity-subclasses",
1064
1054
  "hasDynamicHelp": false,
1065
1055
  "multiple": false,
1066
1056
  "type": "option"
1067
1057
  },
1068
- "queries-per-table": {
1069
- "description": "Number of queries to generate per table",
1070
- "name": "queries-per-table",
1071
- "required": false,
1072
- "hasDynamicHelp": false,
1073
- "multiple": false,
1074
- "type": "option"
1058
+ "quiet": {
1059
+ "char": "q",
1060
+ "description": "Suppress detailed per-file output; only show the final summary counts.",
1061
+ "name": "quiet",
1062
+ "allowNo": false,
1063
+ "type": "boolean"
1075
1064
  },
1076
- "max-execution-time": {
1077
- "description": "Maximum execution time for query validation (ms)",
1078
- "name": "max-execution-time",
1079
- "required": false,
1080
- "hasDynamicHelp": false,
1081
- "multiple": false,
1082
- "type": "option"
1065
+ "verbose": {
1066
+ "char": "v",
1067
+ "description": "Show detailed progress including each file being scanned.",
1068
+ "name": "verbose",
1069
+ "allowNo": false,
1070
+ "type": "boolean"
1083
1071
  }
1084
1072
  },
1085
1073
  "hasDynamicHelp": false,
1086
1074
  "hiddenAliases": [],
1087
- "id": "dbdoc:generate-queries",
1075
+ "id": "codegen:5-0-fix-metadata-names",
1088
1076
  "pluginAlias": "@memberjunction/cli",
1089
1077
  "pluginName": "@memberjunction/cli",
1090
1078
  "pluginType": "core",
@@ -1094,19 +1082,35 @@
1094
1082
  "relativePath": [
1095
1083
  "dist",
1096
1084
  "commands",
1097
- "dbdoc",
1098
- "generate-queries.js"
1085
+ "codegen",
1086
+ "5-0-fix-metadata-names.js"
1099
1087
  ]
1100
1088
  },
1101
- "dbdoc": {
1089
+ "codegen": {
1102
1090
  "aliases": [],
1103
1091
  "args": {},
1104
- "description": "AI-powered database documentation generator",
1105
- "flags": {},
1092
+ "description": "Run the full MemberJunction code generation pipeline.\n\nAnalyzes your SQL Server database schema, updates MemberJunction metadata, and\ngenerates synchronized code across the entire stack:\n\n - SQL views, stored procedures, indexes, and permissions\n - TypeScript entity classes with Zod validation schemas\n - Angular form components with AI-driven layouts\n - GraphQL resolvers and type definitions\n - Action subclasses and DB schema JSON\n\nConfiguration is loaded from mj.config.cjs in the current directory (or parent\ndirectories). Database connection can also be set via environment variables:\nDB_HOST, DB_DATABASE, CODEGEN_DB_USERNAME, CODEGEN_DB_PASSWORD.\n\nUse --skipdb to skip all database operations (metadata sync, SQL object\ngeneration) and only regenerate TypeScript, Angular, and GraphQL output from\nexisting metadata.",
1093
+ "examples": [
1094
+ {
1095
+ "command": "<%= config.bin %> <%= command.id %>",
1096
+ "description": "Run the full code generation pipeline"
1097
+ },
1098
+ {
1099
+ "command": "<%= config.bin %> <%= command.id %> --skipdb",
1100
+ "description": "Regenerate code files without touching the database"
1101
+ }
1102
+ ],
1103
+ "flags": {
1104
+ "skipdb": {
1105
+ "description": "Skip database operations (metadata sync, SQL generation). Only regenerate TypeScript entities, Angular components, and GraphQL resolvers from existing metadata.",
1106
+ "name": "skipdb",
1107
+ "allowNo": false,
1108
+ "type": "boolean"
1109
+ }
1110
+ },
1106
1111
  "hasDynamicHelp": false,
1107
- "hidden": false,
1108
1112
  "hiddenAliases": [],
1109
- "id": "dbdoc",
1113
+ "id": "codegen",
1110
1114
  "pluginAlias": "@memberjunction/cli",
1111
1115
  "pluginName": "@memberjunction/cli",
1112
1116
  "pluginType": "core",
@@ -1116,21 +1120,84 @@
1116
1120
  "relativePath": [
1117
1121
  "dist",
1118
1122
  "commands",
1119
- "dbdoc",
1123
+ "codegen",
1120
1124
  "index.js"
1121
1125
  ]
1122
1126
  },
1123
- "dbdoc:init": {
1127
+ "codegen:manifest": {
1124
1128
  "aliases": [],
1125
1129
  "args": {},
1126
- "description": "Initialize DBAutoDoc project (delegates to db-auto-doc init)",
1130
+ "description": "Generate a class registration manifest to prevent tree-shaking.\n\nMemberJunction uses @RegisterClass decorators with a dynamic class factory.\nModern bundlers (ESBuild, Vite) cannot detect dynamic instantiation and will\ntree-shake these classes out of production builds. This command scans the\ndependency tree for all @RegisterClass-decorated classes and emits a manifest\nfile with static imports that the bundler cannot eliminate.\n\nTypically used as a prebuild/prestart script for MJAPI and MJExplorer. For\nMJ distribution users, pre-built manifests ship inside @memberjunction/server-bootstrap\nand @memberjunction/ng-bootstrap -- use --exclude-packages @memberjunction to\ngenerate a supplemental manifest covering only your own application classes.",
1127
1131
  "examples": [
1128
- "<%= config.bin %> <%= command.id %>"
1132
+ {
1133
+ "command": "<%= config.bin %> <%= command.id %>",
1134
+ "description": "Generate manifest with default output path"
1135
+ },
1136
+ {
1137
+ "command": "<%= config.bin %> <%= command.id %> --appDir ./packages/MJAPI --output ./packages/MJAPI/src/generated/class-registrations-manifest.ts",
1138
+ "description": "Generate manifest for a specific application directory"
1139
+ },
1140
+ {
1141
+ "command": "<%= config.bin %> <%= command.id %> --exclude-packages @memberjunction",
1142
+ "description": "Exclude MJ packages (use pre-built bootstrap manifests instead)"
1143
+ },
1144
+ {
1145
+ "command": "<%= config.bin %> <%= command.id %> --filter BaseEngine --filter BaseAction --verbose",
1146
+ "description": "Only include specific base classes with detailed progress"
1147
+ }
1129
1148
  ],
1130
- "flags": {},
1149
+ "flags": {
1150
+ "output": {
1151
+ "char": "o",
1152
+ "description": "Output file path for the generated manifest. The file will contain named imports and a CLASS_REGISTRATIONS array.",
1153
+ "name": "output",
1154
+ "default": "./src/generated/class-registrations-manifest.ts",
1155
+ "hasDynamicHelp": false,
1156
+ "multiple": false,
1157
+ "type": "option"
1158
+ },
1159
+ "appDir": {
1160
+ "char": "a",
1161
+ "description": "Root directory of the application whose package.json dependency tree will be scanned. Defaults to the current working directory.",
1162
+ "name": "appDir",
1163
+ "hasDynamicHelp": false,
1164
+ "multiple": false,
1165
+ "type": "option"
1166
+ },
1167
+ "filter": {
1168
+ "char": "f",
1169
+ "description": "Only include classes extending this base class. Can be repeated (e.g., --filter BaseEngine --filter BaseAction).",
1170
+ "name": "filter",
1171
+ "hasDynamicHelp": false,
1172
+ "multiple": true,
1173
+ "type": "option"
1174
+ },
1175
+ "exclude-packages": {
1176
+ "char": "e",
1177
+ "description": "Skip packages whose name starts with this prefix. Useful for excluding @memberjunction packages when using pre-built bootstrap manifests. Can be repeated.",
1178
+ "name": "exclude-packages",
1179
+ "hasDynamicHelp": false,
1180
+ "multiple": true,
1181
+ "type": "option"
1182
+ },
1183
+ "quiet": {
1184
+ "char": "q",
1185
+ "description": "Suppress all output except errors.",
1186
+ "name": "quiet",
1187
+ "allowNo": false,
1188
+ "type": "boolean"
1189
+ },
1190
+ "verbose": {
1191
+ "char": "v",
1192
+ "description": "Show detailed progress including per-package scanning info and skipped classes.",
1193
+ "name": "verbose",
1194
+ "allowNo": false,
1195
+ "type": "boolean"
1196
+ }
1197
+ },
1131
1198
  "hasDynamicHelp": false,
1132
1199
  "hiddenAliases": [],
1133
- "id": "dbdoc:init",
1200
+ "id": "codegen:manifest",
1134
1201
  "pluginAlias": "@memberjunction/cli",
1135
1202
  "pluginName": "@memberjunction/cli",
1136
1203
  "pluginType": "core",
@@ -1140,30 +1207,39 @@
1140
1207
  "relativePath": [
1141
1208
  "dist",
1142
1209
  "commands",
1143
- "dbdoc",
1144
- "init.js"
1210
+ "codegen",
1211
+ "manifest.js"
1145
1212
  ]
1146
1213
  },
1147
- "dbdoc:reset": {
1214
+ "doctor": {
1148
1215
  "aliases": [],
1149
1216
  "args": {},
1150
- "description": "Reset analysis state (delegates to db-auto-doc reset)",
1217
+ "description": "Diagnose a MemberJunction installation",
1151
1218
  "examples": [
1152
1219
  "<%= config.bin %> <%= command.id %>",
1153
- "<%= config.bin %> <%= command.id %> --force"
1220
+ "<%= config.bin %> <%= command.id %> --dir ./my-mj-project",
1221
+ "<%= config.bin %> <%= command.id %> --verbose"
1154
1222
  ],
1155
1223
  "flags": {
1156
- "force": {
1157
- "char": "f",
1158
- "description": "Force reset without confirmation",
1159
- "name": "force",
1224
+ "dir": {
1225
+ "description": "Target directory to diagnose",
1226
+ "name": "dir",
1227
+ "default": ".",
1228
+ "hasDynamicHelp": false,
1229
+ "multiple": false,
1230
+ "type": "option"
1231
+ },
1232
+ "verbose": {
1233
+ "char": "v",
1234
+ "description": "Show detailed output including suggested fixes inline",
1235
+ "name": "verbose",
1160
1236
  "allowNo": false,
1161
1237
  "type": "boolean"
1162
1238
  }
1163
1239
  },
1164
1240
  "hasDynamicHelp": false,
1165
1241
  "hiddenAliases": [],
1166
- "id": "dbdoc:reset",
1242
+ "id": "doctor",
1167
1243
  "pluginAlias": "@memberjunction/cli",
1168
1244
  "pluginName": "@memberjunction/cli",
1169
1245
  "pluginType": "core",
@@ -1173,31 +1249,100 @@
1173
1249
  "relativePath": [
1174
1250
  "dist",
1175
1251
  "commands",
1176
- "dbdoc",
1177
- "reset.js"
1252
+ "doctor",
1253
+ "index.js"
1178
1254
  ]
1179
1255
  },
1180
- "dbdoc:status": {
1256
+ "install": {
1181
1257
  "aliases": [],
1182
1258
  "args": {},
1183
- "description": "Show analysis status and progress (delegates to db-auto-doc status)",
1259
+ "description": "Install MemberJunction from a GitHub release",
1184
1260
  "examples": [
1185
1261
  "<%= config.bin %> <%= command.id %>",
1186
- "<%= config.bin %> <%= command.id %> --state-file ./custom-state.json"
1262
+ "<%= config.bin %> <%= command.id %> -t v4.3.0",
1263
+ "<%= config.bin %> <%= command.id %> --dry-run",
1264
+ "<%= config.bin %> <%= command.id %> --yes"
1187
1265
  ],
1188
1266
  "flags": {
1189
- "state-file": {
1190
- "char": "s",
1191
- "description": "Path to state JSON file",
1192
- "name": "state-file",
1267
+ "tag": {
1268
+ "char": "t",
1269
+ "description": "Release tag to install (e.g. v4.3.0). If omitted, shows a version picker.",
1270
+ "name": "tag",
1193
1271
  "hasDynamicHelp": false,
1194
1272
  "multiple": false,
1195
1273
  "type": "option"
1274
+ },
1275
+ "dir": {
1276
+ "description": "Target directory for the installation",
1277
+ "name": "dir",
1278
+ "default": ".",
1279
+ "hasDynamicHelp": false,
1280
+ "multiple": false,
1281
+ "type": "option"
1282
+ },
1283
+ "config": {
1284
+ "char": "c",
1285
+ "description": "Path to JSON config file with install settings (database, auth, ports, etc.)",
1286
+ "name": "config",
1287
+ "hasDynamicHelp": false,
1288
+ "multiple": false,
1289
+ "type": "option"
1290
+ },
1291
+ "legacy": {
1292
+ "description": "Use the legacy interactive installer (ZIP-only distribution)",
1293
+ "hidden": true,
1294
+ "name": "legacy",
1295
+ "allowNo": false,
1296
+ "type": "boolean"
1297
+ },
1298
+ "dry-run": {
1299
+ "description": "Show the install plan without executing it",
1300
+ "name": "dry-run",
1301
+ "allowNo": false,
1302
+ "type": "boolean"
1303
+ },
1304
+ "yes": {
1305
+ "char": "y",
1306
+ "description": "Non-interactive mode: auto-select latest version and accept defaults",
1307
+ "name": "yes",
1308
+ "allowNo": false,
1309
+ "type": "boolean"
1310
+ },
1311
+ "verbose": {
1312
+ "char": "v",
1313
+ "description": "Show detailed output",
1314
+ "name": "verbose",
1315
+ "allowNo": false,
1316
+ "type": "boolean"
1317
+ },
1318
+ "skip-db": {
1319
+ "description": "Skip database provisioning phases",
1320
+ "name": "skip-db",
1321
+ "allowNo": false,
1322
+ "type": "boolean"
1323
+ },
1324
+ "skip-start": {
1325
+ "description": "Skip service startup and smoke tests",
1326
+ "name": "skip-start",
1327
+ "allowNo": false,
1328
+ "type": "boolean"
1329
+ },
1330
+ "no-resume": {
1331
+ "description": "Ignore any existing checkpoint and start fresh",
1332
+ "name": "no-resume",
1333
+ "allowNo": false,
1334
+ "type": "boolean"
1335
+ },
1336
+ "fast": {
1337
+ "description": "Fast mode: skip smoke test and optimize post-codegen steps. Re-run without --fast if you encounter issues.",
1338
+ "name": "fast",
1339
+ "allowNo": false,
1340
+ "type": "boolean"
1196
1341
  }
1197
1342
  },
1198
1343
  "hasDynamicHelp": false,
1199
1344
  "hiddenAliases": [],
1200
- "id": "dbdoc:status",
1345
+ "id": "install",
1201
1346
  "pluginAlias": "@memberjunction/cli",
1202
1347
  "pluginName": "@memberjunction/cli",
1203
1348
  "pluginType": "core",
@@ -1207,16 +1352,18 @@
1207
1352
  "relativePath": [
1208
1353
  "dist",
1209
1354
  "commands",
1210
- "dbdoc",
1211
- "status.js"
1355
+ "install",
1356
+ "index.js"
1212
1357
  ]
1213
1358
  },
1214
- "install": {
1359
+ "migrate": {
1215
1360
  "aliases": [],
1216
1361
  "args": {},
1217
- "description": "Install MemberJunction",
1362
+ "description": "Migrate MemberJunction database to latest version",
1218
1363
  "examples": [
1219
- "<%= config.bin %> <%= command.id %>\n"
1364
+ "<%= config.bin %> <%= command.id %>\n",
1365
+ "<%= config.bin %> <%= command.id %> --schema __BCSaaS --dir ./migrations/v1\n",
1366
+ "<%= config.bin %> <%= command.id %> --schema __BCSaaS --tag v1.0.0\n"
1220
1367
  ],
1221
1368
  "flags": {
1222
1369
  "verbose": {
@@ -1225,11 +1372,34 @@
1225
1372
  "name": "verbose",
1226
1373
  "allowNo": false,
1227
1374
  "type": "boolean"
1375
+ },
1376
+ "tag": {
1377
+ "char": "t",
1378
+ "description": "Version tag to use for running remote migrations",
1379
+ "name": "tag",
1380
+ "hasDynamicHelp": false,
1381
+ "multiple": false,
1382
+ "type": "option"
1383
+ },
1384
+ "schema": {
1385
+ "char": "s",
1386
+ "description": "Target schema (overrides coreSchema from config)",
1387
+ "name": "schema",
1388
+ "hasDynamicHelp": false,
1389
+ "multiple": false,
1390
+ "type": "option"
1391
+ },
1392
+ "dir": {
1393
+ "description": "Migration source directory (overrides migrationsLocation from config)",
1394
+ "name": "dir",
1395
+ "hasDynamicHelp": false,
1396
+ "multiple": false,
1397
+ "type": "option"
1228
1398
  }
1229
1399
  },
1230
1400
  "hasDynamicHelp": false,
1231
1401
  "hiddenAliases": [],
1232
- "id": "install",
1402
+ "id": "migrate",
1233
1403
  "pluginAlias": "@memberjunction/cli",
1234
1404
  "pluginName": "@memberjunction/cli",
1235
1405
  "pluginType": "core",
@@ -1239,7 +1409,7 @@
1239
1409
  "relativePath": [
1240
1410
  "dist",
1241
1411
  "commands",
1242
- "install",
1412
+ "migrate",
1243
1413
  "index.js"
1244
1414
  ]
1245
1415
  },
@@ -1458,42 +1628,52 @@
1458
1628
  "validate.js"
1459
1629
  ]
1460
1630
  },
1461
- "migrate": {
1631
+ "sql-audit": {
1462
1632
  "aliases": [],
1463
1633
  "args": {},
1464
- "description": "Migrate MemberJunction database to latest version",
1634
+ "description": "Compare source and target databases for migration verification",
1465
1635
  "examples": [
1466
- "<%= config.bin %> <%= command.id %>\n",
1467
- "<%= config.bin %> <%= command.id %> --schema __BCSaaS --dir ./migrations/v1\n",
1468
- "<%= config.bin %> <%= command.id %> --schema __BCSaaS --tag v1.0.0\n"
1636
+ "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\"",
1637
+ "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --output report.txt",
1638
+ "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --source-schema __mj --target-schema __mj"
1469
1639
  ],
1470
1640
  "flags": {
1471
- "verbose": {
1472
- "char": "v",
1473
- "description": "Enable additional logging",
1474
- "name": "verbose",
1475
- "allowNo": false,
1476
- "type": "boolean"
1641
+ "source": {
1642
+ "description": "Source database connection string (mssql://... or postgres://...)",
1643
+ "name": "source",
1644
+ "required": true,
1645
+ "hasDynamicHelp": false,
1646
+ "multiple": false,
1647
+ "type": "option"
1477
1648
  },
1478
- "tag": {
1479
- "char": "t",
1480
- "description": "Version tag to use for running remote migrations",
1481
- "name": "tag",
1649
+ "target": {
1650
+ "description": "Target database connection string (mssql://... or postgres://...)",
1651
+ "name": "target",
1652
+ "required": true,
1482
1653
  "hasDynamicHelp": false,
1483
1654
  "multiple": false,
1484
1655
  "type": "option"
1485
1656
  },
1486
- "schema": {
1487
- "char": "s",
1488
- "description": "Target schema (overrides coreSchema from config)",
1489
- "name": "schema",
1657
+ "source-schema": {
1658
+ "description": "Source schema name",
1659
+ "name": "source-schema",
1660
+ "default": "__mj",
1490
1661
  "hasDynamicHelp": false,
1491
1662
  "multiple": false,
1492
1663
  "type": "option"
1493
1664
  },
1494
- "dir": {
1495
- "description": "Migration source directory (overrides migrationsLocation from config)",
1496
- "name": "dir",
1665
+ "target-schema": {
1666
+ "description": "Target schema name",
1667
+ "name": "target-schema",
1668
+ "default": "__mj",
1669
+ "hasDynamicHelp": false,
1670
+ "multiple": false,
1671
+ "type": "option"
1672
+ },
1673
+ "output": {
1674
+ "char": "o",
1675
+ "description": "Save report to file",
1676
+ "name": "output",
1497
1677
  "hasDynamicHelp": false,
1498
1678
  "multiple": false,
1499
1679
  "type": "option"
@@ -1501,7 +1681,7 @@
1501
1681
  },
1502
1682
  "hasDynamicHelp": false,
1503
1683
  "hiddenAliases": [],
1504
- "id": "migrate",
1684
+ "id": "sql-audit",
1505
1685
  "pluginAlias": "@memberjunction/cli",
1506
1686
  "pluginName": "@memberjunction/cli",
1507
1687
  "pluginType": "core",
@@ -1511,7 +1691,92 @@
1511
1691
  "relativePath": [
1512
1692
  "dist",
1513
1693
  "commands",
1514
- "migrate",
1694
+ "sql-audit",
1695
+ "index.js"
1696
+ ]
1697
+ },
1698
+ "sql-convert": {
1699
+ "aliases": [],
1700
+ "args": {
1701
+ "source": {
1702
+ "description": "Source SQL file path",
1703
+ "name": "source",
1704
+ "required": true
1705
+ }
1706
+ },
1707
+ "description": "Convert SQL files between database dialects using rule-based BatchConverter engine",
1708
+ "examples": [
1709
+ "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres",
1710
+ "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --output converted.sql",
1711
+ "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --schema my_schema",
1712
+ "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --no-header --verbose"
1713
+ ],
1714
+ "flags": {
1715
+ "from": {
1716
+ "description": "Source SQL dialect",
1717
+ "name": "from",
1718
+ "required": true,
1719
+ "hasDynamicHelp": false,
1720
+ "multiple": false,
1721
+ "type": "option"
1722
+ },
1723
+ "to": {
1724
+ "description": "Target SQL dialect",
1725
+ "name": "to",
1726
+ "required": true,
1727
+ "hasDynamicHelp": false,
1728
+ "multiple": false,
1729
+ "type": "option"
1730
+ },
1731
+ "output": {
1732
+ "char": "o",
1733
+ "description": "Output file path (default: <source>.converted.<ext>)",
1734
+ "name": "output",
1735
+ "hasDynamicHelp": false,
1736
+ "multiple": false,
1737
+ "type": "option"
1738
+ },
1739
+ "schema": {
1740
+ "description": "Target schema name",
1741
+ "name": "schema",
1742
+ "default": "__mj",
1743
+ "hasDynamicHelp": false,
1744
+ "multiple": false,
1745
+ "type": "option"
1746
+ },
1747
+ "no-header": {
1748
+ "description": "Skip PG header (extensions, schema, implicit cast)",
1749
+ "name": "no-header",
1750
+ "allowNo": false,
1751
+ "type": "boolean"
1752
+ },
1753
+ "no-post-process": {
1754
+ "description": "Skip post-processing pass",
1755
+ "name": "no-post-process",
1756
+ "allowNo": false,
1757
+ "type": "boolean"
1758
+ },
1759
+ "verbose": {
1760
+ "char": "v",
1761
+ "description": "Show per-statement progress and detailed report",
1762
+ "name": "verbose",
1763
+ "allowNo": false,
1764
+ "type": "boolean"
1765
+ }
1766
+ },
1767
+ "hasDynamicHelp": false,
1768
+ "hiddenAliases": [],
1769
+ "id": "sql-convert",
1770
+ "pluginAlias": "@memberjunction/cli",
1771
+ "pluginName": "@memberjunction/cli",
1772
+ "pluginType": "core",
1773
+ "strict": true,
1774
+ "enableJsonFlag": false,
1775
+ "isESM": true,
1776
+ "relativePath": [
1777
+ "dist",
1778
+ "commands",
1779
+ "sql-convert",
1515
1780
  "index.js"
1516
1781
  ]
1517
1782
  },
@@ -2532,6 +2797,105 @@
2532
2797
  "validate.js"
2533
2798
  ]
2534
2799
  },
2800
+ "translate-sql": {
2801
+ "aliases": [],
2802
+ "args": {},
2803
+ "description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
2804
+ "examples": [
2805
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
2806
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
2807
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --sql \"SELECT TOP 10 [Name] FROM [Users]\"",
2808
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope all --output ./reports"
2809
+ ],
2810
+ "flags": {
2811
+ "from": {
2812
+ "description": "Source SQL dialect",
2813
+ "name": "from",
2814
+ "required": true,
2815
+ "hasDynamicHelp": false,
2816
+ "multiple": false,
2817
+ "options": [
2818
+ "sqlserver",
2819
+ "postgresql"
2820
+ ],
2821
+ "type": "option"
2822
+ },
2823
+ "to": {
2824
+ "description": "Target SQL dialect",
2825
+ "name": "to",
2826
+ "required": true,
2827
+ "hasDynamicHelp": false,
2828
+ "multiple": false,
2829
+ "options": [
2830
+ "sqlserver",
2831
+ "postgresql"
2832
+ ],
2833
+ "type": "option"
2834
+ },
2835
+ "scope": {
2836
+ "description": "What to scan for translation",
2837
+ "name": "scope",
2838
+ "default": "all",
2839
+ "hasDynamicHelp": false,
2840
+ "multiple": false,
2841
+ "options": [
2842
+ "queries",
2843
+ "views",
2844
+ "filters",
2845
+ "all"
2846
+ ],
2847
+ "type": "option"
2848
+ },
2849
+ "sql": {
2850
+ "description": "Translate a single SQL fragment (inline mode)",
2851
+ "name": "sql",
2852
+ "hasDynamicHelp": false,
2853
+ "multiple": false,
2854
+ "type": "option"
2855
+ },
2856
+ "dry-run": {
2857
+ "description": "Show what would be translated without making changes",
2858
+ "name": "dry-run",
2859
+ "allowNo": false,
2860
+ "type": "boolean"
2861
+ },
2862
+ "review": {
2863
+ "description": "Generate review report only (no writes to database)",
2864
+ "name": "review",
2865
+ "allowNo": false,
2866
+ "type": "boolean"
2867
+ },
2868
+ "output": {
2869
+ "char": "o",
2870
+ "description": "Output directory for the translation report",
2871
+ "name": "output",
2872
+ "hasDynamicHelp": false,
2873
+ "multiple": false,
2874
+ "type": "option"
2875
+ },
2876
+ "force": {
2877
+ "description": "Re-translate even if platform variants already exist",
2878
+ "name": "force",
2879
+ "allowNo": false,
2880
+ "type": "boolean"
2881
+ }
2882
+ },
2883
+ "hasDynamicHelp": false,
2884
+ "hiddenAliases": [],
2885
+ "id": "translate-sql",
2886
+ "pluginAlias": "@memberjunction/cli",
2887
+ "pluginName": "@memberjunction/cli",
2888
+ "pluginType": "core",
2889
+ "strict": true,
2890
+ "enableJsonFlag": false,
2891
+ "isESM": true,
2892
+ "relativePath": [
2893
+ "dist",
2894
+ "commands",
2895
+ "translate-sql",
2896
+ "index.js"
2897
+ ]
2898
+ },
2535
2899
  "ai:actions:list": {
2536
2900
  "aliases": [],
2537
2901
  "args": {},
@@ -3140,5 +3504,5 @@
3140
3504
  ]
3141
3505
  }
3142
3506
  },
3143
- "version": "5.4.1"
3507
+ "version": "5.6.0"
3144
3508
  }