@cparra/apexdocs 2.24.0 → 2.25.0-alpha.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 (317) hide show
  1. package/.eslintrc.js +12 -12
  2. package/.github/workflows/ci.yaml +22 -0
  3. package/.github/workflows/close_stale.yml +22 -22
  4. package/.prettierrc.js +7 -7
  5. package/LICENSE +21 -21
  6. package/README.md +742 -718
  7. package/apexdocs.config.ts +13 -13
  8. package/docs/{README.md → __old/README.md} +1 -1
  9. package/docs/{restapi.json → __old/restapi.json} +589 -589
  10. package/docs/{types → __old/types}/Classes/nspc.ChildClass.md +97 -97
  11. package/docs/{types → __old/types}/Main/nspc.SampleClass.md +189 -189
  12. package/examples/force-app/main/default/classes/AnotherInterface.cls +16 -16
  13. package/examples/force-app/main/default/classes/ChildClass.cls +42 -42
  14. package/examples/force-app/main/default/classes/EscapedAnnotations.cls +5 -5
  15. package/examples/force-app/main/default/classes/GrandparentClass.cls +4 -4
  16. package/examples/force-app/main/default/classes/GroupedClass.cls +8 -8
  17. package/examples/force-app/main/default/classes/MemberGrouping.cls +17 -17
  18. package/examples/force-app/main/default/classes/ParentClass.cls +16 -16
  19. package/examples/force-app/main/default/classes/SampleClass.cls +166 -166
  20. package/examples/force-app/main/default/classes/SampleClass.cls-meta.xml +5 -5
  21. package/examples/force-app/main/default/classes/SampleClassWithoutModifier.cls +9 -9
  22. package/examples/force-app/main/default/classes/SampleInterface.cls +16 -16
  23. package/examples/force-app/main/default/restapi/SampleRestResource.cls +195 -195
  24. package/examples/force-app/main/default/restapi/SampleRestResourceToSkip.cls +35 -35
  25. package/examples/force-app/main/default/restapi/SampleRestResourceWithInnerClass.cls +24 -24
  26. package/examples/force-app/main/default/restapi/SampleRestResourceWithoutApexDocs.cls +15 -15
  27. package/examples/force-app/main/default/restapi/references/Reference1.cls +9 -9
  28. package/examples/force-app/main/default/restapi/references/Reference2.cls +9 -9
  29. package/examples/force-app/main/default/restapi/references/Reference3.cls +3 -3
  30. package/examples/force-app/main/default/restapi/references/Reference4.cls +3 -3
  31. package/examples/force-app/main/default/restapi/references/Reference5.cls +3 -3
  32. package/examples/force-app/main/default/restapi/references/Reference6.cls +6 -6
  33. package/examples/force-app/main/default/restapi/references/Reference7.cls +3 -3
  34. package/examples/includes/header.md +3 -3
  35. package/examples/plain-markdown/.forceignore +12 -0
  36. package/examples/plain-markdown/README.md +301 -0
  37. package/examples/plain-markdown/config/project-scratch-def.json +5 -0
  38. package/examples/plain-markdown/force-app/classes/BaseClass.cls +3 -0
  39. package/examples/plain-markdown/force-app/classes/ParentInterface.cls +3 -0
  40. package/examples/plain-markdown/force-app/classes/ReferencedEnum.cls +3 -0
  41. package/examples/plain-markdown/force-app/classes/SampleClass.cls +35 -0
  42. package/examples/plain-markdown/force-app/classes/SampleEnum.cls +30 -0
  43. package/examples/plain-markdown/force-app/classes/SampleException.cls +1 -0
  44. package/examples/plain-markdown/force-app/classes/SampleInterface.cls +46 -0
  45. package/examples/plain-markdown/package-lock.json +665 -0
  46. package/examples/plain-markdown/package.json +24 -0
  47. package/examples/plain-markdown/sfdx-project.json +12 -0
  48. package/examples/plain-markdown/template.md +3 -0
  49. package/jest.config.js +5 -5
  50. package/lib/adapters/apex-types.d.ts +5 -0
  51. package/lib/adapters/apex-types.js +34 -0
  52. package/lib/adapters/apex-types.js.map +1 -0
  53. package/lib/adapters/documentables.d.ts +6 -0
  54. package/lib/adapters/documentables.js +41 -0
  55. package/lib/adapters/documentables.js.map +1 -0
  56. package/lib/adapters/fields-and-properties.d.ts +3 -0
  57. package/lib/adapters/fields-and-properties.js +10 -0
  58. package/lib/adapters/fields-and-properties.js.map +1 -0
  59. package/lib/adapters/methods-and-constructors.d.ts +4 -0
  60. package/lib/adapters/methods-and-constructors.js +49 -0
  61. package/lib/adapters/methods-and-constructors.js.map +1 -0
  62. package/lib/adapters/references.d.ts +5 -0
  63. package/lib/adapters/references.js +82 -0
  64. package/lib/adapters/references.js.map +1 -0
  65. package/lib/adapters/type-utils.d.ts +2 -0
  66. package/lib/adapters/type-utils.js +8 -0
  67. package/lib/adapters/type-utils.js.map +1 -0
  68. package/lib/application/Apexdocs.d.ts +13 -13
  69. package/lib/application/Apexdocs.js +79 -76
  70. package/lib/application/Apexdocs.js.map +1 -1
  71. package/lib/cli/generate.d.ts +2 -2
  72. package/lib/cli/generate.js +156 -130
  73. package/lib/cli/generate.js.map +1 -1
  74. package/lib/index.d.ts +1 -1
  75. package/lib/index.js +17 -17
  76. package/lib/model/apex-bundle.d.ts +6 -6
  77. package/lib/model/apex-bundle.js +10 -10
  78. package/lib/model/apex-type-wrappers/ClassMirrorWrapper.d.ts +7 -7
  79. package/lib/model/apex-type-wrappers/ClassMirrorWrapper.js +13 -13
  80. package/lib/model/apex-type-wrappers/MethodMirrorWrapper.d.ts +7 -7
  81. package/lib/model/apex-type-wrappers/MethodMirrorWrapper.js +11 -11
  82. package/lib/model/inheritance.d.ts +8 -8
  83. package/lib/model/inheritance.js +2 -2
  84. package/lib/model/manifest.d.ts +22 -22
  85. package/lib/model/manifest.js +46 -46
  86. package/lib/model/manifest.js.map +1 -1
  87. package/lib/model/markdown-file.d.ts +16 -16
  88. package/lib/model/markdown-file.js +109 -106
  89. package/lib/model/markdown-file.js.map +1 -1
  90. package/lib/model/markdown-generation-util/doc-comment-annotation-util.d.ts +8 -8
  91. package/lib/model/markdown-generation-util/doc-comment-annotation-util.js +46 -43
  92. package/lib/model/markdown-generation-util/doc-comment-annotation-util.js.map +1 -1
  93. package/lib/model/markdown-generation-util/field-declaration-util.d.ts +3 -3
  94. package/lib/model/markdown-generation-util/field-declaration-util.js +54 -54
  95. package/lib/model/markdown-generation-util/index.d.ts +3 -3
  96. package/lib/model/markdown-generation-util/index.js +19 -19
  97. package/lib/model/markdown-generation-util/method-declaration-util.d.ts +4 -4
  98. package/lib/model/markdown-generation-util/method-declaration-util.js +114 -114
  99. package/lib/model/markdown-generation-util/type-declaration-util.d.ts +3 -3
  100. package/lib/model/markdown-generation-util/type-declaration-util.js +81 -81
  101. package/lib/model/markdown-home-file.d.ts +11 -11
  102. package/lib/model/markdown-home-file.js +56 -53
  103. package/lib/model/markdown-home-file.js.map +1 -1
  104. package/lib/model/markdown-type-file.d.ts +26 -26
  105. package/lib/model/markdown-type-file.js +136 -133
  106. package/lib/model/markdown-type-file.js.map +1 -1
  107. package/lib/model/openapi/apex-doc-types.d.ts +19 -19
  108. package/lib/model/openapi/apex-doc-types.js +4 -4
  109. package/lib/model/openapi/open-api-types.d.ts +93 -93
  110. package/lib/model/openapi/open-api-types.js +2 -2
  111. package/lib/model/openapi/open-api.d.ts +16 -16
  112. package/lib/model/openapi/open-api.js +33 -33
  113. package/lib/model/openapi/openapi-type-file.d.ts +7 -7
  114. package/lib/model/openapi/openapi-type-file.js +16 -16
  115. package/lib/model/outputFile.d.ts +10 -10
  116. package/lib/model/outputFile.js +28 -28
  117. package/lib/model/types-repository.d.ts +16 -16
  118. package/lib/model/types-repository.js +53 -53
  119. package/lib/service/apex-file-reader.d.ts +14 -14
  120. package/lib/service/apex-file-reader.js +48 -45
  121. package/lib/service/apex-file-reader.js.map +1 -1
  122. package/lib/service/file-system.d.ts +14 -14
  123. package/lib/service/file-system.js +47 -24
  124. package/lib/service/file-system.js.map +1 -1
  125. package/lib/service/file-writer.d.ts +6 -6
  126. package/lib/service/file-writer.js +56 -33
  127. package/lib/service/file-writer.js.map +1 -1
  128. package/lib/service/manifest-factory.d.ts +10 -10
  129. package/lib/service/manifest-factory.js +16 -13
  130. package/lib/service/manifest-factory.js.map +1 -1
  131. package/lib/service/metadata-processor.d.ts +3 -3
  132. package/lib/service/metadata-processor.js +16 -16
  133. package/lib/service/parser.d.ts +21 -21
  134. package/lib/service/parser.js +137 -134
  135. package/lib/service/parser.js.map +1 -1
  136. package/lib/service/state.d.ts +9 -9
  137. package/lib/service/state.js +19 -19
  138. package/lib/service/walkers/class-walker.d.ts +4 -4
  139. package/lib/service/walkers/class-walker.js +32 -32
  140. package/lib/service/walkers/enum-walker.d.ts +4 -4
  141. package/lib/service/walkers/enum-walker.js +10 -10
  142. package/lib/service/walkers/interface-walker.d.ts +4 -4
  143. package/lib/service/walkers/interface-walker.js +14 -14
  144. package/lib/service/walkers/walker-factory.d.ts +5 -5
  145. package/lib/service/walkers/walker-factory.js +20 -20
  146. package/lib/service/walkers/walker.d.ts +19 -19
  147. package/lib/service/walkers/walker.js +16 -16
  148. package/lib/settings.d.ts +70 -64
  149. package/lib/settings.js +99 -88
  150. package/lib/settings.js.map +1 -1
  151. package/lib/templating/compile.d.ts +7 -0
  152. package/lib/templating/compile.js +98 -0
  153. package/lib/templating/compile.js.map +1 -0
  154. package/lib/templating/helpers.d.ts +2 -0
  155. package/lib/templating/helpers.js +18 -0
  156. package/lib/templating/helpers.js.map +1 -0
  157. package/lib/test-helpers/AnnotationBuilder.d.ts +12 -12
  158. package/lib/test-helpers/AnnotationBuilder.js +30 -30
  159. package/lib/test-helpers/ClassMirrorBuilder.d.ts +18 -18
  160. package/lib/test-helpers/ClassMirrorBuilder.js +53 -53
  161. package/lib/test-helpers/DocCommentAnnotationBuilder.d.ts +8 -8
  162. package/lib/test-helpers/DocCommentAnnotationBuilder.js +25 -25
  163. package/lib/test-helpers/DocCommentBuilder.d.ts +12 -12
  164. package/lib/test-helpers/DocCommentBuilder.js +37 -37
  165. package/lib/test-helpers/FieldMirrorBuilder.d.ts +18 -18
  166. package/lib/test-helpers/FieldMirrorBuilder.js +53 -53
  167. package/lib/test-helpers/InterfaceMirrorBuilder.d.ts +16 -0
  168. package/lib/test-helpers/InterfaceMirrorBuilder.js +43 -0
  169. package/lib/test-helpers/InterfaceMirrorBuilder.js.map +1 -0
  170. package/lib/test-helpers/MethodMirrorBuilder.d.ts +29 -10
  171. package/lib/test-helpers/MethodMirrorBuilder.js +71 -36
  172. package/lib/test-helpers/MethodMirrorBuilder.js.map +1 -1
  173. package/lib/test-helpers/SettingsBuilder.d.ts +8 -8
  174. package/lib/test-helpers/SettingsBuilder.js +26 -26
  175. package/lib/transpiler/factory.d.ts +6 -6
  176. package/lib/transpiler/factory.js +34 -31
  177. package/lib/transpiler/factory.js.map +1 -1
  178. package/lib/transpiler/file-container.d.ts +6 -6
  179. package/lib/transpiler/file-container.js +15 -15
  180. package/lib/transpiler/generator-choices.d.ts +1 -1
  181. package/lib/transpiler/generator-choices.js +2 -2
  182. package/lib/transpiler/markdown/class-file-generatorHelper.d.ts +11 -8
  183. package/lib/transpiler/markdown/class-file-generatorHelper.js +74 -55
  184. package/lib/transpiler/markdown/class-file-generatorHelper.js.map +1 -1
  185. package/lib/transpiler/markdown/docsify/docsify-docs-processor.d.ts +6 -6
  186. package/lib/transpiler/markdown/docsify/docsify-docs-processor.js +12 -12
  187. package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.d.ts +11 -11
  188. package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js +50 -50
  189. package/lib/transpiler/markdown/markdown-transpiler-base.d.ts +11 -11
  190. package/lib/transpiler/markdown/markdown-transpiler-base.js +26 -23
  191. package/lib/transpiler/markdown/markdown-transpiler-base.js.map +1 -1
  192. package/lib/transpiler/markdown/plain-markdown/class-template.d.ts +1 -0
  193. package/lib/transpiler/markdown/plain-markdown/class-template.js +36 -0
  194. package/lib/transpiler/markdown/plain-markdown/class-template.js.map +1 -0
  195. package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.d.ts +1 -0
  196. package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.js +39 -0
  197. package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.js.map +1 -0
  198. package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.d.ts +1 -0
  199. package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.js +25 -0
  200. package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.js.map +1 -0
  201. package/lib/transpiler/markdown/plain-markdown/enum-template.d.ts +1 -0
  202. package/lib/transpiler/markdown/plain-markdown/enum-template.js +15 -0
  203. package/lib/transpiler/markdown/plain-markdown/enum-template.js.map +1 -0
  204. package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.d.ts +1 -0
  205. package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js +24 -0
  206. package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js.map +1 -0
  207. package/lib/transpiler/markdown/plain-markdown/interface-template.d.ts +1 -0
  208. package/lib/transpiler/markdown/plain-markdown/interface-template.js +20 -0
  209. package/lib/transpiler/markdown/plain-markdown/interface-template.js.map +1 -0
  210. package/lib/transpiler/markdown/plain-markdown/methods-partial-template.d.ts +1 -0
  211. package/lib/transpiler/markdown/plain-markdown/methods-partial-template.js +49 -0
  212. package/lib/transpiler/markdown/plain-markdown/methods-partial-template.js.map +1 -0
  213. package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.d.ts +13 -6
  214. package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js +121 -13
  215. package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js.map +1 -1
  216. package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.d.ts +1 -0
  217. package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.js +31 -0
  218. package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.js.map +1 -0
  219. package/lib/transpiler/openapi/open-api-docs-processor.d.ts +13 -13
  220. package/lib/transpiler/openapi/open-api-docs-processor.js +77 -74
  221. package/lib/transpiler/openapi/open-api-docs-processor.js.map +1 -1
  222. package/lib/transpiler/openapi/parsers/Builder.d.ts +16 -16
  223. package/lib/transpiler/openapi/parsers/Builder.js +29 -29
  224. package/lib/transpiler/openapi/parsers/Builder.js.map +1 -1
  225. package/lib/transpiler/openapi/parsers/MethodParser.d.ts +20 -20
  226. package/lib/transpiler/openapi/parsers/MethodParser.js +189 -166
  227. package/lib/transpiler/openapi/parsers/MethodParser.js.map +1 -1
  228. package/lib/transpiler/openapi/parsers/ParameterObjectBuilder.d.ts +7 -7
  229. package/lib/transpiler/openapi/parsers/ParameterObjectBuilder.js +10 -10
  230. package/lib/transpiler/openapi/parsers/ReferenceBuilder.d.ts +39 -39
  231. package/lib/transpiler/openapi/parsers/ReferenceBuilder.js +248 -225
  232. package/lib/transpiler/openapi/parsers/ReferenceBuilder.js.map +1 -1
  233. package/lib/transpiler/openapi/parsers/RequestBodyBuilder.d.ts +10 -10
  234. package/lib/transpiler/openapi/parsers/RequestBodyBuilder.js +19 -19
  235. package/lib/transpiler/openapi/parsers/ResponsesBuilder.d.ts +7 -7
  236. package/lib/transpiler/openapi/parsers/ResponsesBuilder.js +21 -21
  237. package/lib/transpiler/processor-type-transpiler.d.ts +10 -10
  238. package/lib/transpiler/processor-type-transpiler.js +8 -8
  239. package/lib/transpiler/transpiler.d.ts +5 -5
  240. package/lib/transpiler/transpiler.js +29 -26
  241. package/lib/transpiler/transpiler.js.map +1 -1
  242. package/lib/util/error-logger.d.ts +8 -8
  243. package/lib/util/error-logger.js +89 -89
  244. package/lib/util/error-logger.js.map +1 -1
  245. package/lib/util/logger.d.ts +21 -21
  246. package/lib/util/logger.js +60 -57
  247. package/lib/util/logger.js.map +1 -1
  248. package/lib/util/string-utils.d.ts +2 -2
  249. package/lib/util/string-utils.js +14 -14
  250. package/package.json +79 -78
  251. package/src/adapters/__tests__/interface-adapter.spec.ts +76 -0
  252. package/src/adapters/__tests__/references.spec.ts +115 -0
  253. package/src/adapters/apex-types.ts +67 -0
  254. package/src/adapters/documentables.ts +58 -0
  255. package/src/adapters/fields-and-properties.ts +14 -0
  256. package/src/adapters/methods-and-constructors.ts +78 -0
  257. package/src/adapters/references.ts +113 -0
  258. package/src/adapters/type-utils.ts +5 -0
  259. package/src/adapters/types.d.ts +8 -0
  260. package/src/cli/generate.ts +3 -0
  261. package/src/model/__tests__/manifest.spec.ts +1 -0
  262. package/src/model/manifest.ts +3 -3
  263. package/src/model/markdown-file.ts +1 -1
  264. package/src/model/openapi/open-api-types.ts +2 -2
  265. package/src/service/__tests__/apex-file-reader.spec.ts +4 -4
  266. package/src/service/__tests__/manifest-factory.spec.ts +1 -2
  267. package/src/settings.ts +15 -0
  268. package/src/templating/__tests__/compile.spec.ts +741 -0
  269. package/src/templating/compile.ts +187 -0
  270. package/src/templating/helpers.ts +14 -0
  271. package/src/templating/types.d.ts +104 -0
  272. package/src/test-helpers/FieldMirrorBuilder.ts +1 -1
  273. package/src/test-helpers/InterfaceMirrorBuilder.ts +44 -0
  274. package/src/test-helpers/MethodMirrorBuilder.ts +46 -6
  275. package/src/transpiler/markdown/class-file-generatorHelper.ts +22 -2
  276. package/src/transpiler/markdown/plain-markdown/class-template.ts +32 -0
  277. package/src/transpiler/markdown/plain-markdown/constructors-partial-template.ts +35 -0
  278. package/src/transpiler/markdown/plain-markdown/documentable-partial-template.ts +21 -0
  279. package/src/transpiler/markdown/plain-markdown/enum-template.ts +11 -0
  280. package/src/transpiler/markdown/plain-markdown/fieldsPartialTemplate.ts +20 -0
  281. package/src/transpiler/markdown/plain-markdown/interface-template.ts +16 -0
  282. package/src/transpiler/markdown/plain-markdown/methods-partial-template.ts +45 -0
  283. package/src/transpiler/markdown/plain-markdown/plain-docsProcessor.ts +122 -0
  284. package/src/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.ts +27 -0
  285. package/src/transpiler/openapi/parsers/Builder.ts +1 -1
  286. package/src/transpiler/openapi/parsers/MethodParser.ts +1 -1
  287. package/src/transpiler/openapi/parsers/ReferenceBuilder.ts +1 -1
  288. package/src/util/error-logger.ts +4 -4
  289. package/src/util/logger.ts +3 -3
  290. package/tsconfig.json +21 -20
  291. package/tslint.json +5 -5
  292. package/lib/model/manifest-diff.d.ts +0 -27
  293. package/lib/model/manifest-diff.js +0 -69
  294. package/lib/model/manifest-diff.js.map +0 -1
  295. package/src/model/__tests__/manifest-diff.spec.ts +0 -139
  296. package/src/model/manifest-diff.ts +0 -94
  297. /package/docs/{index.html → __old/index.html} +0 -0
  298. /package/docs/{types → __old/types}/Classes/nspc.AnotherInterface.md +0 -0
  299. /package/docs/{types → __old/types}/Main/nspc.GroupedClass.md +0 -0
  300. /package/docs/{types → __old/types}/Misc-Group/nspc.EscapedAnnotations.md +0 -0
  301. /package/docs/{types → __old/types}/Misc-Group/nspc.GrandparentClass.md +0 -0
  302. /package/docs/{types → __old/types}/Misc-Group/nspc.InterfaceWithInheritance.md +0 -0
  303. /package/docs/{types → __old/types}/Misc-Group/nspc.MemberGrouping.md +0 -0
  304. /package/docs/{types → __old/types}/Misc-Group/nspc.ParentClass.md +0 -0
  305. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference1.md +0 -0
  306. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference2.md +0 -0
  307. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference3.md +0 -0
  308. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference4.md +0 -0
  309. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference5.md +0 -0
  310. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference6.md +0 -0
  311. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference7.md +0 -0
  312. /package/docs/{types → __old/types}/Misc-Group/nspc.SampleClassWithoutModifier.md +0 -0
  313. /package/docs/{types → __old/types}/Misc-Group/nspc.SampleRestResource.md +0 -0
  314. /package/docs/{types → __old/types}/Misc-Group/nspc.SampleRestResourceWithInnerClass.md +0 -0
  315. /package/docs/{types → __old/types}/Misc-Group/nspc.SampleRestResourceWithoutApexDocs.md +0 -0
  316. /package/docs/{types → __old/types}/README.md +0 -0
  317. /package/docs/{types → __old/types}/Sample-Interfaces/nspc.SampleInterface.md +0 -0
