@cparra/apexdocs 2.1.4 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +2 -1
  2. package/ROADMAP.md +7 -7
  3. package/docs/Misc/SampleClassWithoutModifier.md +11 -11
  4. package/docs/README.md +16 -16
  5. package/docs/Sample-Classes/SampleClass.md +174 -165
  6. package/docs/Sample-Interfaces/SampleInterface.md +27 -27
  7. package/examples/force-app/main/default/classes/SampleClass.cls +9 -0
  8. package/examples/force-app/main/default/classes/SampleClass.cls-meta.xml +5 -0
  9. package/lib/application/Apexdocs.js +3 -0
  10. package/lib/application/Apexdocs.js.map +1 -1
  11. package/lib/cli/generate.js +6 -0
  12. package/lib/cli/generate.js.map +1 -1
  13. package/lib/model/apex-bundle.d.ts +5 -0
  14. package/lib/model/apex-bundle.js +10 -0
  15. package/lib/model/apex-bundle.js.map +1 -0
  16. package/lib/service/apex-file-reader.d.ts +2 -1
  17. package/lib/service/apex-file-reader.js +5 -2
  18. package/lib/service/apex-file-reader.js.map +1 -1
  19. package/lib/service/file-system.d.ts +2 -0
  20. package/lib/service/file-system.js +3 -0
  21. package/lib/service/file-system.js.map +1 -1
  22. package/lib/service/metadata-processor.d.ts +3 -0
  23. package/lib/service/metadata-processor.js +15 -0
  24. package/lib/service/metadata-processor.js.map +1 -0
  25. package/lib/service/parser.d.ts +3 -2
  26. package/lib/service/parser.js +20 -4
  27. package/lib/service/parser.js.map +1 -1
  28. package/lib/settings.d.ts +2 -0
  29. package/lib/settings.js +3 -0
  30. package/lib/settings.js.map +1 -1
  31. package/lib/transpiler/transpiler.js +4 -0
  32. package/lib/transpiler/transpiler.js.map +1 -1
  33. package/lib/util/error-logger.d.ts +8 -0
  34. package/lib/util/error-logger.js +89 -0
  35. package/lib/util/error-logger.js.map +1 -0
  36. package/package.json +5 -3
  37. package/src/application/Apexdocs.ts +5 -1
  38. package/src/cli/generate.ts +6 -0
  39. package/src/model/apex-bundle.ts +3 -0
  40. package/src/service/__tests__/apex-file-reader.spec.ts +11 -1
  41. package/src/service/apex-file-reader.ts +7 -4
  42. package/src/service/file-system.ts +5 -0
  43. package/src/service/metadata-processor.ts +13 -0
  44. package/src/service/parser.ts +20 -3
  45. package/src/settings.ts +5 -0
  46. package/src/transpiler/transpiler.ts +6 -0
  47. package/src/util/error-logger.ts +91 -0
@@ -17,6 +17,9 @@ class DefaultFileSystem {
17
17
  joinPath(...paths) {
18
18
  return path.join(...paths);
19
19
  }
20
+ exists(path) {
21
+ return fs.existsSync(path);
22
+ }
20
23
  }
21
24
  exports.DefaultFileSystem = DefaultFileSystem;
22
25
  //# sourceMappingURL=file-system.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-system.js","sourceRoot":"","sources":["../../src/service/file-system.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,6BAA6B;AAS7B,MAAa,iBAAiB;IAC5B,WAAW,CAAC,UAAkB;QAC5B,OAAO,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/C,CAAC;IAED,aAAa,CAAC,eAAuB;QACnC,OAAO,EAAE,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IACzC,CAAC;IAED,QAAQ,CAAC,UAAkB;QACzB,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QAC5C,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC5B,CAAC;IAED,QAAQ,CAAC,GAAG,KAAe;QACzB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;IAC7B,CAAC;CACF;AAjBD,8CAiBC"}
