@memberjunction/codegen-lib 2.47.0 → 2.49.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 (88) hide show
  1. package/dist/Angular/angular-codegen.d.ts +164 -6
  2. package/dist/Angular/angular-codegen.d.ts.map +1 -1
  3. package/dist/Angular/angular-codegen.js +179 -25
  4. package/dist/Angular/angular-codegen.js.map +1 -1
  5. package/dist/Angular/join-grid-related-entity-component.d.ts +52 -3
  6. package/dist/Angular/join-grid-related-entity-component.d.ts.map +1 -1
  7. package/dist/Angular/join-grid-related-entity-component.js +58 -3
  8. package/dist/Angular/join-grid-related-entity-component.js.map +1 -1
  9. package/dist/Angular/related-entity-components.d.ts +99 -42
  10. package/dist/Angular/related-entity-components.d.ts.map +1 -1
  11. package/dist/Angular/related-entity-components.js +116 -26
  12. package/dist/Angular/related-entity-components.js.map +1 -1
  13. package/dist/Angular/timeline-related-entity-component.d.ts +46 -7
  14. package/dist/Angular/timeline-related-entity-component.d.ts.map +1 -1
  15. package/dist/Angular/timeline-related-entity-component.js +64 -7
  16. package/dist/Angular/timeline-related-entity-component.js.map +1 -1
  17. package/dist/Angular/user-view-grid-related-entity-component.d.ts +33 -1
  18. package/dist/Angular/user-view-grid-related-entity-component.d.ts.map +1 -1
  19. package/dist/Angular/user-view-grid-related-entity-component.js +33 -1
  20. package/dist/Angular/user-view-grid-related-entity-component.js.map +1 -1
  21. package/dist/Config/config.d.ts +369 -45
  22. package/dist/Config/config.d.ts.map +1 -1
  23. package/dist/Config/config.js +136 -2
  24. package/dist/Config/config.js.map +1 -1
  25. package/dist/Config/db-connection.d.ts +17 -3
  26. package/dist/Config/db-connection.d.ts.map +1 -1
  27. package/dist/Config/db-connection.js +31 -19
  28. package/dist/Config/db-connection.js.map +1 -1
  29. package/dist/Database/dbSchema.d.ts +44 -1
  30. package/dist/Database/dbSchema.d.ts.map +1 -1
  31. package/dist/Database/dbSchema.js +46 -13
  32. package/dist/Database/dbSchema.js.map +1 -1
  33. package/dist/Database/manage-metadata.d.ts +52 -46
  34. package/dist/Database/manage-metadata.d.ts.map +1 -1
  35. package/dist/Database/manage-metadata.js +235 -191
  36. package/dist/Database/manage-metadata.js.map +1 -1
  37. package/dist/Database/reorder-columns.d.ts +2 -2
  38. package/dist/Database/reorder-columns.d.ts.map +1 -1
  39. package/dist/Database/reorder-columns.js +23 -17
  40. package/dist/Database/reorder-columns.js.map +1 -1
  41. package/dist/Database/sql.d.ts +4 -4
  42. package/dist/Database/sql.d.ts.map +1 -1
  43. package/dist/Database/sql.js +5 -16
  44. package/dist/Database/sql.js.map +1 -1
  45. package/dist/Database/sql_codegen.d.ts +15 -15
  46. package/dist/Database/sql_codegen.d.ts.map +1 -1
  47. package/dist/Database/sql_codegen.js +186 -123
  48. package/dist/Database/sql_codegen.js.map +1 -1
  49. package/dist/Misc/action_subclasses_codegen.d.ts.map +1 -1
  50. package/dist/Misc/action_subclasses_codegen.js +2 -12
  51. package/dist/Misc/action_subclasses_codegen.js.map +1 -1
  52. package/dist/Misc/advanced_generation.d.ts.map +1 -1
  53. package/dist/Misc/advanced_generation.js +82 -92
  54. package/dist/Misc/advanced_generation.js.map +1 -1
  55. package/dist/Misc/createNewUser.d.ts.map +1 -1
  56. package/dist/Misc/createNewUser.js +2 -12
  57. package/dist/Misc/createNewUser.js.map +1 -1
  58. package/dist/Misc/entity_subclasses_codegen.d.ts +5 -5
  59. package/dist/Misc/entity_subclasses_codegen.d.ts.map +1 -1
  60. package/dist/Misc/entity_subclasses_codegen.js +12 -20
  61. package/dist/Misc/entity_subclasses_codegen.js.map +1 -1
  62. package/dist/Misc/graphql_server_codegen.d.ts.map +1 -1
  63. package/dist/Misc/graphql_server_codegen.js +35 -40
  64. package/dist/Misc/graphql_server_codegen.js.map +1 -1
  65. package/dist/Misc/runCommand.d.ts.map +1 -1
  66. package/dist/Misc/runCommand.js +2 -12
  67. package/dist/Misc/runCommand.js.map +1 -1
  68. package/dist/Misc/sql_logging.d.ts +2 -2
  69. package/dist/Misc/sql_logging.d.ts.map +1 -1
  70. package/dist/Misc/sql_logging.js +4 -3
  71. package/dist/Misc/sql_logging.js.map +1 -1
  72. package/dist/Misc/status_logging.d.ts +37 -0
  73. package/dist/Misc/status_logging.d.ts.map +1 -1
  74. package/dist/Misc/status_logging.js +147 -14
  75. package/dist/Misc/status_logging.js.map +1 -1
  76. package/dist/Misc/system_integrity.d.ts +9 -9
  77. package/dist/Misc/system_integrity.d.ts.map +1 -1
  78. package/dist/Misc/system_integrity.js +23 -21
  79. package/dist/Misc/system_integrity.js.map +1 -1
  80. package/dist/index.d.ts +45 -7
  81. package/dist/index.d.ts.map +1 -1
  82. package/dist/index.js +51 -7
  83. package/dist/index.js.map +1 -1
  84. package/dist/runCodeGen.d.ts +84 -6
  85. package/dist/runCodeGen.d.ts.map +1 -1
  86. package/dist/runCodeGen.js +244 -93
  87. package/dist/runCodeGen.js.map +1 -1
  88. package/package.json +14 -14