@@ -1,47 +1,47 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /**
4
- * Represents the full library of Apex top-level types (classes, enums, and interface) for a Salesforce project.
5
- */
6
- class Manifest {
7
- /**
8
- * Constructs a new Manifest object.
9
- * @param types List of types to be wrapped by this object.
10
- * @param isForInnerTypes Whether this manifest represent an inner type or not.
11
- */
12
- constructor(types, isForInnerTypes = false) {
13
- this.types = types;
14
- this.isForInnerTypes = isForInnerTypes;
15
- }
16
- filteredByAccessModifierAndAnnotations(modifiers) {
17
- const filteredTypes = this.filterAccessibleModifier(this.types, modifiers);
18
- const typesToReturn = [];
19
- for (const filteredType of filteredTypes) {
20
- const currentType = filteredType;
21
- if (currentType.type_name !== 'class') {
22
- typesToReturn.push(currentType);
23
- continue;
24
- }
25
- const currentClass = currentType;
26
- let filteredClass = Object.assign(Object.assign({}, currentType), { methods: this.filterAccessibleModifier(currentClass.methods, modifiers), properties: this.filterAccessibleModifier(currentClass.properties, modifiers), fields: this.filterAccessibleModifier(currentClass.fields, modifiers), constructors: this.filterAccessibleModifier(currentClass.constructors, modifiers) });
27
- if (!this.isForInnerTypes) {
28
- filteredClass = Object.assign(Object.assign({}, filteredClass), { enums: this.filterAccessibleModifier(currentClass.enums, modifiers), interfaces: this.filterAccessibleModifier(currentClass.interfaces, modifiers), classes: new Manifest(currentClass.classes, true).filteredByAccessModifierAndAnnotations(modifiers) });
29
- }
30
- typesToReturn.push(filteredClass);
31
- }
32
- return typesToReturn;
33
- }
34
- filterAccessibleModifier(accessAndDocAwares, modifiers) {
35
- return accessAndDocAwares.filter((currentType) => {
36
- var _a;
37
- const hasIgnoreDocAnnotation = (_a = currentType.docComment) === null || _a === void 0 ? void 0 : _a.annotations.some((annotation) => annotation.name === 'ignore');
38
- if (hasIgnoreDocAnnotation) {
39
- return false;
40
- }
41
- return (modifiers.includes(currentType.access_modifier) ||
42
- currentType.annotations.some((annotation) => modifiers.includes(annotation.type.toLowerCase())));
43
- });
44
- }
45
- }
46
- exports.default = Manifest;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * Represents the full library of Apex top-level types (classes, enums, and interface) for a Salesforce project.
5
+ */
6
+ class Manifest {
7
+ /**
8
+ * Constructs a new Manifest object.
9
+ * @param types List of types to be wrapped by this object.
10
+ * @param isForInnerTypes Whether this manifest represent an inner type or not.
11
+ */
12
+ constructor(types, isForInnerTypes = false) {
13
+ this.types = types;
14
+ this.isForInnerTypes = isForInnerTypes;
15
+ }
16
+ filteredByAccessModifierAndAnnotations(modifiers) {
17
+ const filteredTypes = this.filterAccessibleModifier(this.types, modifiers);
18
+ const typesToReturn = [];
19
+ for (const filteredType of filteredTypes) {
20
+ const currentType = filteredType;
21
+ if (currentType.type_name !== 'class') {
22
+ typesToReturn.push(currentType);
23
+ continue;
24
+ }
25
+ const currentClass = currentType;
26
+ let filteredClass = Object.assign(Object.assign({}, currentType), { methods: this.filterAccessibleModifier(currentClass.methods, modifiers), properties: this.filterAccessibleModifier(currentClass.properties, modifiers), fields: this.filterAccessibleModifier(currentClass.fields, modifiers), constructors: this.filterAccessibleModifier(currentClass.constructors, modifiers) });
27
+ if (!this.isForInnerTypes) {
28
+ filteredClass = Object.assign(Object.assign({}, filteredClass), { enums: this.filterAccessibleModifier(currentClass.enums, modifiers), interfaces: this.filterAccessibleModifier(currentClass.interfaces, modifiers), classes: new Manifest(currentClass.classes, true).filteredByAccessModifierAndAnnotations(modifiers) });
29
+ }
30
+ typesToReturn.push(filteredClass);
31
+ }
32
+ return typesToReturn;
33
+ }
34
+ filterAccessibleModifier(accessAndDocAware, modifiers) {
35
+ return accessAndDocAware.filter((currentType) => {
36
+ var _a;
37
+ const hasIgnoreDocAnnotation = (_a = currentType.docComment) === null || _a === void 0 ? void 0 : _a.annotations.some((annotation) => annotation.name === 'ignore');
38
+ if (hasIgnoreDocAnnotation) {
39
+ return false;
40
+ }
41
+ return (modifiers.includes(currentType.access_modifier) ||
42
+ currentType.annotations.some((annotation) => modifiers.includes(annotation.type.toLowerCase())));
43
+ });
44
+ }
45
+ }
46
+ exports.default = Manifest;
47
47
  //# sourceMappingURL=manifest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/model/manifest.ts"],"names":[],"mappings":";;AAYA;;GAEG;AACH,MAA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ACd;YACD,OAAO,CACL,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,eAAe,CAAC;gBAC/C,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,UAAsB,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAC5G,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AA1DD,2BA0DC"}