1
+ {"version":3,"file":"file-system.js","sourceRoot":"","sources":["../../src/service/file-system.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,6BAA6B;AAU7B,MAAa,iBAAiB;IAC5B,WAAW,CAAC,UAAkB;QAC5B,OAAO,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/C,CAAC;IAED,aAAa,CAAC,eAAuB;QACnC,OAAO,EAAE,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IACzC,CAAC;IAED,QAAQ,CAAC,UAAkB;QACzB,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QAC5C,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC5B,CAAC;IAED,QAAQ,CAAC,GAAG,KAAe;QACzB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,IAAY;QACjB,OAAO,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;CACF;AArBD,8CAqBC"}
@@ -0,0 +1,3 @@
1
+ export default class MetadataProcessor {
2
+ static process(input: string): Map<string, string>;
3
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const fast_xml_parser_1 = require("fast-xml-parser");
4
+ class MetadataProcessor {
5
+ static process(input) {
6
+ var _a, _b;
7
+ const map = new Map();
8
+ const xml = new fast_xml_parser_1.XMLParser().parse(input);
9
+ map.set('apiVersion', (_a = xml.ApexClass.apiVersion) !== null && _a !== void 0 ? _a : '');
10
+ map.set('status', (_b = xml.ApexClass.status) !== null && _b !== void 0 ? _b : '');
11
+ return map;
12
+ }
13
+ }
14
+ exports.default = MetadataProcessor;
15
+ //# sourceMappingURL=metadata-processor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata-processor.js","sourceRoot":"","sources":["../../src/service/metadata-processor.ts"],"names":[],"mappings":";;AAAA,qDAA4C;AAE5C,MAAqB,iBAAiB;IAC7B,MAAM,CAAC,OAAO,CAAC,KAAa;;QACjC,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkB,CAAC;QACtC,MAAM,GAAG,GAAG,IAAI,2BAAS,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAEzC,GAAG,CAAC,GAAG,CAAC,YAAY,QAAE,GAAG,CAAC,SAAS,CAAC,UAAU,mCAAI,EAAE,CAAC,CAAC;QAEtD,GAAG,CAAC,GAAG,CAAC,QAAQ,QAAE,GAAG,CAAC,SAAS,CAAC,MAAM,mCAAI,EAAE,CAAC,CAAC;QAC9C,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AAVD,oCAUC"}
@@ -1,9 +1,10 @@
1
1
  import { Type, ReflectionResult } from '@cparra/apex-reflection';
2
+ import ApexBundle from '../model/apex-bundle';
2
3
  export interface TypeParser {
3
4
  parse(reflect: (typeBody: string) => ReflectionResult): Type[];
4
5
  }
5
6
  export declare class RawBodyParser implements TypeParser {
6
- typeBodies: string[];
7
- constructor(typeBodies: string[]);
7
+ typeBundles: ApexBundle[];
8
+ constructor(typeBundles: ApexBundle[]);
8
9
  parse(reflect: (typeBody: string) => ReflectionResult): Type[];
9
10
  }
@@ -1,13 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RawBodyParser = void 0;
4
+ const metadata_processor_1 = require("./metadata-processor");
4
5
  class RawBodyParser {
5
- constructor(typeBodies) {
6
- this.typeBodies = typeBodies;
6
+ constructor(typeBundles) {
7
+ this.typeBundles = typeBundles;
7
8
  }
8
9
  parse(reflect) {
9
- return this.typeBodies
10
- .map((rawBody) => reflect(rawBody))
10
+ return this.typeBundles
11
+ .map((currentBundle) => {
12
+ const result = reflect(currentBundle.rawTypeContent);
13
+ if (!!result.typeMirror && !!currentBundle.rawMetadataContent) {
14
+ // If successful and there is a metadata file
15
+ const metadataParams = metadata_processor_1.default.process(currentBundle.rawMetadataContent);
16
+ metadataParams.forEach((value, key) => {
17
+ const declaration = `${key}: ${value}`;
18
+ result.typeMirror.annotations.push({
19
+ rawDeclaration: declaration,
20
+ name: declaration,
21
+ type: declaration,
22
+ });
23
+ });
24
+ }
25
+ return result;
26
+ })
11
27
  .filter((reflectionResult) => {
12
28
  return reflectionResult.typeMirror;
13
29
  })
@@ -1 +1 @@
1
- {"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/service/parser.ts"],"names":[],"mappings":";;;AAMA,MAAa,aAAa;IACxB,YAAmB,UAAoB;QAApB,eAAU,GAAV,UAAU,CAAU;IAAG,CAAC;IAE3C,KAAK,CAAC,OAA+C;QACnD,OAAO,IAAI,CAAC,UAAU;aACnB,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;aAClC,MAAM,CAAC,CAAC,gBAAgB,EAAE,EAAE;YAC3B,OAAO,gBAAgB,CAAC,UAAU,CAAC;QACrC,CAAC,CAAC;aACD,GAAG,CAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC,gBAAgB,CAAC,UAAW,CAAC,CAAC;IAC7D,CAAC;CACF;AAXD,sCAWC"}
1
+ {"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/service/parser.ts"],"names":[],"mappings":";;;AAEA,6DAAqD;AAMrD,MAAa,aAAa;IACxB,YAAmB,WAAyB;QAAzB,gBAAW,GAAX,WAAW,CAAc;IAAG,CAAC;IAEhD,KAAK,CAAC,OAA+C;QACnD,OAAO,IAAI,CAAC,WAAW;aACpB,GAAG,CAAC,CAAC,aAAa,EAAE,EAAE;YACrB,MAAM,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;YACrD,IAAI,CAAC,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC,aAAa,CAAC,kBAAkB,EAAE;gBAC7D,6CAA6C;gBAC7C,MAAM,cAAc,GAAG,4BAAiB,CAAC,OAAO,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;gBACnF,cAAc,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;oBACpC,MAAM,WAAW,GAAG,GAAG,GAAG,KAAK,KAAK,EAAE,CAAC;oBACvC,MAAM,CAAC,UAAW,CAAC,WAAW,CAAC,IAAI,CAAC;wBAClC,cAAc,EAAE,WAAW;wBAC3B,IAAI,EAAE,WAAW;wBACjB,IAAI,EAAE,WAAW;qBAClB,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;aACJ;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;aACD,MAAM,CAAC,CAAC,gBAAgB,EAAE,EAAE;YAC3B,OAAO,gBAAgB,CAAC,UAAU,CAAC;QACrC,CAAC,CAAC;aACD,GAAG,CAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC,gBAAgB,CAAC,UAAW,CAAC,CAAC;IAC7D,CAAC;CACF;AA1BD,sCA0BC"}
package/lib/settings.d.ts CHANGED
@@ -6,6 +6,7 @@ export interface SettingsConfig {
6
6
  scope: string[];
7
7
  outputDir: string;
8
8
  targetGenerator: GeneratorChoices;
9
+ indexOnly: boolean;
9
10
  }
10
11
  export declare class Settings {
11
12
  config: SettingsConfig;
@@ -18,4 +19,5 @@ export declare class Settings {
18
19
  get scope(): string[];
19
20
  get outputDir(): string;
20
21
  get typeTranspiler(): ProcessorTypeTranspiler;
22
+ get indexOnly(): boolean;
21
23
  }
package/lib/settings.js CHANGED
@@ -38,6 +38,9 @@ class Settings {
38
38
  throw Error('Invalid target generator');
39
39
  }
40
40
  }
41
+ get indexOnly() {
42
+ return this.config.indexOnly;
43
+ }
41
44
  }
42
45
  exports.Settings = Settings;
43
46
  //# sourceMappingURL=settings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":";;;AACA,4FAAwF;AACxF,iGAAwF;AAYxF,MAAa,QAAQ;IAGnB,YAA2B,MAAsB;QAAtB,WAAM,GAAN,MAAM,CAAgB;IAAG,CAAC;IAE9C,MAAM,CAAC,KAAK,CAAC,MAAsB;QACxC,QAAQ,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,MAA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AC,QAAQ,CAAC;IAC3B,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;IACrC,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED,IAAI,cAAc;QAChB,QAAQ,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE;YACnC,KAAK,QAAQ;gBACX,OAAO,IAAI,0CAAmB,EAAE,CAAC;YACnC,KAAK,SAAS;gBACZ,OAAO,IAAI,gCAAoB,EAAE,CAAC;YACpC;gBACE,MAAM,KAAK,CAAC,0BAA0B,CAAC,CAAC;SAC3C;IACH,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IAC/B,CAAC;CACF;AA9CD,4BA8CC"}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const settings_1 = require("../settings");
3
4
  class Transpiler {
4
5
  static generate(types, processor) {
5
6
  var _a, _b;
@@ -11,6 +12,9 @@ class Transpiler {
11
12
  return 0;
12
13
  });
13
14
  (_a = processor.onBeforeProcess) === null || _a === void 0 ? void 0 : _a.call(processor, sortedTypes);
15
+ if (settings_1.Settings.getInstance().indexOnly === true) {
16
+ return;
17
+ }
14
18
  sortedTypes.forEach((currentType) => {
15
19
  processor.onProcess(currentType);
16
20
  });
@@ -1 +1 @@
1
- {"version":3,"file":"transpiler.js","sourceRoot":"","sources":["../../src/transpiler/transpiler.ts"],"names":[],"mappings":";;AAGA,MAAqB,UAAU;IAC7B,MAAM,CAAC,QAAQ,CAAC,KAAa,EAAE,SAAkC;;QAC/D,MAAM,WAAW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AAE;YAClC,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;QACH,MAAA,SAAS,CAAC,cAAc,+CAAxB,SAAS,EAAkB,WAAW,EAAE;IAC1C,CAAC;CACF;AAnBD,6BAmBC"}
@@ -0,0 +1,8 @@
1
+ import { Type } from '@cparra/apex-reflection';
2
+ export default class ErrorLogger {
3
+ static logErrors(types: Type[]): void;
4
+ private static logErrorsForSingleType;
5
+ private static logTypeErrors;
6
+ private static logErrorsForClass;
7
+ private static logErrorsForInterface;
8
+ }
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class ErrorLogger {
4
+ static logErrors(types) {
5
+ types.forEach((currentType) => {
6
+ this.logErrorsForSingleType(currentType);
7
+ });
8
+ }
9
+ static logErrorsForSingleType(currentType, parentType) {
10
+ this.logTypeErrors(currentType);
11
+ if (currentType.type_name === 'class') {
12
+ this.logErrorsForClass(currentType);
13
+ }
14
+ else if (currentType.type_name === 'interface') {
15
+ this.logErrorsForInterface(currentType);
16
+ }
17
+ }
18
+ static logTypeErrors(currentType, parentType) {
19
+ var _a;
20
+ if ((_a = currentType.docComment) === null || _a === void 0 ? void 0 : _a.error) {
21
+ const typeName = parentType ? `${parentType.name}.${currentType.name}` : currentType.name;
22
+ console.log(`${typeName} - Doc comment parsing error. Level: Type`);
23
+ console.log(`Comment:\n ${currentType.docComment.rawDeclaration}`);
24
+ console.log(currentType.docComment.error);
25
+ console.log('=================================');
26
+ }
27
+ }
28
+ static logErrorsForClass(classMirror, parentType) {
29
+ const typeName = parentType ? `${parentType.name}.${classMirror.name}` : classMirror.name;
30
+ classMirror.constructors.forEach((currentConstructor) => {
31
+ var _a;
32
+ if ((_a = currentConstructor.docComment) === null || _a === void 0 ? void 0 : _a.error) {
33
+ console.log(`${typeName} - Doc comment parsing error. Level: Constructor`);
34
+ console.log(`Comment:\n ${currentConstructor.docComment.rawDeclaration}`);
35
+ console.log(currentConstructor.docComment.error);
36
+ console.log('=================================');
37
+ }
38
+ });
39
+ classMirror.fields.forEach((currentField) => {
40
+ var _a;
41
+ if ((_a = currentField.docComment) === null || _a === void 0 ? void 0 : _a.error) {
42
+ console.log(`${typeName} - Doc comment parsing error. Level: Field`);
43
+ console.log(`Comment:\n ${currentField.docComment.rawDeclaration}`);
44
+ console.log(currentField.docComment.error);
45
+ console.log('=================================');
46
+ }
47
+ });
48
+ classMirror.properties.forEach((currentProperty) => {
49
+ var _a;
50
+ if ((_a = currentProperty.docComment) === null || _a === void 0 ? void 0 : _a.error) {
51
+ console.log(`${typeName} - Doc comment parsing error. Level: Property`);
52
+ console.log(`Comment:\n ${currentProperty.docComment.rawDeclaration}`);
53
+ console.log(currentProperty.docComment.error);
54
+ console.log('=================================');
55
+ }
56
+ });
57
+ classMirror.methods.forEach((currentMethod) => {
58
+ var _a;
59
+ if ((_a = currentMethod.docComment) === null || _a === void 0 ? void 0 : _a.error) {
60
+ console.log(`${typeName} - Doc comment parsing error. Level: Method`);
61
+ console.log(`Comment:\n ${currentMethod.docComment.rawDeclaration}`);
62
+ console.log(currentMethod.docComment.error);
63
+ console.log('=================================');
64
+ }
65
+ });
66
+ classMirror.enums.forEach((currentEnum) => {
67
+ this.logErrorsForSingleType(currentEnum, classMirror);
68
+ });
69
+ classMirror.interfaces.forEach((currentInterface) => {
70
+ this.logErrorsForSingleType(currentInterface, classMirror);
71
+ });
72
+ classMirror.classes.forEach((currentClass) => {
73
+ this.logErrorsForSingleType(currentClass, classMirror);
74
+ });
75
+ }
76
+ static logErrorsForInterface(interfaceMirror) {
77
+ interfaceMirror.methods.forEach((currentMethod) => {
78
+ var _a;
79
+ if ((_a = currentMethod.docComment) === null || _a === void 0 ? void 0 : _a.error) {
80
+ console.log(`${interfaceMirror.name} - Doc comment parsing error. Level: Method`);
81
+ console.log(`Comment: ${currentMethod.docComment.rawDeclaration}`);
82
+ console.log(currentMethod.docComment.error);
83
+ console.log('=================================');
84
+ }
85
+ });
86
+ }
87
+ }
88
+ exports.default = ErrorLogger;
89
+ //# sourceMappingURL=error-logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-logger.js","sourceRoot":"","sources":["../../src/util/error-logger.ts"],"names":[],"mappings":";;AAEA,MAAqB,WAAW;IACvB,MAAM,CAAC,SAAS,CAAC,KAAa;QACnC,KAAK,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;YAC5B,IAAI,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,MAAM,CAAC,sBAAsB,CAAC,WAAiB,EAAE,UAAiB;QACxE,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;QAEhC,IAAI,WAAW,CAAC,SAAS,KAAK,OAAO,EAAE;YACrC,IAAI,CAAC,iBAAiB,CAAC,WAA0B,CAAC,CAAC;SACpD;aAAM,IAAI,WAAW,CAAC,SAAS,KAAK,WAAW,EAAE;YAChD,IAAI,CAAC,qBAAqB,CAAC,WAA8B,CAAC,CAAC;SAC5D;IACH,CAAC;IAEO,MAAM,CAAC,aAAa,CAAC,WAAiB,EAAE,UAAiB;;QAC/D,UAAI,WAAW,CAAC,UAAU,0CAAE,KAAK,EAAE;YACjC,MAAM,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,UAAW,CAAC,IAAI,IAAI,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC;YAC3F,OAAO,CAAC,GAAG,CAAC,GAAG,QAAQ,2CAA2C,CAAC,CAAC;YACpE,OAAO,CAAC,GAAG,CAAC,cAAc,WAAW,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,CAAC;YACnE,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YAC1C,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;SAClD;IACH,CAAC;IAEO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AAa,EAAE,EAAE;;YAChD,UAAI,aAAa,CAAC,UAAU,0CAAE,KAAK,EAAE;gBACnC,OAAO,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,IAAI,6CAA6C,CAAC,CAAC;gBAClF,OAAO,CAAC,GAAG,CAAC,YAAY,aAAa,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,CAAC;gBACnE,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;gBAC5C,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;aAClD;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAxFD,8BAwFC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cparra/apexdocs",
3
- "version": "2.1.4",
3
+ "version": "2.2.2",
4
4
  "description": "Library with CLI capabilities to generate documentation for Salesforce Apex classes.",
5
5
  "keywords": [
6
6
  "apex",
@@ -24,7 +24,8 @@
24
24
  "postversion": "git push && git push --tags",
25
25
  "docs:init": "docsify init docs",
26
26
  "docs:serve": "docsify serve docs",
27
- "execute:example": "node lib/cli/generate.js -s examples/force-app -t docs --scope global public private -g docsify"
27
+ "execute:example": "node lib/cli/generate.js -s examples/force-app -t docs --scope global public private -g docsify",
28
+ "execute:example:index:only": "node lib/cli/generate.js -s examples/force-app -t docs --scope global public private -g docsify --indexOnly"
28
29
  },
29
30
  "author": "Cesar Parra",
30
31
  "license": "MIT",
@@ -63,7 +64,8 @@
63
64
  ]
64
65
  },
65
66
  "dependencies": {
66
- "@cparra/apex-reflection": "^1.1.3",
67
+ "@cparra/apex-reflection": "^1.4.0",
68
+ "fast-xml-parser": "^4.0.1",
67
69
  "chalk": "^4.1.2",
68
70
  "html-entities": "^2.3.2",
69
71
  "yargs": "^16.0.3"
@@ -1,6 +1,6 @@
1
1
  import { ApexFileReader } from '../service/apex-file-reader';
2
2
  import { DefaultFileSystem } from '../service/file-system';
3
- import { ReflectionResult, reflect, Type } from '@cparra/apex-reflection';
3
+ import { ReflectionResult, reflect, Type, ClassMirror } from '@cparra/apex-reflection';
4
4
  import { Logger } from '../util/logger';
5
5
  import { createManifest } from '../service/manifest-factory';
6
6
  import { RawBodyParser } from '../service/parser';
@@ -8,6 +8,7 @@ import { Settings } from '../settings';
8
8
  import Transpiler from '../transpiler/transpiler';
9
9
  import { FileWriter } from '../service/file-writer';
10
10
  import { TypesRepository } from '../model/types-repository';
11
+ import ErrorLogger from '../util/error-logger';
11
12
 
12
13
  /**
13
14
  * Application entry-point to generate documentation out of Apex source files.
@@ -30,6 +31,9 @@ export class Apexdocs {
30
31
  FileWriter.write(generatedFiles, (fileName: string) => {
31
32
  Logger.log(`${fileName} processed.`);
32
33
  });
34
+
35
+ // Error logging
36
+ ErrorLogger.logErrors(filteredTypes);
33
37
  }
34
38
 
35
39
  static _reflectionWithLogger = (declarationBody: string): ReflectionResult => {
@@ -39,6 +39,11 @@ const argv = yargs.options({
39
39
  describe:
40
40
  'Define the static file generator for which the documents will be created. Currently supports jekyll, and docsify.',
41
41
  },
42
+ indexOnly: {
43
+ type: 'boolean',
44
+ default: false,
45
+ describe: 'Defines whether only the index file should be generated.',
46
+ },
42
47
  }).argv;
43
48
 
44
49
  Settings.build({
@@ -47,6 +52,7 @@ Settings.build({
47
52
  scope: argv.scope,
48
53
  outputDir: argv.targetDir,
49
54
  targetGenerator: argv.targetGenerator as GeneratorChoices,
55
+ indexOnly: argv.indexOnly,
50
56
  });
51
57
 
52
58
  Apexdocs.generate();
@@ -0,0 +1,3 @@
1
+ export default class ApexBundle {
2
+ constructor(public rawTypeContent: string, public rawMetadataContent: string | null) {}
3
+ }
@@ -11,6 +11,7 @@ describe('File Reader', () => {
11
11
  group: true,
12
12
  outputDir: '',
13
13
  scope: [],
14
+ indexOnly: false,
14
15
  } as SettingsConfig);
15
16
  });
16
17
 
@@ -32,6 +33,9 @@ describe('File Reader', () => {
32
33
  readFile(_: string): string {
33
34
  return '';
34
35
  },
36
+ exists(): boolean {
37
+ return true;
38
+ },
35
39
  });
36
40
  expect(result.length).toBe(0);
37
41
  });
@@ -50,6 +54,9 @@ describe('File Reader', () => {
50
54
  readFile(_: string): string {
51
55
  return '';
52
56
  },
57
+ exists(): boolean {
58
+ return true;
59
+ },
53
60
  });
54
61
  expect(result.length).toBe(0);
55
62
  });
@@ -72,8 +79,11 @@ describe('File Reader', () => {
72
79
  readFile(_: string): string {
73
80
  return 'public class MyClass{}';
74
81
  },
82
+ exists(): boolean {
83
+ return true;
84
+ },
75
85
  });
76
86
  expect(result.length).toBe(1);
77
- expect(result[0]).toBe('public class MyClass{}');
87
+ expect(result[0].rawTypeContent).toBe('public class MyClass{}');
78
88
  });
79
89
  });
@@ -1,5 +1,6 @@
1
1
  import { Settings } from '../settings';
2
2
  import { FileSystem } from './file-system';
3
+ import ApexBundle from '../model/apex-bundle';
3
4
 
4
5
  const APEX_FILE_EXTENSION = '.cls';
5
6
 
@@ -10,8 +11,8 @@ export class ApexFileReader {
10
11
  /**
11
12
  * Reads from .cls files and returns their raw body.
12
13
  */
13
- static processFiles(fileSystem: FileSystem, rootPath: string = this.sourceDirectory): string[] {
14
- let bodies: string[] = [];
14
+ static processFiles(fileSystem: FileSystem, rootPath: string = this.sourceDirectory): ApexBundle[] {
15
+ let bodies: ApexBundle[] = [];
15
16
 
16
17
  const directoryContents = fileSystem.readDirectory(rootPath);
17
18
  directoryContents.forEach((currentFilePath) => {
@@ -24,8 +25,10 @@ export class ApexFileReader {
24
25
  return;
25
26
  }
26
27
 
27
- const rawFile = fileSystem.readFile(currentPath);
28
- bodies.push(rawFile);
28
+ const rawApexFile = fileSystem.readFile(currentPath);
29
+ const metadataPath = fileSystem.joinPath(rootPath, `${currentFilePath}-meta.xml`);
30
+ const rawMetadataFile = fileSystem.exists(metadataPath) ? fileSystem.readFile(metadataPath) : null;
31
+ bodies.push(new ApexBundle(rawApexFile, rawMetadataFile));
29
32
  });
30
33
  return bodies;
31
34
  }
@@ -6,6 +6,7 @@ export interface FileSystem {
6
6
  isDirectory: (path: string) => boolean;
7
7
  readFile: (path: string) => string;
8
8
  joinPath: (...paths: string[]) => string;
9
+ exists: (path: string) => boolean;
9
10
  }
10
11
 
11
12
  export class DefaultFileSystem implements FileSystem {
@@ -25,4 +26,8 @@ export class DefaultFileSystem implements FileSystem {
25
26
  joinPath(...paths: string[]): string {
26
27
  return path.join(...paths);
27
28
  }
29
+
30
+ exists(path: string): boolean {
31
+ return fs.existsSync(path);
32
+ }
28
33
  }
@@ -0,0 +1,13 @@
1
+ import { XMLParser } from 'fast-xml-parser';
2
+
3
+ export default class MetadataProcessor {
4
+ public static process(input: string) {
5
+ const map = new Map<string, string>();
6
+ const xml = new XMLParser().parse(input);
7
+
8
+ map.set('apiVersion', xml.ApexClass.apiVersion ?? '');
9
+
10
+ map.set('status', xml.ApexClass.status ?? '');
11
+ return map;
12
+ }
13
+ }
@@ -1,15 +1,32 @@
1
1
  import { Type, ReflectionResult } from '@cparra/apex-reflection';
2
+ import ApexBundle from '../model/apex-bundle';
3
+ import MetadataProcessor from './metadata-processor';
2
4
 
3
5
  export interface TypeParser {
4
6
  parse(reflect: (typeBody: string) => ReflectionResult): Type[];
5
7
  }
6
8
 
7
9
  export class RawBodyParser implements TypeParser {
8
- constructor(public typeBodies: string[]) {}
10
+ constructor(public typeBundles: ApexBundle[]) {}
9
11
 
10
12
  parse(reflect: (typeBody: string) => ReflectionResult): Type[] {
11
- return this.typeBodies
12
- .map((rawBody) => reflect(rawBody))
13
+ return this.typeBundles
14
+ .map((currentBundle) => {
15
+ const result = reflect(currentBundle.rawTypeContent);
16
+ if (!!result.typeMirror && !!currentBundle.rawMetadataContent) {
17
+ // If successful and there is a metadata file
18
+ const metadataParams = MetadataProcessor.process(currentBundle.rawMetadataContent);
19
+ metadataParams.forEach((value, key) => {
20
+ const declaration = `${key}: ${value}`;
21
+ result.typeMirror!.annotations.push({
22
+ rawDeclaration: declaration,
23
+ name: declaration,
24
+ type: declaration,
25
+ });
26
+ });
27
+ }
28
+ return result;
29
+ })
13
30
  .filter((reflectionResult) => {
14
31
  return reflectionResult.typeMirror;
15
32
  })
package/src/settings.ts CHANGED
@@ -10,6 +10,7 @@ export interface SettingsConfig {
10
10
  scope: string[];
11
11
  outputDir: string;
12
12
  targetGenerator: GeneratorChoices;
13
+ indexOnly: boolean;
13
14
  }
14
15
 
15
16
  export class Settings {
@@ -54,4 +55,8 @@ export class Settings {
54
55
  throw Error('Invalid target generator');
55
56
  }
56
57
  }
58
+
59
+ get indexOnly(): boolean {
60
+ return this.config.indexOnly;
61
+ }
57
62
  }
@@ -1,5 +1,6 @@
1
1
  import { Type } from '@cparra/apex-reflection';
2
2
  import ProcessorTypeTranspiler from './processor-type-transpiler';
3
+ import { Settings } from '../settings';
3
4
 
4
5
  export default class Transpiler {
5
6
  static generate(types: Type[], processor: ProcessorTypeTranspiler): void {
@@ -10,6 +11,11 @@ export default class Transpiler {
10
11
  });
11
12
 
12
13
  processor.onBeforeProcess?.(sortedTypes);
14
+
15
+ if (Settings.getInstance().indexOnly === true) {
16
+ return;
17
+ }
18
+
13
19
  sortedTypes.forEach((currentType) => {
14
20
  processor.onProcess(currentType);
15
21
  });
@@ -0,0 +1,91 @@
1
+ import { ClassMirror, InterfaceMirror, Type } from '@cparra/apex-reflection';
2
+
3
+ export default class ErrorLogger {
4
+ public static logErrors(types: Type[]): void {
5
+ types.forEach((currentType) => {
6
+ this.logErrorsForSingleType(currentType);
7
+ });
8
+ }
9
+
10
+ private static logErrorsForSingleType(currentType: Type, parentType?: Type): void {
11
+ this.logTypeErrors(currentType);
12
+
13
+ if (currentType.type_name === 'class') {
14
+ this.logErrorsForClass(currentType as ClassMirror);
15
+ } else if (currentType.type_name === 'interface') {
16
+ this.logErrorsForInterface(currentType as InterfaceMirror);
17
+ }
18
+ }
19
+
20
+ private static logTypeErrors(currentType: Type, parentType?: Type) {
21
+ if (currentType.docComment?.error) {
22
+ const typeName = parentType ? `${parentType!.name}.${currentType.name}` : currentType.name;
23
+ console.log(`${typeName} - Doc comment parsing error. Level: Type`);
24
+ console.log(`Comment:\n ${currentType.docComment.rawDeclaration}`);
25
+ console.log(currentType.docComment.error);
26
+ console.log('=================================');
27
+ }
28
+ }
29
+
30
+ private static logErrorsForClass(classMirror: ClassMirror, parentType?: Type): void {
31
+ const typeName = parentType ? `${parentType!.name}.${classMirror.name}` : classMirror.name;
32
+ classMirror.constructors.forEach((currentConstructor) => {
33
+ if (currentConstructor.docComment?.error) {
34
+ console.log(`${typeName} - Doc comment parsing error. Level: Constructor`);
35
+ console.log(`Comment:\n ${currentConstructor.docComment.rawDeclaration}`);
36
+ console.log(currentConstructor.docComment.error);
37
+ console.log('=================================');
38
+ }
39
+ });
40
+
41
+ classMirror.fields.forEach((currentField) => {
42
+ if (currentField.docComment?.error) {
43
+ console.log(`${typeName} - Doc comment parsing error. Level: Field`);
44
+ console.log(`Comment:\n ${currentField.docComment.rawDeclaration}`);
45
+ console.log(currentField.docComment.error);
46
+ console.log('=================================');
47
+ }
48
+ });
49
+
50
+ classMirror.properties.forEach((currentProperty) => {
51
+ if (currentProperty.docComment?.error) {
52
+ console.log(`${typeName} - Doc comment parsing error. Level: Property`);
53
+ console.log(`Comment:\n ${currentProperty.docComment.rawDeclaration}`);
54
+ console.log(currentProperty.docComment.error);
55
+ console.log('=================================');
56
+ }
57
+ });
58
+
59
+ classMirror.methods.forEach((currentMethod) => {
60
+ if (currentMethod.docComment?.error) {
61
+ console.log(`${typeName} - Doc comment parsing error. Level: Method`);
62
+ console.log(`Comment:\n ${currentMethod.docComment.rawDeclaration}`);
63
+ console.log(currentMethod.docComment.error);
64
+ console.log('=================================');
65
+ }
66
+ });
67
+
68
+ classMirror.enums.forEach((currentEnum) => {
69
+ this.logErrorsForSingleType(currentEnum, classMirror);
70
+ });
71
+
72
+ classMirror.interfaces.forEach((currentInterface) => {
73
+ this.logErrorsForSingleType(currentInterface, classMirror);
74
+ });
75
+
76
+ classMirror.classes.forEach((currentClass) => {
77
+ this.logErrorsForSingleType(currentClass, classMirror);
78
+ });
79
+ }
80
+
81
+ private static logErrorsForInterface(interfaceMirror: InterfaceMirror): void {
82
+ interfaceMirror.methods.forEach((currentMethod) => {
83
+ if (currentMethod.docComment?.error) {
84
+ console.log(`${interfaceMirror.name} - Doc comment parsing error. Level: Method`);
85
+ console.log(`Comment: ${currentMethod.docComment.rawDeclaration}`);
86
+ console.log(currentMethod.docComment.error);
87
+ console.log('=================================');
88
+ }
89
+ });
90
+ }
91
+ }