@@ -1,19 +1,97 @@
1
+ /**
2
+ * Main orchestrator for the MemberJunction code generation process.
3
+ * Coordinates all aspects of code generation including database schema analysis,
4
+ * metadata management, SQL generation, TypeScript entities, Angular components,
5
+ * GraphQL resolvers, and more.
6
+ */
1
7
  import { SQLServerDataProvider } from '@memberjunction/sqlserver-dataprovider';
2
8
  /**
3
- * This class is the main entry point for running the code generation process. It will handle all the steps required to generate the code for the MemberJunction system. You can sub-class this class
4
- * and override specific methods as desired to customize the code generation process.
9
+ * Main orchestrator class for the MemberJunction code generation process.
10
+ *
11
+ * This class coordinates a comprehensive code generation pipeline that transforms
12
+ * database schemas into a complete, type-safe, full-stack application. The process includes:
13
+ *
14
+ * **Pipeline Steps:**
15
+ * 1. **Database Setup** - Initialize connections and metadata
16
+ * 2. **Metadata Management** - Analyze schema changes and update metadata
17
+ * 3. **SQL Generation** - Create views, procedures, and indexes
18
+ * 4. **TypeScript Entities** - Generate entity classes with validation
19
+ * 5. **Angular Components** - Create forms and UI components
20
+ * 6. **GraphQL Resolvers** - Generate API endpoints
21
+ * 7. **Action Classes** - Create business logic containers
22
+ * 8. **Documentation** - Generate schema JSON for AI/documentation
23
+ * 9. **Post-processing** - Run commands and integrity checks
24
+ *
25
+ * **Customization:**
26
+ * You can sub-class this class and override specific methods to customize
27
+ * the code generation process for your specific needs.
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * const codeGen = new RunCodeGenBase();
32
+ * await codeGen.Run(); // Full generation
33
+ * await codeGen.Run(true); // Skip database operations
34
+ * ```
5
35
  */