@@ -1,16 +1,16 @@
1
- import { OutputFile } from './outputFile';
2
- export declare class MarkdownFile extends OutputFile {
3
- fileExtension(): string;
4
- addTitle(text: string, level?: number): void;
5
- addText(text: string, encodeHtml?: boolean): void;
6
- addLink(text: string, encodeHtml?: boolean): void;
7
- startCodeBlock(language?: string): void;
8
- endCodeBlock(): void;
9
- addHorizontalRule(): void;
10
- initializeTable(...headers: string[]): void;
11
- addTableRow(...columns: string[]): void;
12
- addListItem(text: string): void;
13
- protected static replaceInlineLinks(text: string): string;
14
- protected static replaceInlineEmails(text: string): string;
15
- private _replaceInlineReferences;
16
- }
1
+ import { OutputFile } from './outputFile';
2
+ export declare class MarkdownFile extends OutputFile {
3
+ fileExtension(): string;
4
+ addTitle(text: string, level?: number): void;
5
+ addText(text: string, encodeHtml?: boolean): void;
6
+ addLink(text: string, encodeHtml?: boolean): void;
7
+ startCodeBlock(language?: string): void;
8
+ endCodeBlock(): void;
9
+ addHorizontalRule(): void;
10
+ initializeTable(...headers: string[]): void;
11
+ addTableRow(...columns: string[]): void;
12
+ addListItem(text: string): void;
13
+ protected static replaceInlineLinks(text: string): string;
14
+ protected static replaceInlineEmails(text: string): string;
15
+ private _replaceInlineReferences;
16
+ }
@@ -1,107 +1,110 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MarkdownFile = void 0;
4
- const outputFile_1 = require("./outputFile");
5
- const class_file_generatorHelper_1 = require("../transpiler/markdown/class-file-generatorHelper");
6
- class MarkdownFile extends outputFile_1.OutputFile {
7
- fileExtension() {
8
- return '.md';
9
- }
10
- addTitle(text, level = 1) {
11
- let title = '';
12
- for (let i = 0; i < level; i++) {
13
- title += '#';
14
- }
15
- title += ' ';
16
- title += text;
17
- this._contents += title;
18
- this.addBlankLine();
19
- }
20
- addText(text, encodeHtml = true) {
21
- super.addText(this._replaceInlineReferences(text), encodeHtml);
22
- }
23
- addLink(text, encodeHtml = true) {
24
- this.addText(`\{@link ${text}\}`, encodeHtml);
25
- }
26
- startCodeBlock(language = 'apex') {
27
- this.addText(`\`\`\`${language}`);
28
- }
29
- endCodeBlock() {
30
- this.addText('```');
31
- this.addBlankLine();
32
- }
33
- addHorizontalRule() {
34
- this._contents += '---';
35
- this.addBlankLine();
36
- }
37
- initializeTable(...headers) {
38
- this.addBlankLine();
39
- this._contents += '|';
40
- headers.forEach((header) => {
41
- this._contents += header + '|';
42
- });
43
- this.addBlankLine();
44
- this._contents += '|';
45
- headers.forEach((_) => {
46
- this._contents += '---' + '|';
47
- });
48
- this.addBlankLine();
49
- }
50
- addTableRow(...columns) {
51
- this._contents += '|';
52
- columns.forEach((column) => {
53
- this._contents += this._replaceInlineReferences(column) + '|';
54
- });
55
- this.addBlankLine();
56
- }
57
- addListItem(text) {
58
- this._contents += `* ${text}`;
59
- }
60
- static replaceInlineLinks(text) {
61
- // Parsing text to extract possible linking classes.
62
- const possibleLinks = text.match(/<<.*?>>/g);
63
- possibleLinks === null || possibleLinks === void 0 ? void 0 : possibleLinks.forEach((currentMatch) => {
64
- const classNameForMatch = currentMatch.replace('<<', '').replace('>>', '');
65
- text = text.replace(currentMatch, class_file_generatorHelper_1.default.getFileLinkByTypeName(classNameForMatch));
66
- });
67
- // Parsing links using {@link ClassName} format
68
- const linkFormatRegEx = '{@link (.*?)}';
69
- const expression = new RegExp(linkFormatRegEx, 'gi');
70
- let match;
71
- const matches = [];
72
- do {
73
- match = expression.exec(text);
74
- if (match) {
75
- matches.push(match);
76
- }
77
- } while (match);
78
- for (const currentMatch of matches) {
79
- text = text.replace(currentMatch[0], class_file_generatorHelper_1.default.getFileLinkByTypeName(currentMatch[1]));
80
- }
81
- return text;
82
- }
83
- static replaceInlineEmails(text) {
84
- // Parsing links using {@link ClassName} format
85
- const linkFormatRegEx = '{@email (.*?)}';
86
- const expression = new RegExp(linkFormatRegEx, 'gi');
87
- let match;
88
- const matches = [];
89
- do {
90
- match = expression.exec(text);
91
- if (match) {
92
- matches.push(match);
93
- }
94
- } while (match);
95
- for (const currentMatch of matches) {
96
- text = text.replace(currentMatch[0], `[${currentMatch[1]}](mailto:${currentMatch[1]})`);
97
- }
98
- return text;
99
- }
100
- _replaceInlineReferences(text) {
101
- text = MarkdownFile.replaceInlineLinks(text);
102
- text = MarkdownFile.replaceInlineEmails(text);
103
- return text;
104
- }
105
- }
106
- exports.MarkdownFile = MarkdownFile;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.MarkdownFile = void 0;
7
+ const outputFile_1 = require("./outputFile");
8
+ const class_file_generatorHelper_1 = __importDefault(require("../transpiler/markdown/class-file-generatorHelper"));
9
+ class MarkdownFile extends outputFile_1.OutputFile {
10
+ fileExtension() {
11
+ return '.md';
12
+ }
13
+ addTitle(text, level = 1) {
14
+ let title = '';
15
+ for (let i = 0; i < level; i++) {
16
+ title += '#';
17
+ }
18
+ title += ' ';
19
+ title += text;
20
+ this._contents += title;
21
+ this.addBlankLine();
22
+ }
23
+ addText(text, encodeHtml = true) {
24
+ super.addText(this._replaceInlineReferences(text), encodeHtml);
25
+ }
26
+ addLink(text, encodeHtml = true) {
27
+ this.addText(`\{@link ${text}\}`, encodeHtml);
28
+ }
29
+ startCodeBlock(language = 'apex') {
30
+ this.addText(`\`\`\`${language}`);
31
+ }
32
+ endCodeBlock() {
33
+ this.addText('```');
34
+ this.addBlankLine();
35
+ }
36
+ addHorizontalRule() {
37
+ this._contents += '---';
38
+ this.addBlankLine();
39
+ }
40
+ initializeTable(...headers) {
41
+ this.addBlankLine();
42
+ this._contents += '|';
43
+ headers.forEach((header) => {
44
+ this._contents += header + '|';
45
+ });
46
+ this.addBlankLine();
47
+ this._contents += '|';
48
+ headers.forEach(() => {
49
+ this._contents += '---' + '|';
50
+ });
51
+ this.addBlankLine();
52
+ }
53
+ addTableRow(...columns) {
54
+ this._contents += '|';
55
+ columns.forEach((column) => {
56
+ this._contents += this._replaceInlineReferences(column) + '|';
57
+ });
58
+ this.addBlankLine();
59
+ }
60
+ addListItem(text) {
61
+ this._contents += `* ${text}`;
62
+ }
63
+ static replaceInlineLinks(text) {
64
+ // Parsing text to extract possible linking classes.
65
+ const possibleLinks = text.match(/<<.*?>>/g);
66
+ possibleLinks === null || possibleLinks === void 0 ? void 0 : possibleLinks.forEach((currentMatch) => {
67
+ const classNameForMatch = currentMatch.replace('<<', '').replace('>>', '');
68
+ text = text.replace(currentMatch, class_file_generatorHelper_1.default.getFileLinkByTypeName(classNameForMatch));
69
+ });
70
+ // Parsing links using {@link ClassName} format
71
+ const linkFormatRegEx = '{@link (.*?)}';
72
+ const expression = new RegExp(linkFormatRegEx, 'gi');
73
+ let match;
74
+ const matches = [];
75
+ do {
76
+ match = expression.exec(text);
77
+ if (match) {
78
+ matches.push(match);
79
+ }
80
+ } while (match);
81
+ for (const currentMatch of matches) {
82
+ text = text.replace(currentMatch[0], class_file_generatorHelper_1.default.getFileLinkByTypeName(currentMatch[1]));
83
+ }
84
+ return text;
85
+ }
86
+ static replaceInlineEmails(text) {
87
+ // Parsing links using {@link ClassName} format
88
+ const linkFormatRegEx = '{@email (.*?)}';
89
+ const expression = new RegExp(linkFormatRegEx, 'gi');
90
+ let match;
91
+ const matches = [];
92
+ do {
93
+ match = expression.exec(text);
94
+ if (match) {
95
+ matches.push(match);
96
+ }
97
+ } while (match);
98
+ for (const currentMatch of matches) {
99
+ text = text.replace(currentMatch[0], `[${currentMatch[1]}](mailto:${currentMatch[1]})`);
100
+ }
101
+ return text;
102
+ }
103
+ _replaceInlineReferences(text) {
104
+ text = MarkdownFile.replaceInlineLinks(text);
105
+ text = MarkdownFile.replaceInlineEmails(text);
106
+ return text;
107
+ }
108
+ }
109
+ exports.MarkdownFile = MarkdownFile;
107
110
  //# sourceMappingURL=markdown-file.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"markdown-file.js","sourceRoot":"","sources":["../../src/model/markdown-file.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,kGAAyF;AAEzF,MAAa,YAAa,SAAQ,uBAAU;IAC1C,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;IAEM,OAAO,CAAC,IAAY,EAAE,UAAU,GAAG,IAAI;QAC5C,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;IACjE,CAAC;IAEM,OAAO,CAAC,IAAY,EAAE,UAAU,GAAG,IAAI;QAC5C,IAAI,CAAC,OAAO,CAAC,WAAW,IAAI,IAAI,EAAE,UAAU,CAAC,CAAC;IAChD,CAAC;IAED,cAAc,CAAC,QAAQ,GAAG,MAAM;QAC9B,IAAI,CAAC,OAAO,CAAC,SAAS,QAAQ,EAAE,CAAC,CAAC;IACpC,CAAC;IAED,YAAY;QACV,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACpB,I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G,EAAE,CAAC;QAEnB,GAAG;YACD,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC9B,IAAI,KAAK,EAAE;gBACT,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACrB;SACF,QAAQ,KAAK,EAAE;QAEhB,KAAK,MAAM,YAAY,IAAI,OAAO,EAAE;YAClC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,IAAI,YAAY,CAAC,CAAC,CAAC,YAAY,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;SACzF;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,wBAAwB,CAAC,IAAY;QAC3C,IAAI,GAAG,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,GAAG,YAAY,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AArHD,oCAqHC"}
