@memberjunction/codegen-lib 1.0.4 → 1.0.7-next.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 (58) hide show
  1. package/dist/advanced_generation.d.ts +3 -0
  2. package/dist/advanced_generation.d.ts.map +1 -1
  3. package/dist/advanced_generation.js +39 -26
  4. package/dist/advanced_generation.js.map +1 -1
  5. package/dist/angular_client_codegen.d.ts +45 -2
  6. package/dist/angular_client_codegen.d.ts.map +1 -1
  7. package/dist/angular_client_codegen.js +423 -399
  8. package/dist/angular_client_codegen.js.map +1 -1
  9. package/dist/createNewUser.d.ts +6 -1
  10. package/dist/createNewUser.d.ts.map +1 -1
  11. package/dist/createNewUser.js +68 -53
  12. package/dist/createNewUser.js.map +1 -1
  13. package/dist/dbSchema.d.ts +10 -3
  14. package/dist/dbSchema.d.ts.map +1 -1
  15. package/dist/dbSchema.js +144 -130
  16. package/dist/dbSchema.js.map +1 -1
  17. package/dist/entity_subclasses_codegen.d.ts +11 -6
  18. package/dist/entity_subclasses_codegen.d.ts.map +1 -1
  19. package/dist/entity_subclasses_codegen.js +144 -131
  20. package/dist/entity_subclasses_codegen.js.map +1 -1
  21. package/dist/graphql_server_codegen.d.ts +28 -5
  22. package/dist/graphql_server_codegen.d.ts.map +1 -1
  23. package/dist/graphql_server_codegen.js +552 -531
  24. package/dist/graphql_server_codegen.js.map +1 -1
  25. package/dist/logging.d.ts +20 -0
  26. package/dist/logging.d.ts.map +1 -1
  27. package/dist/logging.js +61 -26
  28. package/dist/logging.js.map +1 -1
  29. package/dist/manageMetadata.d.ts +128 -7
  30. package/dist/manageMetadata.d.ts.map +1 -1
  31. package/dist/manageMetadata.js +992 -898
  32. package/dist/manageMetadata.js.map +1 -1
  33. package/dist/runCodeGen.d.ts +16 -0
  34. package/dist/runCodeGen.d.ts.map +1 -1
  35. package/dist/runCodeGen.js +185 -140
  36. package/dist/runCodeGen.js.map +1 -1
  37. package/dist/runCommand.d.ts +7 -2
  38. package/dist/runCommand.d.ts.map +1 -1
  39. package/dist/runCommand.js +104 -90
  40. package/dist/runCommand.js.map +1 -1
  41. package/dist/sql.d.ts +21 -16
  42. package/dist/sql.d.ts.map +1 -1
  43. package/dist/sql.js +98 -87
  44. package/dist/sql.js.map +1 -1
  45. package/dist/sql_codegen.d.ts +56 -13
  46. package/dist/sql_codegen.d.ts.map +1 -1
  47. package/dist/sql_codegen.js +836 -795
  48. package/dist/sql_codegen.js.map +1 -1
  49. package/dist/util.js +0 -2
  50. package/dist/util.js.map +1 -1
  51. package/package.json +32 -32
  52. package/readme.md +2 -2
  53. package/dist/graphql_client_codegen.d.ts +0 -4
  54. package/dist/graphql_client_codegen.js +0 -161
  55. package/dist/graphql_client_codegen.js.map +0 -1
  56. package/dist/react_client_codegen.d.ts +0 -4
  57. package/dist/react_client_codegen.js +0 -147
  58. package/dist/react_client_codegen.js.map +0 -1
@@ -13,6 +13,9 @@ export type PromptDefinition = {
13
13
  systemPrompt: string;
14
14
  userMessage: string;
15
15
  };