6
36
  export declare class RunCodeGenBase {
7
37
  /**
8
- * This method is called to setup the data source for the code generation process. You can override this method to customize the data source setup process.
38
+ * Sets up the SQL Server data source and initializes the MemberJunction core metadata.
39
+ * This method establishes the database connection pool and configures the data provider
40
+ * that will be used throughout the code generation process.
41
+ *
42
+ * Override this method to customize the data source setup process for different
43
+ * database providers or connection configurations.
44
+ *
45
+ * @returns Promise resolving to the configured SQLServerDataProvider instance
46
+ * @throws Error if connection setup fails
9
47
  */
10
48
  setupDataSource(): Promise<SQLServerDataProvider>;
11
49
  /**
12
- * Main entry point to run the code generation process. This method will handle all the steps required to generate the code for the MemberJunction system. You can sub-class this class and
13
- * override this method to customize the code generation process.
14
- * @param skipDatabaseGeneration
50
+ * Main entry point for the complete code generation process.
51
+ *
52
+ * Orchestrates the entire pipeline from database schema analysis to final code output.
53
+ * The process is highly configurable through the configuration file and can be
54
+ * partially skipped for faster iteration during development.
55
+ *
56
+ * **Process Flow:**
57
+ * 1. Initialize data sources and user context
58
+ * 2. Execute pre-generation commands and scripts
59
+ * 3. Manage metadata and schema changes
60
+ * 4. Generate SQL objects (views, procedures, indexes)
61
+ * 5. Generate TypeScript entity classes
62
+ * 6. Generate Angular UI components
63
+ * 7. Generate GraphQL API resolvers
64
+ * 8. Generate Action business logic classes
65
+ * 9. Create documentation JSON
66
+ * 10. Run integrity checks
67
+ * 11. Execute post-generation commands
68
+ *
69
+ * @param skipDatabaseGeneration If true, skips all database-related operations
70
+ * (metadata management, SQL generation). Useful for faster UI-only regeneration.
71
+ * @throws Error if any critical step fails
72
+ * @returns Promise that resolves when generation is complete
15
73
  */
16
74
  Run(skipDatabaseGeneration?: boolean): Promise<void>;
17
75
  }
76
+ /**
77
+ * Convenience function to run the MemberJunction code generation process.
78
+ * Creates a new instance of RunCodeGenBase and executes the full generation pipeline.
79
+ *
80
+ * This is the recommended way to trigger code generation from external scripts
81
+ * or applications.
82
+ *
83
+ * @param skipDatabaseGeneration Whether to skip database-related operations
84
+ * @returns Promise that resolves when generation is complete
85
+ * @throws Error if generation fails
86
+ *
87
+ * @example
88
+ * ```typescript
89
+ * // Full generation
90
+ * await runMemberJunctionCodeGeneration();
91
+ *
92
+ * // Skip database operations for faster UI generation
93
+ * await runMemberJunctionCodeGeneration(true);
94
+ * ```
95
+ */
18
96
  export declare function runMemberJunctionCodeGeneration(skipDatabaseGeneration?: boolean): Promise<void>;
19
97
  //# sourceMappingURL=runCodeGen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runCodeGen.d.ts","sourceRoot":"","sources":["../src/runCodeGen.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAmC,MAAM,wCAAwC,CAAC;AAmBhH;;;GAGG;AACH,qBACa,cAAc;IACzB;;OAEG;IACU,eAAe,IAAI,OAAO,CAAC,qBAAqB,CAAC;IAoB9D;;;;OAIG;IACU,GAAG,CAAC,sBAAsB,GAAE,OAAe;CAgQzD;AAED,wBAAsB,+BAA+B,CAAC,sBAAsB,GAAE,OAAe,iBAG5F"}
1
+ {"version":3,"file":"runCodeGen.d.ts","sourceRoot":"","sources":["../src/runCodeGen.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,qBAAqB,EAAmC,MAAM,wCAAwC,CAAC;AAoBhH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,cAAc;IACzB;;;;;;;;;;OAUG;IACU,eAAe,IAAI,OAAO,CAAC,qBAAqB,CAAC;IAY9D;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACU,GAAG,CAAC,sBAAsB,GAAE,OAAe;CAoUzD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,+BAA+B,CAAC,sBAAsB,GAAE,OAAe,iBAG5F"}