@@ -1,8 +1,8 @@
1
- import { DocComment } from '@cparra/apex-reflection';
2
- import { MarkdownFile } from '../markdown-file';
3
- interface DocCommentAware {
4
- docComment?: DocComment;
5
- }
6
- export declare function addMermaid(markdownFile: MarkdownFile, docCommentAware: DocCommentAware): void;
7
- export declare function addCustomDocCommentAnnotations(markdownFile: MarkdownFile, docCommentAware: DocCommentAware): void;
8
- export {};
1
+ import { DocComment } from '@cparra/apex-reflection';
2
+ import { MarkdownFile } from '../markdown-file';
3
+ interface DocCommentAware {
4
+ docComment?: DocComment;
5
+ }
6
+ export declare function addMermaid(markdownFile: MarkdownFile, docCommentAware: DocCommentAware): void;
7
+ export declare function addCustomDocCommentAnnotations(markdownFile: MarkdownFile, docCommentAware: DocCommentAware): void;
8
+ export {};
@@ -1,44 +1,47 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addCustomDocCommentAnnotations = exports.addMermaid = void 0;
4
- const class_file_generatorHelper_1 = require("../../transpiler/markdown/class-file-generatorHelper");
5
- function addMermaid(markdownFile, docCommentAware) {
6
- var _a;
7
- const mermaid = (_a = docCommentAware.docComment) === null || _a === void 0 ? void 0 : _a.annotations.find((annotation) => annotation.name === 'mermaid');
8
- if (!mermaid) {
9
- return;
10
- }
11
- markdownFile.addBlankLine();
12
- markdownFile.startCodeBlock('mermaid');
13
- mermaid.bodyLines.forEach((line) => {
14
- markdownFile.addText(line, false);
15
- });
16
- markdownFile.endCodeBlock();
17
- markdownFile.addBlankLine();
18
- }
19
- exports.addMermaid = addMermaid;
20
- function addCustomDocCommentAnnotations(markdownFile, docCommentAware) {
21
- var _a;
22
- (_a = docCommentAware.docComment) === null || _a === void 0 ? void 0 : _a.annotations.filter((currentAnnotation) => currentAnnotation.name !== 'description').filter((currentAnnotation) => currentAnnotation.name !== 'mermaid').forEach((currentAnnotation) => {
23
- markdownFile.addBlankLine();
24
- markdownFile.addText(buildDocAnnotationText(currentAnnotation));
25
- markdownFile.addBlankLine();
26
- });
27
- function splitAndCapitalize(text) {
28
- const words = text.split(/[-_]+/);
29
- const capitalizedWords = [];
30
- for (const word of words) {
31
- capitalizedWords.push(word.charAt(0).toUpperCase() + word.slice(1));
32
- }
33
- return capitalizedWords.join(' ');
34
- }
35
- function buildDocAnnotationText(annotation) {
36
- let annotationBodyText = annotation.body;
37
- if (annotation.name.toLowerCase() === 'see') {
38
- annotationBodyText = class_file_generatorHelper_1.default.getFileLinkByTypeName(annotation.body);
39
- }
40
- return `**${splitAndCapitalize(annotation.name)}** ${annotationBodyText}`;
41
- }
42
- }
43
- exports.addCustomDocCommentAnnotations = addCustomDocCommentAnnotations;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.addCustomDocCommentAnnotations = exports.addMermaid = void 0;
7
+ const class_file_generatorHelper_1 = __importDefault(require("../../transpiler/markdown/class-file-generatorHelper"));
8
+ function addMermaid(markdownFile, docCommentAware) {
9
+ var _a;
10
+ const mermaid = (_a = docCommentAware.docComment) === null || _a === void 0 ? void 0 : _a.annotations.find((annotation) => annotation.name === 'mermaid');
11
+ if (!mermaid) {
12
+ return;
13
+ }
14
+ markdownFile.addBlankLine();
15
+ markdownFile.startCodeBlock('mermaid');
16
+ mermaid.bodyLines.forEach((line) => {
17
+ markdownFile.addText(line, false);
18
+ });
19
+ markdownFile.endCodeBlock();
20
+ markdownFile.addBlankLine();
21
+ }
22
+ exports.addMermaid = addMermaid;
23
+ function addCustomDocCommentAnnotations(markdownFile, docCommentAware) {
24
+ var _a;
25
+ (_a = docCommentAware.docComment) === null || _a === void 0 ? void 0 : _a.annotations.filter((currentAnnotation) => currentAnnotation.name !== 'description').filter((currentAnnotation) => currentAnnotation.name !== 'mermaid').forEach((currentAnnotation) => {
26
+ markdownFile.addBlankLine();
27
+ markdownFile.addText(buildDocAnnotationText(currentAnnotation));
28
+ markdownFile.addBlankLine();
29
+ });
30
+ function splitAndCapitalize(text) {
31
+ const words = text.split(/[-_]+/);
32
+ const capitalizedWords = [];
33
+ for (const word of words) {
34
+ capitalizedWords.push(word.charAt(0).toUpperCase() + word.slice(1));
35
+ }
36
+ return capitalizedWords.join(' ');
37
+ }
38
+ function buildDocAnnotationText(annotation) {
39
+ let annotationBodyText = annotation.body;
40
+ if (annotation.name.toLowerCase() === 'see') {
41
+ annotationBodyText = class_file_generatorHelper_1.default.getFileLinkByTypeName(annotation.body);
42
+ }
43
+ return `**${splitAndCapitalize(annotation.name)}** ${annotationBodyText}`;
44
+ }
45
+ }
46
+ exports.addCustomDocCommentAnnotations = addCustomDocCommentAnnotations;
44
47
  //# sourceMappingURL=doc-comment-annotation-util.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"doc-comment-annotation-util.js","sourceRoot":"","sources":["../../../src/model/markdown-generation-util/doc-comment-annotation-util.ts"],"names":[],"mappings":";;;AACA,q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AK,EAAE;YACxB,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SACrE;QACD,OAAO,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;IAED,SAAS,sBAAsB,CAAC,UAAgC;QAC9D,IAAI,kBAAkB,GAAG,UAAU,CAAC,IAAI,CAAC;QACzC,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;YAC3C,kBAAkB,GAAG,oCAAwB,CAAC,qBAAqB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;SACtF;QACD,OAAO,KAAK,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,kBAAkB,EAAE,CAAC;IAC5E,CAAC;AACH,CAAC;AA1BD,wEA0BC"}