16
+ /**
17
+ * This class is responsible for managing the advanced generation capabilities of the system. You can override the class to provide your own implementation.
18
+ */
16
19
  export declare class AdvancedGeneration {
17
20
  private static _prompts;
18
21
  private static _cachedLLM;
@@ -1 +1 @@
1
- {"version":3,"file":"advanced_generation.d.ts","sourceRoot":"","sources":["../src/advanced_generation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAc,MAAM,UAAU,CAAC;AAIjE,MAAM,MAAM,gBAAgB,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAA;AACxE,MAAM,MAAM,uBAAuB,GAAG;IAAE,iBAAiB,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAA;AACtF,MAAM,MAAM,gBAAgB,GAAG;IAAE,OAAO,EAAE,MA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AO,CAAC,MAAM,CAAC,QAAQ,CA8BrB;IAEF,OAAO,CAAC,MAAM,CAAC,UAAU,CAAiB;IAE1C,IAAW,OAAO,IAAI,MAAM,CAE3B;IACD,IAAW,QAAQ,IAAI,MAAM,CAE5B;IACD,IAAW,OAAO,IAAI,OAAO,CAG5B;IAEM,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB;IAanD,IAAW,GAAG,IAAI,OAAO,CAWxB;IAEM,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,MAAM;IAIzE,QAAQ,IAAI,yBAAyB,EAAE;IAIvC,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,yBAAyB;IAI1D,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;CAGtD"}
@@ -1,11 +1,21 @@
1
1
  "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var AdvancedGeneration_1;
2
9
  Object.defineProperty(exports, "__esModule", { value: true });
3
10
  exports.AdvancedGeneration = void 0;
4
11
  const ai_1 = require("@memberjunction/ai");
5
12
  const config_1 = require("./config");
6
13
  const global_1 = require("@memberjunction/global");
7
14
  const core_1 = require("@memberjunction/core");
8
- class AdvancedGeneration {
15
+ /**
16
+ * This class is responsible for managing the advanced generation capabilities of the system. You can override the class to provide your own implementation.
17
+ */
18
+ let AdvancedGeneration = AdvancedGeneration_1 = class AdvancedGeneration {
9
19
  get AIModel() {
10
20
  return config_1.configInfo.advancedGeneration?.AIModel;
11
21
  }
@@ -17,7 +27,7 @@ class AdvancedGeneration {
17
27
  // return configInfo.advancedGeneration?.enableAdvancedGeneration;
18
28
  }
19
29
  getPrompt(feature) {
20
- const defaultPrompt = AdvancedGeneration._prompts.find(p => p.feature.trim().toLowerCase() === feature.trim().toLowerCase());
30
+ const defaultPrompt = AdvancedGeneration_1._prompts.find(p => p.feature.trim().toLowerCase() === feature.trim().toLowerCase());
21
31
  const result = { ...defaultPrompt };
22
32
  const featureInfo = this.getFeature(feature);
23
33
  if (featureInfo && featureInfo.systemPrompt) {
@@ -29,12 +39,12 @@ class AdvancedGeneration {
29
39
  return result;
30
40
  }
31
41
  get LLM() {
32
- if (AdvancedGeneration._cachedLLM) {
33
- return AdvancedGeneration._cachedLLM;
42
+ if (AdvancedGeneration_1._cachedLLM) {
43
+ return AdvancedGeneration_1._cachedLLM;
34
44
  }
35
45
  else if (config_1.configInfo.advancedGeneration.AIVendor && config_1.configInfo.advancedGeneration.AIVendor.length > 0) {
36
- AdvancedGeneration._cachedLLM = global_1.MJGlobal.Instance.ClassFactory.CreateInstance(ai_1.BaseLLM, config_1.configInfo.advancedGeneration.AIVendor, (0, ai_1.GetAIAPIKey)(config_1.configInfo.advancedGeneration.AIVendor));
37
- return AdvancedGeneration._cachedLLM;
46
+ AdvancedGeneration_1._cachedLLM = global_1.MJGlobal.Instance.ClassFactory.CreateInstance(ai_1.BaseLLM, config_1.configInfo.advancedGeneration.AIVendor, (0, ai_1.GetAIAPIKey)(config_1.configInfo.advancedGeneration.AIVendor));
47
+ return AdvancedGeneration_1._cachedLLM;
38
48
  }
39
49
  else {
40
50
  (0, core_1.LogError)("AdvancedGeneration", "No AI vendor specified in Configuration Settings under 'advancedGeneration.AIVendor'");
@@ -52,38 +62,41 @@ class AdvancedGeneration {
52
62
  featureEnabled(featureName) {
53
63
  return this.enabled && this.getFeature(featureName)?.enabled;
54
64
  }
55
- }
65
+ };
56
66
  exports.AdvancedGeneration = AdvancedGeneration;
57
67
  AdvancedGeneration._prompts = [
58
68
  {
59
69
  feature: 'EntityNames',
60
- systemPrompt: `I am a bot. I am trying to generate a new entity name for the table \${TableName}. In our system, an entity name is plural and is user-facing so it should have spaces if the table name is camel case or has underscores or other similar delimiter-style.
61
- I am a bot and need you to response with this JSON format only. I will not be able to read anything else.
62
-
63
- TypeScript type provided here:
64
- type EntityNameResult = {
65
- entityName: string,
66
- tableName: string
67
- }
68
-
70
+ systemPrompt: `I am a bot. I am trying to generate a new entity name for the table \${TableName}. In our system, an entity name is plural and is user-facing so it should have spaces if the table name is camel case or has underscores or other similar delimiter-style.
71
+ I am a bot and need you to response with this JSON format only. I will not be able to read anything else.
72
+
73
+ TypeScript type provided here:
74
+ type EntityNameResult = {
75
+ entityName: string,
76
+ tableName: string
77
+ }
78
+
69
79
  IMPORTANT: DO NOT USE MARKDOWN - Just emit pure JSON with no preceding or trailing text. I must be able to pass your response directly to JSON.parse()`,
70
80
  userMessage: "The table name for the new entity is ${TableName}, please provide me a suggested entity name using the rules I provided."
71
81
  },
72
82
  {
73
83
  feature: 'EntityDescriptions',
74
- systemPrompt: `I am a bot. I am going to provide you with a table name and entity name as well as the list of fields.
75
- Using your knowledge of the world and the table name and field list, create a brief description for the entity that an end-user would understand.
76
- I am a bot and need you to response with this JSON format only.
77
-
78
- TypeScript type provided here:
79
- type EntityDescriptionResult = {
80
- entityDescription: string,
81
- tableName: string
82
- }
83
-
84
+ systemPrompt: `I am a bot. I am going to provide you with a table name and entity name as well as the list of fields.
85
+ Using your knowledge of the world and the table name and field list, create a brief description for the entity that an end-user would understand.
86
+ I am a bot and need you to response with this JSON format only.
87
+
88
+ TypeScript type provided here:
89
+ type EntityDescriptionResult = {
90
+ entityDescription: string,
91
+ tableName: string
92
+ }
93
+
84
94
  IMPORTANT: DO NOT USE MARKDOWN - Just emit pure JSON with no preceding or trailing text. I must be able to pass your response directly to JSON.parse()`,
85
95
  userMessage: ""
86
96
  },
87
97
  ];
88
98
  AdvancedGeneration._cachedLLM = null;
99
+ exports.AdvancedGeneration = AdvancedGeneration = AdvancedGeneration_1 = __decorate([
100
+ (0, global_1.RegisterClass)(AdvancedGeneration)
101
+ ], AdvancedGeneration);
89
102
  //# sourceMappingURL=advanced_generation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"advanced_generation.js","sourceRoot":"","sources":["../src/advanced_generation.ts"],"names":[],"mappings":";;;AAAA,2CAA0D;AAC1D,qCAAiE;AACjE,mDAAkD;AAClD,+CAAgD;AAKhD,MAAa,kBAAkB;IAmC3B,IAAW,OAAO;QACd,OAAO,mBAAU,CAAC,kBAAkB,EAAE,OAAO,CAAC;IAClD,CAAC;IACD,IAAW,QAAQ;QACf,OAAO,mBAAU,CAAC,kBAAkB,EAAE,QAAQ,CAAC;IACnD,CAAC;IACD,IAAW,OAAO;QACd,OAAO,KAAK,CAAC,CAAC,6LAA6L;QAC/M,mEAAmE;IACnE,CAAC;IAEM,SAAS,CAAC,OAAe;QAC5B,MAAM,aAAa,GAAG,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;QAC7H,MAAM,MAAM,GAAqB,EAAC,GAAG,aAAa,EAAC,CAAC;QACpD,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC7C,IAAI,WAAW,IAAI,WAAW,CAAC,YAAY,EAAE,CAAC;YAC1C,MAAM,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC;QACnD,CAAC;QACD,IAAI,WAAW,IAAI,WAAW,CAAC,WAAW,EAAE,CAAC;YACzC,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC;QACjD,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CA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tB,YAAY,EAAE;;;;;;;;;mLASyJ;QACvK,WAAW,EAAE,0HAA0H;KAC1I;IACD;QACI,OAAO,EAAE,oBAAoB;QAC7B,YAAY,EAAE;;;;;;;;;;mLAUyJ;QACvK,WAAW,EAAE,EAAE;KAClB;CACJ,AA9BsB,CA8BrB;AAEa,6BAAU,GAAY,IAAI,AAAhB,CAAiB;6BAjCjC,kBAAkB;IAD9B,IAAA,sBAAa,EAAC,kBAAkB,CAAC;GACrB,kBAAkB,CAuF9B"}
@@ -1,3 +1,46 @@
1
- import { EntityInfo } from '@memberjunction/core';
2
- export declare function generateAngularCode(entities: EntityInfo[], directory: string, modulePrefix: string): boolean;
1
+ import { EntityInfo, EntityFieldInfo, GeneratedFormSectionType } from '@memberjunction/core';
2
+ export declare class AngularFormSectionInfo {
3
+ Type: GeneratedFormSectionType;
4
+ Name: string;
5
+ ClassName: string;
6
+ FileName: string;
7
+ ComponentCode: string;
8
+ TabCode: string;
9
+ Fields: EntityFieldInfo[];
10
+ FileNameWithoutExtension: string;
11
+ EntityClassName: string;
12
+ }
13
+ /**
14
+ * Base class for generating Angular client code, you can sub-class this class to create your own Angular client code generator logic
15
+ */
16
+ export declare class AngularClientGeneratorBase {
17
+ generateAngularCode(entities: EntityInfo[], directory: string, modulePrefix: string): boolean;
18
+ protected generateAngularModule(componentImports: string[], componentNames: string[], sections: AngularFormSectionInfo[], modulePrefix: string, maxComponentsPerModule?: number): string;
19
+ protected generateAngularModuleCode(componentNames: string[], sections: AngularFormSectionInfo[], maxComponentsPerModule: number, modulePrefix: string): string;
20
+ protected subModule_BaseName: string;
21
+ /**
22
+ * Get the base name for the sub-modules, override this method to change the base name. Defaults to 'GeneratedForms_SubModule_'
23
+ */
24
+ get SubModuleBaseName(): string;
25
+ protected generateSubModuleEnding(moduleNumber: number): string;
26
+ protected generateSingleEntityTypeScriptForAngular(entity: EntityInfo, sections: AngularFormSectionInfo[]): string;
27
+ protected entityHasTopArea(entity: EntityInfo): boolean;
28
+ protected generateTopAreaHTMLForAngular(entity: EntityInfo): string;
29
+ protected AddSectionIfNeeded(entity: EntityInfo, sections: AngularFormSectionInfo[], type: GeneratedFormSectionType, name: string): void;
30
+ protected generateAngularAdditionalSections(entity: EntityInfo, startIndex: number): AngularFormSectionInfo[];
31
+ protected generateSectionHTMLForAngular(entity: EntityInfo, section: AngularFormSectionInfo): {
32
+ readModeHTML: string;
33
+ editModeHTML: string;
34
+ };
35
+ protected generateRelatedEntityTabs(entity: EntityInfo, startIndex: number): string[];
36
+ protected stripWhiteSpace(s: string): string;
37
+ protected generateSingleEntityHTMLForAngular(entity: EntityInfo): {
38
+ htmlCode: string;
39
+ sections: AngularFormSectionInfo[];
40
+ };
41
+ protected generateSingleEntityHTMLWithSplitterForAngular(topArea: any, additionalSections: any, relatedEntitySections: any): string;
42
+ protected innerTopAreaHTML(topArea: string): string;
43
+ protected innerTabStripHTML(additionalSections: any, relatedEntitySections: any): string;
44
+ protected generateSingleEntityHTMLWithOUTSplitterForAngular(topArea: any, additionalSections: any, relatedEntitySections: any): string;
45
+ }
3
46
  //# sourceMappingURL=angular_client_codegen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"angular_client_codegen.d.ts","sourceRoot":"","sources":["../src/angular_client_codegen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA0F,MAAM,sBAAsB,CAAC;AAkB1I,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAyD5G"}
1
+ {"version":3,"file":"angular_client_codegen.d.ts","sourceRoot":"","sources":["../src/angular_client_codegen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,wBAAwB,EAA+C,MAAM,sBAAsB,CAAC;AAO1I,qBAAa,sBAAsB;IAC/B,IAAI,EAAE,wBAAwB,CAAA;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,SAA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