@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.
- package/dist/Angular/angular-codegen.d.ts +164 -6
- package/dist/Angular/angular-codegen.d.ts.map +1 -1
- package/dist/Angular/angular-codegen.js +179 -25
- package/dist/Angular/angular-codegen.js.map +1 -1
- package/dist/Angular/join-grid-related-entity-component.d.ts +52 -3
- package/dist/Angular/join-grid-related-entity-component.d.ts.map +1 -1
- package/dist/Angular/join-grid-related-entity-component.js +58 -3
- package/dist/Angular/join-grid-related-entity-component.js.map +1 -1
- package/dist/Angular/related-entity-components.d.ts +99 -42
- package/dist/Angular/related-entity-components.d.ts.map +1 -1
- package/dist/Angular/related-entity-components.js +116 -26
- package/dist/Angular/related-entity-components.js.map +1 -1
- package/dist/Angular/timeline-related-entity-component.d.ts +46 -7
- package/dist/Angular/timeline-related-entity-component.d.ts.map +1 -1
- package/dist/Angular/timeline-related-entity-component.js +64 -7
- package/dist/Angular/timeline-related-entity-component.js.map +1 -1
- package/dist/Angular/user-view-grid-related-entity-component.d.ts +33 -1
- package/dist/Angular/user-view-grid-related-entity-component.d.ts.map +1 -1
- package/dist/Angular/user-view-grid-related-entity-component.js +33 -1
- package/dist/Angular/user-view-grid-related-entity-component.js.map +1 -1
- package/dist/Config/config.d.ts +369 -45
- package/dist/Config/config.d.ts.map +1 -1
- package/dist/Config/config.js +136 -2
- package/dist/Config/config.js.map +1 -1
- package/dist/Config/db-connection.d.ts +17 -3
- package/dist/Config/db-connection.d.ts.map +1 -1
- package/dist/Config/db-connection.js +31 -19
- package/dist/Config/db-connection.js.map +1 -1
- package/dist/Database/dbSchema.d.ts +44 -1
- package/dist/Database/dbSchema.d.ts.map +1 -1
- package/dist/Database/dbSchema.js +46 -13
- package/dist/Database/dbSchema.js.map +1 -1
- package/dist/Database/manage-metadata.d.ts +52 -46
- package/dist/Database/manage-metadata.d.ts.map +1 -1
- package/dist/Database/manage-metadata.js +235 -191
- package/dist/Database/manage-metadata.js.map +1 -1
- package/dist/Database/reorder-columns.d.ts +2 -2
- package/dist/Database/reorder-columns.d.ts.map +1 -1
- package/dist/Database/reorder-columns.js +23 -17
- package/dist/Database/reorder-columns.js.map +1 -1
- package/dist/Database/sql.d.ts +4 -4
- package/dist/Database/sql.d.ts.map +1 -1
- package/dist/Database/sql.js +5 -16
- package/dist/Database/sql.js.map +1 -1
- package/dist/Database/sql_codegen.d.ts +15 -15
- package/dist/Database/sql_codegen.d.ts.map +1 -1
- package/dist/Database/sql_codegen.js +186 -123
- package/dist/Database/sql_codegen.js.map +1 -1
- package/dist/Misc/action_subclasses_codegen.d.ts.map +1 -1
- package/dist/Misc/action_subclasses_codegen.js +2 -12
- package/dist/Misc/action_subclasses_codegen.js.map +1 -1
- package/dist/Misc/advanced_generation.d.ts.map +1 -1
- package/dist/Misc/advanced_generation.js +82 -92
- package/dist/Misc/advanced_generation.js.map +1 -1
- package/dist/Misc/createNewUser.d.ts.map +1 -1
- package/dist/Misc/createNewUser.js +2 -12
- package/dist/Misc/createNewUser.js.map +1 -1
- package/dist/Misc/entity_subclasses_codegen.d.ts +5 -5
- package/dist/Misc/entity_subclasses_codegen.d.ts.map +1 -1
- package/dist/Misc/entity_subclasses_codegen.js +12 -20
- package/dist/Misc/entity_subclasses_codegen.js.map +1 -1
- package/dist/Misc/graphql_server_codegen.d.ts.map +1 -1
- package/dist/Misc/graphql_server_codegen.js +35 -40
- package/dist/Misc/graphql_server_codegen.js.map +1 -1
- package/dist/Misc/runCommand.d.ts.map +1 -1
- package/dist/Misc/runCommand.js +2 -12
- package/dist/Misc/runCommand.js.map +1 -1
- package/dist/Misc/sql_logging.d.ts +2 -2
- package/dist/Misc/sql_logging.d.ts.map +1 -1
- package/dist/Misc/sql_logging.js +4 -3
- package/dist/Misc/sql_logging.js.map +1 -1
- package/dist/Misc/status_logging.d.ts +37 -0
- package/dist/Misc/status_logging.d.ts.map +1 -1
- package/dist/Misc/status_logging.js +147 -14
- package/dist/Misc/status_logging.js.map +1 -1
- package/dist/Misc/system_integrity.d.ts +9 -9
- package/dist/Misc/system_integrity.d.ts.map +1 -1
- package/dist/Misc/system_integrity.js +23 -21
- package/dist/Misc/system_integrity.js.map +1 -1
- package/dist/index.d.ts +45 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +51 -7
- package/dist/index.js.map +1 -1
- package/dist/runCodeGen.d.ts +84 -6
- package/dist/runCodeGen.d.ts.map +1 -1
- package/dist/runCodeGen.js +244 -93
- package/dist/runCodeGen.js.map +1 -1
- package/package.json +14 -14
package/dist/runCodeGen.d.ts
CHANGED
|
@@ -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
|
-
*
|
|
4
|
-
*
|
|
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
|
-
*
|
|
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
|
|
13
|
-
*
|
|
14
|
-
*
|
|
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
|
package/dist/runCodeGen.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runCodeGen.d.ts","sourceRoot":"","sources":["../src/runCodeGen.ts"],"names":[],"mappings":"
|
|
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"}
|