1
+ {"version":3,"file":"doc-comment-annotation-util.js","sourceRoot":"","sources":["../../../src/model/markdown-generation-util/doc-comment-annotation-util.ts"],"names":[],"mappings":";;;;;;AACA,sHAA4F;AAO5F,SAAgB,UAAU,CAAC,YAA0B,EAAE,eAAgC;;IACrF,MAAM,OAAO,GAAG,MAAA,eAAe,CAAC,UAAU,0CAAE,WAAW,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;IAC5G,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO;KACR;IAED,YAAY,CAAC,YAAY,EAAE,CAAC;IAC5B,YAAY,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IACvC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACjC,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IACH,YAAY,CAAC,YAAY,EAAE,CAAC;IAC5B,YA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E,CAAC;IAC5E,CAAC;AACH,CAAC;AA1BD,wEA0BC"}
@@ -1,3 +1,3 @@
1
- import { MarkdownFile } from '../markdown-file';
2
- import { FieldMirrorWithInheritance, PropertyMirrorWithInheritance } from '../inheritance';
3
- export declare function declareField(markdownFile: MarkdownFile, fields: FieldMirrorWithInheritance[] | PropertyMirrorWithInheritance[], startingHeadingLevel: number, grouped?: boolean): void;
1
+ import { MarkdownFile } from '../markdown-file';
2
+ import { FieldMirrorWithInheritance, PropertyMirrorWithInheritance } from '../inheritance';
3
+ export declare function declareField(markdownFile: MarkdownFile, fields: FieldMirrorWithInheritance[] | PropertyMirrorWithInheritance[], startingHeadingLevel: number, grouped?: boolean): void;
@@ -1,55 +1,55 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.declareField = void 0;
4
- function declareField(markdownFile, fields, startingHeadingLevel, grouped = false) {
5
- markdownFile.addBlankLine();
6
- fields.forEach((propertyModel) => {
7
- addFieldSection(markdownFile, propertyModel, startingHeadingLevel, grouped);
8
- });
9
- markdownFile.addHorizontalRule();
10
- }
11
- exports.declareField = declareField;
12
- function addFieldSection(markdownFile, mirrorModel, startingHeadingLevel, grouped) {
13
- var _a, _b, _c;
14
- if (!grouped) {
15
- markdownFile.addTitle(`\`${mirrorModel.access_modifier} ${mirrorModel.name}\` → \`${mirrorModel.typeReference.rawDeclaration}\``, startingHeadingLevel + 2);
16
- markdownFile.addBlankLine();
17
- if (mirrorModel.inherited) {
18
- markdownFile.addText('*Inherited*');
19
- }
20
- mirrorModel.annotations.forEach((annotation) => {
21
- markdownFile.addText(`\`${annotation.type.toUpperCase()}\` `);
22
- });
23
- if ((_a = mirrorModel.docComment) === null || _a === void 0 ? void 0 : _a.description) {
24
- markdownFile.addBlankLine();
25
- markdownFile.addText(mirrorModel.docComment.description);
26
- }
27
- markdownFile.addBlankLine();
28
- }
29
- else {
30
- let annotations = '';
31
- const hasAnnotations = !!mirrorModel.annotations.length;
32
- if (hasAnnotations) {
33
- annotations += ' [';
34
- }
35
- mirrorModel.annotations.forEach((annotation) => {
36
- annotations += `\`${annotation.type.toUpperCase()}\` `;
37
- });
38
- if (hasAnnotations) {
39
- annotations += ']';
40
- }
41
- // If grouped we want to display these as a list
42
- let description = '';
43
- if ((_b = mirrorModel.docComment) === null || _b === void 0 ? void 0 : _b.description) {
44
- description = ` - ${(_c = mirrorModel.docComment) === null || _c === void 0 ? void 0 : _c.description}`;
45
- }
46
- let listItemText = `\`${mirrorModel.access_modifier} ${mirrorModel.name}\` → \`${mirrorModel.typeReference.rawDeclaration}\``;
47
- if (mirrorModel.inherited) {
48
- listItemText += '(*Inherited*)';
49
- }
50
- listItemText += `${annotations} ${description}`;
51
- markdownFile.addListItem(listItemText);
52
- markdownFile.addBlankLine();
53
- }
54
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.declareField = void 0;
4
+ function declareField(markdownFile, fields, startingHeadingLevel, grouped = false) {
5
+ markdownFile.addBlankLine();
6
+ fields.forEach((propertyModel) => {
7
+ addFieldSection(markdownFile, propertyModel, startingHeadingLevel, grouped);
8
+ });
9
+ markdownFile.addHorizontalRule();
10
+ }
11
+ exports.declareField = declareField;
12
+ function addFieldSection(markdownFile, mirrorModel, startingHeadingLevel, grouped) {
13
+ var _a, _b, _c;
14
+ if (!grouped) {
15
+ markdownFile.addTitle(`\`${mirrorModel.access_modifier} ${mirrorModel.name}\` → \`${mirrorModel.typeReference.rawDeclaration}\``, startingHeadingLevel + 2);
16
+ markdownFile.addBlankLine();
17
+ if (mirrorModel.inherited) {
18
+ markdownFile.addText('*Inherited*');
19
+ }
20
+ mirrorModel.annotations.forEach((annotation) => {
21
+ markdownFile.addText(`\`${annotation.type.toUpperCase()}\` `);
22
+ });
23
+ if ((_a = mirrorModel.docComment) === null || _a === void 0 ? void 0 : _a.description) {
24
+ markdownFile.addBlankLine();
25
+ markdownFile.addText(mirrorModel.docComment.description);
26
+ }
27
+ markdownFile.addBlankLine();
28
+ }
29
+ else {
30
+ let annotations = '';
31
+ const hasAnnotations = !!mirrorModel.annotations.length;
32
+ if (hasAnnotations) {
33
+ annotations += ' [';
34
+ }
35
+ mirrorModel.annotations.forEach((annotation) => {
36
+ annotations += `\`${annotation.type.toUpperCase()}\` `;
37
+ });
38
+ if (hasAnnotations) {
39
+ annotations += ']';
40
+ }
41
+ // If grouped we want to display these as a list
42
+ let description = '';
43
+ if ((_b = mirrorModel.docComment) === null || _b === void 0 ? void 0 : _b.description) {
44
+ description = ` - ${(_c = mirrorModel.docComment) === null || _c === void 0 ? void 0 : _c.description}`;
45
+ }
46
+ let listItemText = `\`${mirrorModel.access_modifier} ${mirrorModel.name}\` → \`${mirrorModel.typeReference.rawDeclaration}\``;
47
+ if (mirrorModel.inherited) {
48
+ listItemText += '(*Inherited*)';
49
+ }
50
+ listItemText += `${annotations} ${description}`;
51
+ markdownFile.addListItem(listItemText);
52
+ markdownFile.addBlankLine();
53
+ }
54
+ }
55
55
  //# sourceMappingURL=field-declaration-util.js.map
@@ -1,3 +1,3 @@
1
- export * from './type-declaration-util';
2
- export * from './method-declaration-util';
3
- export * from './field-declaration-util';
1
+ export * from './type-declaration-util';
2
+ export * from './method-declaration-util';
3
+ export * from './field-declaration-util';