@cparra/apexdocs 1.13.4 → 2.0.0-alpha.14

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 (251) hide show
  1. package/.eslintrc.js +12 -0
  2. package/.prettierrc.js +7 -0
  3. package/README.md +344 -277
  4. package/ROADMAP.md +18 -0
  5. package/docs/Gemfile.lock +1 -1
  6. package/docs/Sample-Classes/SampleClass.md +138 -30
  7. package/docs/Sample-Interfaces/SampleInterface.md +21 -4
  8. package/docs/index.md +1 -9
  9. package/examples/apex/SampleClass.cls +31 -6
  10. package/examples/apex/SampleInterface.cls +3 -2
  11. package/lib/application/Apexdocs.d.ts +11 -0
  12. package/lib/application/Apexdocs.js +41 -0
  13. package/lib/application/Apexdocs.js.map +1 -0
  14. package/lib/cli/generate.js +17 -21
  15. package/lib/cli/generate.js.map +1 -0
  16. package/lib/index.d.ts +1 -1
  17. package/lib/index.js +2 -1
  18. package/lib/index.js.map +1 -0
  19. package/lib/model/file.d.ts +10 -0
  20. package/lib/model/file.js +23 -0
  21. package/lib/model/file.js.map +1 -0
  22. package/lib/model/manifest.d.ts +22 -0
  23. package/lib/model/manifest.js +41 -0
  24. package/lib/model/manifest.js.map +1 -0
  25. package/lib/model/markdown-file.d.ts +10 -0
  26. package/lib/model/markdown-file.js +52 -0
  27. package/lib/model/markdown-file.js.map +1 -0
  28. package/lib/model/markdown-generation-util/field-declaration-util.d.ts +3 -0
  29. package/lib/model/markdown-generation-util/field-declaration-util.js +33 -0
  30. package/lib/model/markdown-generation-util/field-declaration-util.js.map +1 -0
  31. package/lib/model/markdown-generation-util/index.d.ts +3 -0
  32. package/lib/model/markdown-generation-util/index.js +9 -0
  33. package/lib/model/markdown-generation-util/index.js.map +1 -0
  34. package/lib/model/markdown-generation-util/method-declaration-util.d.ts +3 -0
  35. package/lib/model/markdown-generation-util/method-declaration-util.js +97 -0
  36. package/lib/model/markdown-generation-util/method-declaration-util.js.map +1 -0
  37. package/lib/model/markdown-generation-util/type-declaration-util.d.ts +3 -0
  38. package/lib/model/markdown-generation-util/type-declaration-util.js +25 -0
  39. package/lib/model/markdown-generation-util/type-declaration-util.js.map +1 -0
  40. package/lib/model/markdown-home-file.d.ts +11 -0
  41. package/lib/model/markdown-home-file.js +50 -0
  42. package/lib/model/markdown-home-file.js.map +1 -0
  43. package/lib/model/markdown-type-file.d.ts +17 -0
  44. package/lib/model/markdown-type-file.js +62 -0
  45. package/lib/model/markdown-type-file.js.map +1 -0
  46. package/lib/service/apex-file-reader.d.ts +13 -0
  47. package/lib/service/apex-file-reader.js +39 -0
  48. package/lib/service/apex-file-reader.js.map +1 -0
  49. package/lib/service/file-system.d.ts +12 -0
  50. package/lib/service/file-system.js +21 -0
  51. package/lib/service/file-system.js.map +1 -0
  52. package/lib/service/file-writer.d.ts +4 -0
  53. package/lib/service/file-writer.js +25 -0
  54. package/lib/service/file-writer.js.map +1 -0
  55. package/lib/service/manifest-factory.d.ts +9 -0
  56. package/lib/service/manifest-factory.js +13 -0
  57. package/lib/service/manifest-factory.js.map +1 -0
  58. package/lib/service/parser.d.ts +9 -0
  59. package/lib/service/parser.js +17 -0
  60. package/lib/service/parser.js.map +1 -0
  61. package/lib/service/walkers/class-walker.d.ts +4 -0
  62. package/lib/service/walkers/class-walker.js +32 -0
  63. package/lib/service/walkers/class-walker.js.map +1 -0
  64. package/lib/service/walkers/enum-walker.d.ts +4 -0
  65. package/lib/service/walkers/enum-walker.js +10 -0
  66. package/lib/service/walkers/enum-walker.js.map +1 -0
  67. package/lib/service/walkers/interface-walker.d.ts +4 -0
  68. package/lib/service/walkers/interface-walker.js +14 -0
  69. package/lib/service/walkers/interface-walker.js.map +1 -0
  70. package/lib/service/walkers/walker-factory.d.ts +5 -0
  71. package/lib/service/walkers/walker-factory.js +19 -0
  72. package/lib/service/walkers/walker-factory.js.map +1 -0
  73. package/lib/service/walkers/walker.d.ts +16 -0
  74. package/lib/service/walkers/walker.js +9 -0
  75. package/lib/service/walkers/walker.js.map +1 -0
  76. package/lib/settings.d.ts +21 -0
  77. package/lib/settings.js +42 -0
  78. package/lib/settings.js.map +1 -0
  79. package/lib/transpiler/file-container.d.ts +6 -0
  80. package/lib/transpiler/file-container.js +15 -0
  81. package/lib/transpiler/file-container.js.map +1 -0
  82. package/lib/transpiler/markdown/class-file-generatorHelper.d.ts +6 -0
  83. package/lib/transpiler/markdown/class-file-generatorHelper.js +17 -0
  84. package/lib/transpiler/markdown/class-file-generatorHelper.js.map +1 -0
  85. package/lib/transpiler/markdown/docsify/docsify-docs-processor.d.ts +4 -0
  86. package/lib/transpiler/markdown/docsify/docsify-docs-processor.js +10 -0
  87. package/lib/transpiler/markdown/docsify/docsify-docs-processor.js.map +1 -0
  88. package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.d.ts +8 -0
  89. package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js +24 -0
  90. package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js.map +1 -0
  91. package/lib/transpiler/markdown/markdown-transpiler-base.d.ts +11 -0
  92. package/lib/transpiler/markdown/markdown-transpiler-base.js +23 -0
  93. package/lib/transpiler/markdown/markdown-transpiler-base.js.map +1 -0
  94. package/lib/transpiler/processor-type-transpiler.d.ts +8 -0
  95. package/lib/transpiler/processor-type-transpiler.js +6 -0
  96. package/lib/transpiler/processor-type-transpiler.js.map +1 -0
  97. package/lib/transpiler/transpiler.d.ts +5 -0
  98. package/lib/transpiler/transpiler.js +21 -0
  99. package/lib/transpiler/transpiler.js.map +1 -0
  100. package/lib/util/logger.d.ts +18 -0
  101. package/lib/util/logger.js +32 -0
  102. package/lib/util/logger.js.map +1 -0
  103. package/package.json +22 -11
  104. package/src/application/Apexdocs.ts +41 -0
  105. package/src/cli/generate.ts +52 -64
  106. package/src/index.ts +1 -1
  107. package/src/model/__tests__/manifest.spec.ts +15 -0
  108. package/src/model/file.ts +23 -0
  109. package/src/model/manifest.ts +60 -0
  110. package/src/model/markdown-file.ts +56 -0
  111. package/src/model/markdown-generation-util/field-declaration-util.ts +42 -0
  112. package/src/model/markdown-generation-util/index.ts +3 -0
  113. package/src/model/markdown-generation-util/method-declaration-util.ts +128 -0
  114. package/src/model/markdown-generation-util/type-declaration-util.ts +29 -0
  115. package/src/model/markdown-home-file.ts +48 -0
  116. package/src/model/markdown-type-file.ts +75 -0
  117. package/src/service/__tests__/apex-file-reader.spec.ts +79 -0
  118. package/src/service/__tests__/manifest-factory.spec.ts +16 -0
  119. package/src/service/apex-file-reader.ts +45 -0
  120. package/src/service/file-system.ts +28 -0
  121. package/src/service/file-writer.ts +25 -0
  122. package/src/service/manifest-factory.ts +12 -0
  123. package/src/service/parser.ts +18 -0
  124. package/src/service/walkers/class-walker.ts +31 -0
  125. package/src/service/walkers/enum-walker.ts +8 -0
  126. package/src/service/walkers/interface-walker.ts +12 -0
  127. package/src/service/walkers/walker-factory.ts +18 -0
  128. package/src/service/walkers/walker.ts +35 -0
  129. package/src/settings.ts +57 -0
  130. package/src/transpiler/file-container.ts +13 -0
  131. package/src/transpiler/markdown/class-file-generatorHelper.ts +16 -0
  132. package/src/transpiler/markdown/docsify/docsify-docs-processor.ts +7 -0
  133. package/src/transpiler/markdown/jekyll/jekyll-docsProcessor.ts +22 -0
  134. package/src/transpiler/markdown/markdown-transpiler-base.ts +28 -0
  135. package/src/transpiler/processor-type-transpiler.ts +12 -0
  136. package/src/transpiler/transpiler.ts +18 -0
  137. package/src/util/logger.ts +31 -0
  138. package/tsconfig.json +9 -3
  139. package/.prettierrc +0 -5
  140. package/examples/config/config.json +0 -5
  141. package/lib/AsJsDocsProcessor.d.ts +0 -9
  142. package/lib/AsJsDocsProcessor.js +0 -61
  143. package/lib/ClassFileGeneratorHelper.d.ts +0 -5
  144. package/lib/ClassFileGeneratorHelper.js +0 -25
  145. package/lib/ClassFileGeneratorHelper.test.d.ts +0 -1
  146. package/lib/ClassFileGeneratorHelper.test.js +0 -32
  147. package/lib/Configuration.d.ts +0 -34
  148. package/lib/Configuration.js +0 -37
  149. package/lib/DocsProcessor.d.ts +0 -6
  150. package/lib/DocsProcessor.js +0 -9
  151. package/lib/DocsifyDocsProcessor.d.ts +0 -4
  152. package/lib/DocsifyDocsProcessor.js +0 -9
  153. package/lib/DocsifyDocsProcessor.test.d.ts +0 -1
  154. package/lib/DocsifyDocsProcessor.test.js +0 -7
  155. package/lib/FileManager.d.ts +0 -6
  156. package/lib/FileManager.js +0 -28
  157. package/lib/JekyllDocsProcessor.d.ts +0 -8
  158. package/lib/JekyllDocsProcessor.js +0 -20
  159. package/lib/JekyllDocsProcessor.test.d.ts +0 -1
  160. package/lib/JekyllDocsProcessor.test.js +0 -21
  161. package/lib/JsHelper.d.ts +0 -12
  162. package/lib/JsHelper.js +0 -72
  163. package/lib/MarkdownDocsProcessor.d.ts +0 -22
  164. package/lib/MarkdownDocsProcessor.js +0 -358
  165. package/lib/MarkdownHelper.d.ts +0 -13
  166. package/lib/MarkdownHelper.js +0 -78
  167. package/lib/Settings.d.ts +0 -22
  168. package/lib/Settings.js +0 -51
  169. package/lib/Settings.test.d.ts +0 -1
  170. package/lib/Settings.test.js +0 -38
  171. package/lib/command/Generate.d.ts +0 -2
  172. package/lib/command/Generate.js +0 -54
  173. package/lib/command/__test__/Generte.test.d.ts +0 -1
  174. package/lib/command/__test__/Generte.test.js +0 -30
  175. package/lib/model/ApexModel.d.ts +0 -30
  176. package/lib/model/ApexModel.js +0 -85
  177. package/lib/model/ClassModel.d.ts +0 -39
  178. package/lib/model/ClassModel.js +0 -125
  179. package/lib/model/EnumModel.d.ts +0 -6
  180. package/lib/model/EnumModel.js +0 -28
  181. package/lib/model/MethodModel.d.ts +0 -18
  182. package/lib/model/MethodModel.js +0 -74
  183. package/lib/model/PropertyModel.d.ts +0 -6
  184. package/lib/model/PropertyModel.js +0 -40
  185. package/lib/model/__test__/ClassModel.test.d.ts +0 -1
  186. package/lib/model/__test__/ClassModel.test.js +0 -79
  187. package/lib/model/__test__/MethodModel.test.d.ts +0 -1
  188. package/lib/model/__test__/MethodModel.test.js +0 -55
  189. package/lib/model/__test__/PropertyModel.test.d.ts +0 -1
  190. package/lib/model/__test__/PropertyModel.test.js +0 -25
  191. package/lib/parser/ClassParser.d.ts +0 -5
  192. package/lib/parser/ClassParser.js +0 -79
  193. package/lib/parser/EnumParser.d.ts +0 -5
  194. package/lib/parser/EnumParser.js +0 -45
  195. package/lib/parser/FileParser.d.ts +0 -8
  196. package/lib/parser/FileParser.js +0 -210
  197. package/lib/parser/MethodParser.d.ts +0 -5
  198. package/lib/parser/MethodParser.js +0 -109
  199. package/lib/parser/PropertyParser.d.ts +0 -5
  200. package/lib/parser/PropertyParser.js +0 -46
  201. package/lib/parser/__test__/ClassParser.test.d.ts +0 -1
  202. package/lib/parser/__test__/ClassParser.test.js +0 -52
  203. package/lib/parser/__test__/FileParser.test.d.ts +0 -1
  204. package/lib/parser/__test__/FileParser.test.js +0 -12
  205. package/lib/parser/__test__/MethodParser.test.d.ts +0 -1
  206. package/lib/parser/__test__/MethodParser.test.js +0 -69
  207. package/lib/parser/__test__/PropertyParser.test.d.ts +0 -1
  208. package/lib/parser/__test__/PropertyParser.test.js +0 -14
  209. package/lib/parser/__test__/testFileContents.d.ts +0 -1
  210. package/lib/parser/__test__/testFileContents.js +0 -82
  211. package/lib/utils.d.ts +0 -12
  212. package/lib/utils.js +0 -49
  213. package/lib/utils.test.d.ts +0 -1
  214. package/lib/utils.test.js +0 -35
  215. package/src/AsJsDocsProcessor.ts +0 -67
  216. package/src/ClassFileGeneratorHelper.test.ts +0 -44
  217. package/src/ClassFileGeneratorHelper.ts +0 -26
  218. package/src/Configuration.ts +0 -69
  219. package/src/DocsProcessor.ts +0 -9
  220. package/src/DocsifyDocsProcessor.test.ts +0 -6
  221. package/src/DocsifyDocsProcessor.ts +0 -7
  222. package/src/FileManager.ts +0 -32
  223. package/src/JekyllDocsProcessor.test.ts +0 -28
  224. package/src/JekyllDocsProcessor.ts +0 -22
  225. package/src/JsHelper.ts +0 -78
  226. package/src/MarkdownDocsProcessor.ts +0 -420
  227. package/src/MarkdownHelper.ts +0 -91
  228. package/src/Settings.test.ts +0 -54
  229. package/src/Settings.ts +0 -65
  230. package/src/command/Generate.ts +0 -69
  231. package/src/command/__test__/Generte.test.ts +0 -39
  232. package/src/model/ApexModel.ts +0 -102
  233. package/src/model/ClassModel.ts +0 -140
  234. package/src/model/EnumModel.ts +0 -27
  235. package/src/model/MethodModel.ts +0 -80
  236. package/src/model/PropertyModel.ts +0 -37
  237. package/src/model/__test__/ClassModel.test.ts +0 -100
  238. package/src/model/__test__/MethodModel.test.ts +0 -70
  239. package/src/model/__test__/PropertyModel.test.ts +0 -34
  240. package/src/parser/ClassParser.ts +0 -83
  241. package/src/parser/EnumParser.ts +0 -47
  242. package/src/parser/FileParser.ts +0 -250
  243. package/src/parser/MethodParser.ts +0 -119
  244. package/src/parser/PropertyParser.ts +0 -46
  245. package/src/parser/__test__/ClassParser.test.ts +0 -70
  246. package/src/parser/__test__/FileParser.test.ts +0 -14
  247. package/src/parser/__test__/MethodParser.test.ts +0 -90
  248. package/src/parser/__test__/PropertyParser.test.ts +0 -18
  249. package/src/parser/__test__/testFileContents.ts +0 -81
  250. package/src/utils.test.ts +0 -40
  251. package/src/utils.ts +0 -52
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const file_1 = require("./file");
4
+ class MarkdownFile extends file_1.File {
5
+ fileExtension() {
6
+ return '.md';
7
+ }
8
+ addTitle(text, level = 1) {
9
+ let title = '';
10
+ for (let i = 0; i < level; i++) {
11
+ title += '#';
12
+ }
13
+ title += ' ';
14
+ title += text;
15
+ this._contents += title;
16
+ this.addBlankLine();
17
+ }
18
+ startCodeBlock() {
19
+ this._contents += '```';
20
+ const sourceLanguage = 'apex';
21
+ this._contents += sourceLanguage;
22
+ this.addBlankLine();
23
+ }
24
+ endCodeBlock() {
25
+ this._contents += '```';
26
+ this.addBlankLine();
27
+ }
28
+ addHorizontalRule() {
29
+ this._contents += '---';
30
+ this.addBlankLine();
31
+ }
32
+ initializeTable(...headers) {
33
+ this._contents += '|';
34
+ headers.forEach((header) => {
35
+ this._contents += header + '|';
36
+ });
37
+ this.addBlankLine();
38
+ this._contents += '|';
39
+ headers.forEach((_) => {
40
+ this._contents += '---' + '|';
41
+ });
42
+ this.addBlankLine();
43
+ }
44
+ addTableRow(...columns) {
45
+ this._contents += '|';
46
+ columns.forEach((column) => {
47
+ this._contents += column + '|';
48
+ });
49
+ }
50
+ }
51
+ exports.MarkdownFile = MarkdownFile;
52
+ //# sourceMappingURL=markdown-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-file.js","sourceRoot":"","sources":["../../src/model/markdown-file.ts"],"names":[],"mappings":";;AAAA,iCAA8B;AAE9B,MAAa,YAAa,SAAQ,WAAI;IACpC,aAAa;QACX,OAAO,KAAK,CAAC;IACf,CAAC;IAED,QAAQ,CAAC,IAAY,EAAE,KAAK,GAAG,CAAC;QAC9B,IAAI,KAAK,GAAG,EAAE,CAAC;QACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;YAC9B,KAAK,IAAI,GAAG,CAAC;SACd;QAED,KAAK,IAAI,GAAG,CAAC;QACb,KAAK,IAAI,IAAI,CAAC;QACd,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC;QACxB,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,cAAc;QACZ,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC;QACxB,MAAM,cAAc,GAAG,MAAM,CAAC;QAC9B,IAAI,CAAC,SAAS,IAAI,cAAc,CAAC;QACjC,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,YAAY;QACV,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC;QACxB,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC;QACxB,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,eAAe,CAAC,GAAG,OAAiB;QAClC,IAAI,CAAC,SAAS,IAAI,GAAG,CAAC;QACtB,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACzB,IAAI,CAAC,SAAS,IAAI,MAAM,GAAG,GAAG,CAAC;QACjC,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,SAAS,IAAI,GAAG,CAAC;QACtB,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACpB,IAAI,CAAC,SAAS,IAAI,KAAK,GAAG,GAAG,CAAC;QAChC,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,WAAW,CAAC,GAAG,OAAiB;QAC9B,IAAI,CAAC,SAAS,IAAI,GAAG,CAAC;QACtB,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACzB,IAAI,CAAC,SAAS,IAAI,MAAM,GAAG,GAAG,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AArDD,oCAqDC"}
@@ -0,0 +1,3 @@
1
+ import { MarkdownFile } from '../markdown-file';
2
+ import { FieldMirror, PropertyMirror } from '@cparra/apex-reflection';
3
+ export declare function declareField(title: string, markdownFile: MarkdownFile, fields: FieldMirror[] | PropertyMirror[], startingHeadingLevel: number): void;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function declareField(title, markdownFile, fields, startingHeadingLevel) {
4
+ markdownFile.addTitle(title, startingHeadingLevel + 1);
5
+ markdownFile.addBlankLine();
6
+ fields
7
+ .sort((propA, propB) => {
8
+ if (propA.name < propB.name)
9
+ return -1;
10
+ if (propA.name > propB.name)
11
+ return 1;
12
+ return 0;
13
+ })
14
+ .forEach((propertyModel) => {
15
+ addFieldSection(markdownFile, propertyModel, startingHeadingLevel);
16
+ });
17
+ markdownFile.addHorizontalRule();
18
+ }
19
+ exports.declareField = declareField;
20
+ function addFieldSection(markdownFile, propertyModel, startingHeadingLevel) {
21
+ var _a;
22
+ markdownFile.addTitle(`\`${propertyModel.name}\` → \`${propertyModel.type}\``, startingHeadingLevel + 2);
23
+ propertyModel.annotations.forEach((annotation) => {
24
+ markdownFile.addBlankLine();
25
+ markdownFile.addText(`\`${annotation.type.toUpperCase()}\``);
26
+ });
27
+ if ((_a = propertyModel.docComment) === null || _a === void 0 ? void 0 : _a.description) {
28
+ markdownFile.addBlankLine();
29
+ markdownFile.addText(propertyModel.docComment.description);
30
+ }
31
+ markdownFile.addBlankLine();
32
+ }
33
+ //# sourceMappingURL=field-declaration-util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field-declaration-util.js","sourceRoot":"","sources":["../../../src/model/markdown-generation-util/field-declaration-util.ts"],"names":[],"mappings":";;AAGA,SAAgB,YAAY,CAC1B,KAAa,EACb,YAA0B,EAC1B,MAAwC,EACxC,oBAA4B;IAE5B,YAAY,CAAC,QAAQ,CAAC,KAAK,EAAE,oBAAoB,GAAG,CAAC,CAAC,CAAC;IACvD,YAAY,CAAC,YAAY,EAAE,CAAC;IAC5B,MAAM;SACH,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QACrB,IAAI,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI;YAAE,OAAO,CAAC,CAAC,CAAC;QACvC,IAAI,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI;YAAE,OAAO,CAAC,CAAC;QACtC,OAAO,CAAC,CAAC;IACX,CAAC,CAAC;SACD,OAAO,CAAC,CAAC,aAAa,EAAE,EAAE;QACzB,eAAe,CAAC,YAAY,EAAE,aAAa,EAAE,oBAAoB,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;IAEL,YAAY,CAAC,iBAAiB,EAAE,CAAC;AACnC,CAAC;AAnBD,oCAmBC;AAED,SAAS,eAAe,CACtB,YAA0B,EAC1B,aAA2C,EAC3C,oBAA4B;;IAE5B,YAAY,CAAC,QAAQ,CAAC,KAAK,aAAa,CAAC,IAAI,UAAU,aAAa,CAAC,IAAI,IAAI,EAAE,oBAAoB,GAAG,CAAC,CAAC,CAAC;IAEzG,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;QAC/C,YAAY,CAAC,YAAY,EAAE,CAAC;QAC5B,YAAY,CAAC,OAAO,CAAC,KAAK,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;IAEH,UAAI,aAAa,CAAC,UAAU,0CAAE,WAAW,EAAE;QACzC,YAAY,CAAC,YAAY,EAAE,CAAC;QAC5B,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;KAC5D;IACD,YAAY,CAAC,YAAY,EAAE,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './type-declaration-util';
2
+ export * from './method-declaration-util';
3
+ export * from './field-declaration-util';
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ function __export(m) {
3
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
+ }
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ __export(require("./type-declaration-util"));
7
+ __export(require("./method-declaration-util"));
8
+ __export(require("./field-declaration-util"));
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/model/markdown-generation-util/index.ts"],"names":[],"mappings":";;;;;AAAA,6CAAwC;AACxC,+CAA0C;AAC1C,8CAAyC"}
@@ -0,0 +1,3 @@
1
+ import { ConstructorMirror, MethodMirror } from '@cparra/apex-reflection';
2
+ import { MarkdownFile } from '../markdown-file';
3
+ export declare function declareMethod(title: string, markdownFile: MarkdownFile, methods: ConstructorMirror[] | MethodMirror[], startingHeadingLevel: number, className?: string): void;
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function declareMethod(title, markdownFile, methods, startingHeadingLevel, className = '') {
4
+ markdownFile.addTitle(title, startingHeadingLevel + 1);
5
+ methods.forEach((currentMethod) => {
6
+ var _a, _b;
7
+ const signatureName = isMethod(currentMethod) ? currentMethod.name : className;
8
+ markdownFile.addTitle(`\`${buildSignature(signatureName, currentMethod)}\``, startingHeadingLevel + 2);
9
+ currentMethod.annotations.forEach((annotation) => {
10
+ markdownFile.addBlankLine();
11
+ markdownFile.addText(`\`${annotation.type.toUpperCase()}\``);
12
+ });
13
+ if ((_a = currentMethod.docComment) === null || _a === void 0 ? void 0 : _a.description) {
14
+ markdownFile.addBlankLine();
15
+ markdownFile.addText(currentMethod.docComment.description);
16
+ markdownFile.addBlankLine();
17
+ }
18
+ if (currentMethod.parameters.length) {
19
+ addParameters(markdownFile, currentMethod, startingHeadingLevel);
20
+ }
21
+ if (isMethod(currentMethod)) {
22
+ addReturns(markdownFile, currentMethod, startingHeadingLevel);
23
+ }
24
+ addThrowsBlock(markdownFile, currentMethod, startingHeadingLevel);
25
+ if ((_b = currentMethod.docComment) === null || _b === void 0 ? void 0 : _b.exampleAnnotation) {
26
+ addExample(markdownFile, currentMethod, startingHeadingLevel);
27
+ }
28
+ });
29
+ markdownFile.addHorizontalRule();
30
+ }
31
+ exports.declareMethod = declareMethod;
32
+ function buildSignature(name, parameterAware) {
33
+ let signature = `${name}(`;
34
+ if (isMethod(parameterAware) && parameterAware.memberModifiers.length) {
35
+ signature = parameterAware.memberModifiers.join(' ') + ' ' + signature;
36
+ }
37
+ const signatureParameters = parameterAware.parameters.map((param) => {
38
+ signature += `${param.type} ${param.name}`;
39
+ });
40
+ signature += signatureParameters.join(', ');
41
+ return (signature += ')');
42
+ }
43
+ function addParameters(markdownFile, methodModel, startingHeadingLevel) {
44
+ var _a;
45
+ markdownFile.addTitle('Parameters', startingHeadingLevel + 3);
46
+ markdownFile.initializeTable('Param', 'Description');
47
+ (_a = methodModel.docComment) === null || _a === void 0 ? void 0 : _a.paramAnnotations.forEach((paramAnnotation) => {
48
+ const paramName = paramAnnotation.paramName;
49
+ const paramDescription = paramAnnotation.bodyLines.join(' ');
50
+ markdownFile.addTableRow(`\`${paramName}\``, paramDescription);
51
+ });
52
+ markdownFile.addBlankLine();
53
+ }
54
+ function addReturns(markdownFile, methodModel, startingHeadingLevel) {
55
+ var _a, _b;
56
+ if (!((_a = methodModel.docComment) === null || _a === void 0 ? void 0 : _a.returnAnnotation)) {
57
+ return;
58
+ }
59
+ markdownFile.addTitle('Return', startingHeadingLevel + 3);
60
+ markdownFile.addBlankLine();
61
+ markdownFile.addText('**Type**');
62
+ markdownFile.addBlankLine();
63
+ markdownFile.addText(methodModel.type);
64
+ markdownFile.addBlankLine();
65
+ markdownFile.addText('**Description**');
66
+ markdownFile.addBlankLine();
67
+ markdownFile.addText((_b = methodModel.docComment) === null || _b === void 0 ? void 0 : _b.returnAnnotation.bodyLines.join(' '));
68
+ markdownFile.addBlankLine();
69
+ }
70
+ function addThrowsBlock(markdownFile, docCommentAware, startingHeadingLevel) {
71
+ var _a, _b;
72
+ if (!((_a = docCommentAware.docComment) === null || _a === void 0 ? void 0 : _a.throwsAnnotations.length)) {
73
+ return;
74
+ }
75
+ markdownFile.addTitle('Throws', startingHeadingLevel + 3);
76
+ markdownFile.initializeTable('Exception', 'Description');
77
+ (_b = docCommentAware.docComment) === null || _b === void 0 ? void 0 : _b.throwsAnnotations.forEach((annotation) => {
78
+ const exceptionName = annotation.exceptionName;
79
+ const exceptionDescription = annotation.bodyLines.join(' ');
80
+ markdownFile.addTableRow(`\`${exceptionName}\``, exceptionDescription);
81
+ });
82
+ markdownFile.addBlankLine();
83
+ }
84
+ function addExample(markdownFile, docCommentAware, startingHeadingLevel) {
85
+ var _a;
86
+ markdownFile.addTitle('Example', startingHeadingLevel + 3);
87
+ markdownFile.startCodeBlock();
88
+ (_a = docCommentAware.docComment) === null || _a === void 0 ? void 0 : _a.exampleAnnotation.bodyLines.forEach((line) => {
89
+ markdownFile.addText(line, false);
90
+ });
91
+ markdownFile.endCodeBlock();
92
+ markdownFile.addBlankLine();
93
+ }
94
+ function isMethod(method) {
95
+ return method.type !== undefined;
96
+ }
97
+ //# sourceMappingURL=method-declaration-util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"method-declaration-util.js","sourceRoot":"","sources":["../../../src/model/markdown-generation-util/method-declaration-util.ts"],"names":[],"mappings":";;AAIA,SAAgB,aAAa,CAC3B,KAAa,EACb,YAA0B,EAC1B,OAA6C,EAC7C,oBAA4B,EAC5B,SAAS,GAAG,EAAE;IAEd,YAAY,CAAC,QAAQ,CAAC,KAAK,EAAE,oBAAoB,GAAG,CAAC,CAAC,CAAC;IACvD,OAAO,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,EAAE;;QAChC,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAE,aAA8B,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QACjG,YAAY,CAAC,QAAQ,CAAC,KAAK,cAAc,CAAC,aAAa,EAAE,aAAa,CAAC,IAAI,EAAE,oBAAoB,GAAG,CAAC,CAAC,CAAC;QACvG,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;YAC/C,YAAY,CAAC,YAAY,EAAE,CAAC;YAC5B,YAAY,CAAC,OAAO,CAAC,KAAK,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;QAEH,UAAI,aAAa,CAAC,UAAU,0CAAE,WAAW,EAAE;YACzC,YAAY,CAAC,YAAY,EAAE,CAAC;YAC5B,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;YA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e,CAAC,UAAU,0CAAE,iBAAiB,CAAC,MAAM,CAAA,EAAE;QACzD,OAAO;KACR;IACD,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,GAAG,CAAC,CAAC,CAAC;IAC1D,YAAY,CAAC,eAAe,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IAEzD,MAAA,eAAe,CAAC,UAAU,0CAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;QACnE,MAAM,aAAa,GAAG,UAAU,CAAC,aAAa,CAAC;QAC/C,MAAM,oBAAoB,GAAG,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAE5D,YAAY,CAAC,WAAW,CAAC,KAAK,aAAa,IAAI,EAAE,oBAAoB,CAAC,CAAC;IACzE,CAAC,EAAE;IAEH,YAAY,CAAC,YAAY,EAAE,CAAC;AAC9B,CAAC;AAED,SAAS,UAAU,CAAC,YAA0B,EAAE,eAAgC,EAAE,oBAA4B;;IAC5G,YAAY,CAAC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,GAAG,CAAC,CAAC,CAAC;IAC3D,YAAY,CAAC,cAAc,EAAE,CAAC;IAC9B,MAAA,eAAe,CAAC,UAAU,0CAAE,iBAAiB,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACvE,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC,EAAE;IACH,YAAY,CAAC,YAAY,EAAE,CAAC;IAC5B,YAAY,CAAC,YAAY,EAAE,CAAC;AAC9B,CAAC;AAED,SAAS,QAAQ,CAAC,MAAyD;IACzE,OAAQ,MAAuB,CAAC,IAAI,KAAK,SAAS,CAAC;AACrD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { MarkdownFile } from '../markdown-file';
2
+ import { Type } from '@cparra/apex-reflection';
3
+ export declare function declareType(markdownFile: MarkdownFile, typeMirror: Type, startingHeadingLevel: number): void;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function declareType(markdownFile, typeMirror, startingHeadingLevel) {
4
+ var _a, _b;
5
+ markdownFile.addTitle(typeMirror.name, startingHeadingLevel);
6
+ typeMirror.annotations.forEach((currentAnnotation) => {
7
+ markdownFile.addBlankLine();
8
+ markdownFile.addText(`\`${currentAnnotation.type.toUpperCase()}\``);
9
+ });
10
+ if ((_a = typeMirror.docComment) === null || _a === void 0 ? void 0 : _a.description) {
11
+ markdownFile.addBlankLine();
12
+ markdownFile.addText(typeMirror.docComment.description);
13
+ markdownFile.addBlankLine();
14
+ }
15
+ function capitalizeFirstLetter(text) {
16
+ return text.charAt(0).toUpperCase() + text.slice(1);
17
+ }
18
+ (_b = typeMirror.docComment) === null || _b === void 0 ? void 0 : _b.annotations.filter((currentAnnotation) => currentAnnotation.name !== 'description').forEach((currentAnnotation) => {
19
+ markdownFile.addBlankLine();
20
+ markdownFile.addText(`**${capitalizeFirstLetter(currentAnnotation.name)}** ${currentAnnotation.body}`);
21
+ markdownFile.addBlankLine();
22
+ });
23
+ }
24
+ exports.declareType = declareType;
25
+ //# sourceMappingURL=type-declaration-util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-declaration-util.js","sourceRoot":"","sources":["../../../src/model/markdown-generation-util/type-declaration-util.ts"],"names":[],"mappings":";;AAGA,SAAgB,WAAW,CAAC,YAA0B,EAAE,UAAgB,EAAE,oBAA4B;;IACpG,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;IAE7D,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,iBAAiB,EAAE,EAAE;QACnD,YAAY,CAAC,YAAY,EAAE,CAAC;QAC5B,YAAY,CAAC,OAAO,CAAC,KAAK,iBAAiB,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;IACtE,CAAC,CAAC,CAAC;IAEH,UAAI,UAAU,CAAC,UAAU,0CAAE,WAAW,EAAE;QACtC,YAAY,CAAC,YAAY,EAAE,CAAC;QAC5B,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACxD,YAAY,CAAC,YAAY,EAAE,CAAC;KAC7B;IAED,SAAS,qBAAqB,CAAC,IAAY;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACtD,CAAC;IAED,MAAA,UAAU,CAAC,UAAU,0CAAE,WAAW,CAC/B,MAAM,CAAC,CAAC,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,KAAK,aAAa,EACtE,OAAO,CAAC,CAAC,iBAAiB,EAAE,EAAE;QAC7B,YAAY,CAAC,YAAY,EAAE,CAAC;QAC5B,YAAY,CAAC,OAAO,CAAC,KAAK,qBAAqB,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC;QACvG,YAAY,CAAC,YAAY,EAAE,CAAC;IAC9B,CAAC,EAAE;AACP,CAAC;AAzBD,kCAyBC"}
@@ -0,0 +1,11 @@
1
+ import { Type } from '@cparra/apex-reflection';
2
+ import { MarkdownFile } from './markdown-file';
3
+ export declare class MarkdownHomeFile extends MarkdownFile {
4
+ fileName: string;
5
+ types: Type[];
6
+ constructor(fileName: string, types: Type[], headerContent?: string);
7
+ private addTypeEntries;
8
+ private addTypeEntry;
9
+ private group;
10
+ private getClassGroup;
11
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const class_file_generatorHelper_1 = require("../transpiler/markdown/class-file-generatorHelper");
4
+ const markdown_file_1 = require("./markdown-file");
5
+ class MarkdownHomeFile extends markdown_file_1.MarkdownFile {
6
+ constructor(fileName, types, headerContent) {
7
+ super(fileName, '');
8
+ this.fileName = fileName;
9
+ this.types = types;
10
+ if (headerContent) {
11
+ this.addText(headerContent);
12
+ }
13
+ this.addTitle('Classes');
14
+ this.addTypeEntries(types);
15
+ }
16
+ addTypeEntries(types) {
17
+ const groupedClasses = this.group(types);
18
+ groupedClasses.forEach((value, key) => {
19
+ this.addTitle(key, 2);
20
+ value.forEach((typeMirror) => {
21
+ this.addTypeEntry(typeMirror);
22
+ });
23
+ });
24
+ }
25
+ addTypeEntry(typeMirror) {
26
+ var _a, _b;
27
+ this.addBlankLine();
28
+ this.addTitle(class_file_generatorHelper_1.default.getFileLink(typeMirror), 2);
29
+ this.addBlankLine();
30
+ this.addBlankLine();
31
+ this.addText((_b = (_a = typeMirror.docComment) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : '');
32
+ this.addBlankLine();
33
+ this.addBlankLine();
34
+ }
35
+ group(classes) {
36
+ return classes.reduce((groups, currentClass) => {
37
+ const key = this.getClassGroup(currentClass);
38
+ const group = groups.get(key) || [];
39
+ group.push(currentClass);
40
+ groups.set(key, group);
41
+ return groups;
42
+ }, new Map());
43
+ }
44
+ getClassGroup(classModel) {
45
+ var _a, _b, _c;
46
+ return (_c = (_b = (_a = classModel.docComment) === null || _a === void 0 ? void 0 : _a.annotations.find((annotation) => annotation.name === 'group')) === null || _b === void 0 ? void 0 : _b.body) !== null && _c !== void 0 ? _c : '';
47
+ }
48
+ }
49
+ exports.MarkdownHomeFile = MarkdownHomeFile;
50
+ //# sourceMappingURL=markdown-home-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-home-file.js","sourceRoot":"","sources":["../../src/model/markdown-home-file.ts"],"names":[],"mappings":";;AACA,kGAAyF;AACzF,mDAA+C;AAE/C,MAAa,gBAAiB,SAAQ,4BAAY;IAChD,YAAmB,QAAgB,EAAS,KAAa,EAAE,aAAsB;QAC/E,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QADH,aAAQ,GAAR,QAA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G,CAAC,IAAI,EAAE,CAAC;YAC5C,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YACzB,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YACvB,OAAO,MAAM,CAAC;QAChB,CAAC,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;IAChB,CAAC;IAEO,aAAa,CAAC,UAAgB;;QACpC,yBAAO,UAAU,CAAC,UAAU,0CAAE,WAAW,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,KAAK,OAAO,2CAAG,IAAI,mCAAI,EAAE,CAAC;IAC1G,CAAC;CACF;AA3CD,4CA2CC"}
@@ -0,0 +1,17 @@
1
+ import { ClassMirror, ConstructorMirror, EnumMirror, FieldMirror, InterfaceMirror, MethodMirror, PropertyMirror, Type } from '@cparra/apex-reflection';
2
+ import { WalkerListener } from '../service/walkers/walker';
3
+ import { MarkdownFile } from './markdown-file';
4
+ export declare class MarkdownTypeFile extends MarkdownFile implements WalkerListener {
5
+ type: Type;
6
+ startingHeadingLevel: number;
7
+ constructor(type: Type, startingHeadingLevel?: number, headerContent?: string);
8
+ onTypeDeclaration(typeMirror: Type, headingLevel?: 1): void;
9
+ onConstructorDeclaration(className: string, constructors: ConstructorMirror[]): void;
10
+ onFieldsDeclaration(fields: FieldMirror[]): void;
11
+ onPropertiesDeclaration(properties: PropertyMirror[]): void;
12
+ onMethodsDeclaration(methods: MethodMirror[]): void;
13
+ onInnerEnumsDeclaration(enums: EnumMirror[]): void;
14
+ onInnerClassesDeclaration(classes: ClassMirror[]): void;
15
+ onInnerInterfacesDeclaration(interfaces: InterfaceMirror[]): void;
16
+ private addInnerTypes;
17
+ }
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const walker_factory_1 = require("../service/walkers/walker-factory");
4
+ const markdown_file_1 = require("./markdown-file");
5
+ const markdown_generation_util_1 = require("./markdown-generation-util");
6
+ const class_file_generatorHelper_1 = require("../transpiler/markdown/class-file-generatorHelper");
7
+ class MarkdownTypeFile extends markdown_file_1.MarkdownFile {
8
+ constructor(type, startingHeadingLevel = 1, headerContent) {
9
+ super(`${type.name}`, class_file_generatorHelper_1.default.getSanitizedGroup(type));
10
+ this.type = type;
11
+ this.startingHeadingLevel = startingHeadingLevel;
12
+ if (headerContent) {
13
+ this.addText(headerContent);
14
+ }
15
+ const walker = walker_factory_1.WalkerFactory.get(type);
16
+ walker.walk(this);
17
+ }
18
+ onTypeDeclaration(typeMirror, headingLevel) {
19
+ markdown_generation_util_1.declareType(this, typeMirror, this.startingHeadingLevel);
20
+ }
21
+ onConstructorDeclaration(className, constructors) {
22
+ markdown_generation_util_1.declareMethod('Constructors', this, constructors, this.startingHeadingLevel, className);
23
+ }
24
+ onFieldsDeclaration(fields) {
25
+ markdown_generation_util_1.declareField('Fields', this, fields, this.startingHeadingLevel);
26
+ }
27
+ onPropertiesDeclaration(properties) {
28
+ markdown_generation_util_1.declareField('Properties', this, properties, this.startingHeadingLevel);
29
+ }
30
+ onMethodsDeclaration(methods) {
31
+ markdown_generation_util_1.declareMethod('Methods', this, methods, this.startingHeadingLevel);
32
+ }
33
+ onInnerEnumsDeclaration(enums) {
34
+ this.addInnerTypes('Enums', enums);
35
+ }
36
+ onInnerClassesDeclaration(classes) {
37
+ this.addInnerTypes('Classes', classes);
38
+ }
39
+ onInnerInterfacesDeclaration(interfaces) {
40
+ this.addInnerTypes('Interfaces', interfaces, false);
41
+ }
42
+ addInnerTypes(title, types, addSeparator = true) {
43
+ this.addTitle(title, this.startingHeadingLevel + 1);
44
+ types
45
+ .sort((typeA, typeB) => {
46
+ if (typeA.name < typeB.name)
47
+ return -1;
48
+ if (typeA.name > typeB.name)
49
+ return 1;
50
+ return 0;
51
+ })
52
+ .forEach((currentType) => {
53
+ const innerFile = new MarkdownTypeFile(currentType, this.startingHeadingLevel + 2);
54
+ this.addText(innerFile._contents);
55
+ });
56
+ if (addSeparator) {
57
+ this.addHorizontalRule();
58
+ }
59
+ }
60
+ }
61
+ exports.MarkdownTypeFile = MarkdownTypeFile;
62
+ //# sourceMappingURL=markdown-type-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-type-file.js","sourceRoot":"","sources":["../../src/model/markdown-type-file.ts"],"names":[],"mappings":";;AAUA,sEAAkE;AAElE,mDAA+C;AAC/C,yEAAsF;AACtF,kGAAyF;AAEzF,MAAa,gBAAiB,SAAQ,4BAAY;IAChD,YAAmB,IAAU,EAAS,uBAA+B,CAAC,EAAE,aAAsB;QAC5F,KAAK,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,oCAAwB,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;QADvD,SAAI,GAAJ,IAAI,CAAM;QAAS,yBAAoB,GAApB,oBAAoB,CAAY;QAEpE,IAAI,aAAa,EAAE;YACjB,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;SAC7B;QACD,MAAM,MAAM,GAAG,8BAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAEM,iBAAiB,CAAC,UAAgB,EAAE,YAAgB;QACzD,sCAAW,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC;IAC3D,CAAC;IAEM,wBAAwB,CAAC,SAAiB,EAAE,YAAiC;QAClF,wCAAa,CAAC,cAAc,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;IAC1F,CAAC;IAEM,mBAAmB,CAAC,MAAqB;QAC9C,uCAAY,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC;IAClE,CAAC;IAEM,uBAAuB,CAAC,UAA4B;QACzD,uCAAY,CAAC,YAAY,EAAE,IAAI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F;AA1DD,4CA0DC"}
@@ -0,0 +1,13 @@
1
+ import { FileSystem } from './file-system';
2
+ /**
3
+ * Reads from .cls files and returns their raw body.
4
+ */
5
+ export declare class ApexFileReader {
6
+ /**
7
+ * Reads from .cls files and returns their raw body.
8
+ */
9
+ static processFiles(fileSystem: FileSystem): string[];
10
+ private static isApexFile;
11
+ private static get sourceDirectory();
12
+ private static get readRecursively();
13
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const settings_1 = require("../settings");
4
+ const APEX_FILE_EXTENSION = '.cls';
5
+ /**
6
+ * Reads from .cls files and returns their raw body.
7
+ */
8
+ class ApexFileReader {
9
+ /**
10
+ * Reads from .cls files and returns their raw body.
11
+ */
12
+ static processFiles(fileSystem) {
13
+ let bodies = [];
14
+ const directoryContents = fileSystem.readDirectory(this.sourceDirectory);
15
+ directoryContents.forEach((currentFilePath) => {
16
+ const currentPath = fileSystem.joinPath(this.sourceDirectory, currentFilePath);
17
+ if (this.readRecursively && fileSystem.isDirectory(currentPath)) {
18
+ bodies = bodies.concat(this.processFiles(fileSystem));
19
+ }
20
+ if (!this.isApexFile(currentFilePath)) {
21
+ return;
22
+ }
23
+ const rawFile = fileSystem.readFile(currentPath);
24
+ bodies.push(rawFile);
25
+ });
26
+ return bodies;
27
+ }
28
+ static isApexFile(currentFile) {
29
+ return currentFile.endsWith(APEX_FILE_EXTENSION);
30
+ }
31
+ static get sourceDirectory() {
32
+ return settings_1.Settings.getInstance().sourceDirectory;
33
+ }
34
+ static get readRecursively() {
35
+ return settings_1.Settings.getInstance().recursive;
36
+ }
37
+ }
38
+ exports.ApexFileReader = ApexFileReader;
39
+ //# sourceMappingURL=apex-file-reader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apex-file-reader.js","sourceRoot":"","sources":["../../src/service/apex-file-reader.ts"],"names":[],"mappings":";;AAAA,0CAAuC;AAGvC,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEnC;;GAEG;AACH,MAAa,cAAc;IACzB;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,UAAsB;QACxC,IAAI,MAAM,GAAa,EAAE,CAAC;QAE1B,MAAM,iBAAiB,GAAG,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAEzE,iBAAiB,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,EAAE;YAC5C,MAAM,WAAW,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;YAC/E,IAAI,IAAI,CAAC,eAAe,IAAI,UAAU,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE;gBAC/D,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC;aACvD;YAED,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE;gBACrC,OAAO;aACR;YAED,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;YACjD,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,MAAM,CAAC,UAAU,CAAC,WAAmB;QAC3C,OAAO,WAAW,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IACnD,CAAC;IAEO,MAAM,KAAK,eAAe;QAChC,OAAO,mBAAQ,CAAC,WAAW,EAAE,CAAC,eAAe,CAAC;IAChD,CAAC;IAEO,MAAM,KAAK,eAAe;QAChC,OAAO,mBAAQ,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC;IAC1C,CAAC;CACF;AApCD,wCAoCC"}
@@ -0,0 +1,12 @@
1
+ export interface FileSystem {
2
+ readDirectory: (sourceDirectory: string) => string[];
3
+ isDirectory: (path: string) => boolean;
4
+ readFile: (path: string) => string;
5
+ joinPath: (...paths: string[]) => string;
6
+ }
7
+ export declare class DefaultFileSystem implements FileSystem {
8
+ isDirectory(pathToRead: string): boolean;
9
+ readDirectory(sourceDirectory: string): string[];
10
+ readFile(pathToRead: string): string;
11
+ joinPath(...paths: string[]): string;
12
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const fs = require("fs");
4
+ const path = require("path");
5
+ class DefaultFileSystem {
6
+ isDirectory(pathToRead) {
7
+ return fs.statSync(pathToRead).isDirectory();
8
+ }
9
+ readDirectory(sourceDirectory) {
10
+ return fs.readdirSync(sourceDirectory);
11
+ }
12
+ readFile(pathToRead) {
13
+ const rawFile = fs.readFileSync(pathToRead);
14
+ return rawFile.toString();
15
+ }
16
+ joinPath(...paths) {
17
+ return path.join(...paths);
18
+ }
19
+ }
20
+ exports.DefaultFileSystem = DefaultFileSystem;
21
+ //# sourceMappingURL=file-system.js.map
@@ -0,0 +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"}
@@ -0,0 +1,4 @@
1
+ import { File } from '../model/file';
2
+ export declare class FileWriter {
3
+ static write(files: File[], onWriteCallback: (fileName: string) => void): void;
4
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const fs = require("fs");
4
+ const path = require("path");
5
+ const settings_1 = require("../settings");
6
+ class FileWriter {
7
+ static write(files, onWriteCallback) {
8
+ const outputDir = settings_1.Settings.getInstance().outputDir;
9
+ if (!fs.existsSync(outputDir)) {
10
+ fs.mkdirSync(outputDir);
11
+ }
12
+ files.forEach((file) => {
13
+ const dirPath = path.join(outputDir, file.dir);
14
+ if (!fs.existsSync(dirPath)) {
15
+ fs.mkdirSync(dirPath);
16
+ }
17
+ const filePath = path.join(dirPath, `${file.fileName}${file.fileExtension()}`);
18
+ fs.writeFile(filePath, file.body, 'utf8', () => {
19
+ onWriteCallback(file.fileName);
20
+ });
21
+ });
22
+ }
23
+ }
24
+ exports.FileWriter = FileWriter;
25
+ //# sourceMappingURL=file-writer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-writer.js","sourceRoot":"","sources":["../../src/service/file-writer.ts"],"names":[],"mappings":";;AAAA,yBAAyB;AACzB,6BAA6B;AAE7B,0CAAuC;AAEvC,MAAa,UAAU;IACrB,MAAM,CAAC,KAAK,CAAC,KAAa,EAAE,eAA2C;QACrE,MAAM,SAAS,GAAG,mBAAQ,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC;QACnD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAC7B,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;SACzB;QAED,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACrB,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;YAC/C,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;gBAC3B,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;aACvB;YAED,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;YAC/E,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE;gBAC7C,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACjC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAnBD,gCAmBC"}
@@ -0,0 +1,9 @@
1
+ import Manifest from '../model/manifest';
2
+ import { TypeParser } from './parser';
3
+ import { ReflectionResult } from '@cparra/apex-reflection';
4
+ /**
5
+ * Builds a new Manifest object, sourcing its types from the received TypeParser.
6
+ * @param typeParser In charge of returning the list of reflected types.
7
+ * @param reflect Reflection function.
8
+ */
9
+ export declare function createManifest(typeParser: TypeParser, reflect: (typeBody: string) => ReflectionResult): Manifest;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const manifest_1 = require("../model/manifest");
4
+ /**
5
+ * Builds a new Manifest object, sourcing its types from the received TypeParser.
6
+ * @param typeParser In charge of returning the list of reflected types.
7
+ * @param reflect Reflection function.
8
+ */
9
+ function createManifest(typeParser, reflect) {
10
+ return new manifest_1.default(typeParser.parse(reflect));
11
+ }
12
+ exports.createManifest = createManifest;
13
+ //# sourceMappingURL=manifest-factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-factory.js","sourceRoot":"","sources":["../../src/service/manifest-factory.ts"],"names":[],"mappings":";;AAAA,gDAAyC;AAIzC;;;;GAIG;AACH,SAAgB,cAAc,CAAC,UAAsB,EAAE,OAA+C;IACpG,OAAO,IAAI,kBAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AACjD,CAAC;AAFD,wCAEC"}
@@ -0,0 +1,9 @@
1
+ import { Type, ReflectionResult } from '@cparra/apex-reflection';
2
+ export interface TypeParser {
3
+ parse(reflect: (typeBody: string) => ReflectionResult): Type[];
4
+ }
5
+ export declare class RawBodyParser implements TypeParser {
6
+ typeBodies: string[];
7
+ constructor(typeBodies: string[]);
8
+ parse(reflect: (typeBody: string) => ReflectionResult): Type[];
9
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class RawBodyParser {
4
+ constructor(typeBodies) {
5
+ this.typeBodies = typeBodies;
6
+ }
7
+ parse(reflect) {
8
+ return this.typeBodies
9
+ .map((rawBody) => reflect(rawBody))
10
+ .filter((reflectionResult) => {
11
+ return reflectionResult.typeMirror;
12
+ })
13
+ .map((reflectionResult) => reflectionResult.typeMirror);
14
+ }
15
+ }
16
+ exports.RawBodyParser = RawBodyParser;
17
+ //# sourceMappingURL=parser.js.map
@@ -0,0 +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"}
@@ -0,0 +1,4 @@
1
+ import { Walker, WalkerListener } from './walker';
2
+ export declare class ClassWalker extends Walker {
3
+ walk(listener: WalkerListener): void;
4
+ }