@cparra/apexdocs 2.25.0-alpha.3 → 2.25.0-alpha.5

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 (455) hide show
  1. package/dist/cli/generate.js +2746 -40
  2. package/dist/defaults-DUwru49Q.js +12 -0
  3. package/dist/defaults-SH0Rsi5E.js +11 -0
  4. package/dist/index.d.ts +62 -2
  5. package/dist/index.js +36 -1
  6. package/examples/plain-markdown/docs/Miscellaneous/ns.BaseClass.md +1 -1
  7. package/examples/plain-markdown/docs/Miscellaneous/ns.MultiInheritanceClass.md +1 -1
  8. package/examples/plain-markdown/docs/Miscellaneous/ns.ParentInterface.md +1 -1
  9. package/examples/plain-markdown/docs/Miscellaneous/ns.ReferencedEnum.md +1 -1
  10. package/examples/plain-markdown/docs/Miscellaneous/ns.SampleException.md +1 -1
  11. package/examples/plain-markdown/docs/Miscellaneous/ns.SampleInterface.md +1 -1
  12. package/examples/plain-markdown/docs/Miscellaneous/ns.Url.md +320 -0
  13. package/examples/plain-markdown/docs/Sample-Enums/ns.SampleEnum.md +1 -1
  14. package/examples/plain-markdown/docs/SampleGroup/ns.SampleClass.md +1 -1
  15. package/examples/plain-markdown/docs/index.md +83 -1
  16. package/examples/plain-markdown/force-app/classes/Url.cls +194 -0
  17. package/examples/plain-markdown/package.json +2 -2
  18. package/examples/vitepress/.forceignore +12 -0
  19. package/examples/vitepress/apexdocs.config.ts +108 -0
  20. package/examples/vitepress/config/project-scratch-def.json +13 -0
  21. package/examples/vitepress/docs/.vitepress/cache/deps/@theme_index.js +259 -0
  22. package/examples/vitepress/docs/.vitepress/cache/deps/@theme_index.js.map +7 -0
  23. package/examples/vitepress/docs/.vitepress/cache/deps/_metadata.json +40 -0
  24. package/examples/vitepress/docs/.vitepress/cache/deps/chunk-574YRH25.js +11474 -0
  25. package/examples/vitepress/docs/.vitepress/cache/deps/chunk-574YRH25.js.map +7 -0
  26. package/examples/vitepress/docs/.vitepress/cache/deps/chunk-E5DZZB2I.js +9172 -0
  27. package/examples/vitepress/docs/.vitepress/cache/deps/chunk-E5DZZB2I.js.map +7 -0
  28. package/examples/vitepress/docs/.vitepress/cache/deps/package.json +3 -0
  29. package/examples/vitepress/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +4339 -0
  30. package/examples/vitepress/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +7 -0
  31. package/examples/vitepress/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +567 -0
  32. package/examples/vitepress/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +7 -0
  33. package/examples/vitepress/docs/.vitepress/cache/deps/vue.js +323 -0
  34. package/examples/vitepress/docs/.vitepress/cache/deps/vue.js.map +7 -0
  35. package/examples/vitepress/docs/.vitepress/config.mts +21 -0
  36. package/examples/vitepress/docs/.vitepress/sidebar.json +119 -0
  37. package/examples/vitepress/docs/Miscellaneous/apexdocs.BaseClass.md +20 -0
  38. package/examples/vitepress/docs/Miscellaneous/apexdocs.MultiInheritanceClass.md +78 -0
  39. package/examples/vitepress/docs/Miscellaneous/apexdocs.ParentInterface.md +19 -0
  40. package/examples/vitepress/docs/Miscellaneous/apexdocs.ReferencedEnum.md +15 -0
  41. package/examples/vitepress/docs/Miscellaneous/apexdocs.SampleException.md +28 -0
  42. package/examples/vitepress/docs/Miscellaneous/apexdocs.SampleInterface.md +122 -0
  43. package/examples/vitepress/docs/Miscellaneous/apexdocs.Url.md +318 -0
  44. package/examples/vitepress/docs/Sample-Enums/apexdocs.SampleEnum.md +41 -0
  45. package/examples/vitepress/docs/SampleGroup/apexdocs.SampleClass.md +178 -0
  46. package/examples/vitepress/docs/api-examples.md +49 -0
  47. package/examples/vitepress/docs/index-frontmatter.md +16 -0
  48. package/examples/vitepress/docs/index.md +127 -0
  49. package/examples/vitepress/docs/markdown-examples.md +85 -0
  50. package/examples/vitepress/force-app/main/default/classes/BaseClass.cls +3 -0
  51. package/examples/vitepress/force-app/main/default/classes/MultiInheritanceClass.cls +1 -0
  52. package/examples/vitepress/force-app/main/default/classes/ParentInterface.cls +3 -0
  53. package/examples/vitepress/force-app/main/default/classes/ReferencedEnum.cls +5 -0
  54. package/examples/vitepress/force-app/main/default/classes/SampleClass.cls +72 -0
  55. package/examples/vitepress/force-app/main/default/classes/SampleEnum.cls +30 -0
  56. package/examples/vitepress/force-app/main/default/classes/SampleException.cls +17 -0
  57. package/examples/vitepress/force-app/main/default/classes/SampleInterface.cls +46 -0
  58. package/examples/vitepress/force-app/main/default/classes/Url.cls +195 -0
  59. package/examples/vitepress/package-lock.json +2574 -0
  60. package/examples/vitepress/package.json +18 -0
  61. package/examples/vitepress/sfdx-project.json +12 -0
  62. package/jest.config.js +1 -0
  63. package/package.json +10 -6
  64. package/src/application/Apexdocs.ts +16 -106
  65. package/src/application/__tests__/apex-file-reader.spec.ts +104 -0
  66. package/src/application/apex-file-reader.ts +42 -0
  67. package/src/application/file-writer.ts +25 -0
  68. package/src/application/generators/markdown.ts +53 -0
  69. package/src/application/generators/openapi.ts +56 -0
  70. package/src/cli/args.ts +17 -110
  71. package/src/cli/commands/markdown.ts +58 -0
  72. package/src/cli/generate.ts +7 -7
  73. package/src/{model/__tests__ → core/__test__}/manifest.spec.ts +1 -1
  74. package/src/core/manifest.ts +57 -51
  75. package/src/{__spec__/core → core/markdown/__test__}/expect-extensions.ts +5 -5
  76. package/src/core/markdown/__test__/generating-class-docs.spec.ts +727 -0
  77. package/src/{__spec__/core → core/markdown/__test__}/generating-enum-docs.spec.ts +82 -59
  78. package/src/{__spec__/core → core/markdown/__test__}/generating-interface-docs.spec.ts +94 -75
  79. package/src/core/markdown/__test__/generating-reference-guide.spec.ts +184 -0
  80. package/src/core/{__test__ → markdown/__test__}/inheritance-chain.test.ts +2 -2
  81. package/src/core/markdown/__test__/test-helpers.ts +22 -0
  82. package/src/core/markdown/adapters/__tests__/documentables.spec.ts +109 -0
  83. package/src/core/{adapters → markdown/adapters}/__tests__/interface-adapter.spec.ts +38 -8
  84. package/src/core/{adapters → markdown/adapters}/__tests__/references.spec.ts +12 -1
  85. package/src/core/{adapters → markdown/adapters}/apex-types.ts +8 -5
  86. package/src/core/{adapters → markdown/adapters}/documentables.ts +2 -62
  87. package/src/core/{adapters → markdown/adapters}/fields-and-properties.ts +7 -2
  88. package/src/core/{adapters/references.ts → markdown/adapters/inline.ts} +43 -10
  89. package/src/core/{adapters → markdown/adapters}/methods-and-constructors.ts +7 -2
  90. package/src/core/markdown/adapters/renderable-bundle.ts +144 -0
  91. package/src/core/markdown/adapters/renderable-to-page-data.ts +92 -0
  92. package/src/core/{adapters → markdown/adapters}/type-utils.ts +5 -1
  93. package/src/core/{adapters → markdown/adapters}/types.d.ts +24 -3
  94. package/src/core/markdown/generate-docs.ts +158 -0
  95. package/src/core/markdown/reflection/error-handling.ts +37 -0
  96. package/src/core/markdown/reflection/filter-scope.ts +13 -0
  97. package/src/core/markdown/reflection/inheritance-chain-expanion.ts +22 -0
  98. package/src/core/markdown/reflection/inherited-member-expansion.ts +105 -0
  99. package/src/core/markdown/reflection/reflect-source.ts +41 -0
  100. package/src/core/markdown/reflection/sort-members.ts +59 -0
  101. package/src/{transpiler/markdown/plain-markdown → core/markdown/templates}/class-template.ts +2 -0
  102. package/src/{transpiler/markdown/plain-markdown → core/markdown/templates}/constructors-partial-template.ts +1 -1
  103. package/src/core/markdown/templates/hookable.ts +7 -0
  104. package/src/core/{template.ts → markdown/templates/template.ts} +15 -12
  105. package/src/core/markdown/utils.ts +3 -0
  106. package/src/{transpiler → core}/openapi/__tests__/open-api-docs-processor.spec.ts +1 -1
  107. package/src/{model → core/openapi}/apex-type-wrappers/__tests__/ClassMirrorWrapper.spec.ts +3 -3
  108. package/src/core/openapi/file-container.ts +13 -0
  109. package/src/{service → core/openapi}/manifest-factory.ts +3 -3
  110. package/src/{transpiler → core}/openapi/open-api-docs-processor.ts +9 -10
  111. package/src/core/openapi/openapi-type-file.ts +14 -0
  112. package/src/{service → core/openapi}/parser.ts +8 -8
  113. package/src/{transpiler → core}/openapi/parsers/Builder.ts +2 -2
  114. package/src/{transpiler → core}/openapi/parsers/MethodParser.ts +5 -5
  115. package/src/{transpiler → core}/openapi/parsers/ParameterObjectBuilder.ts +2 -2
  116. package/src/{transpiler → core}/openapi/parsers/ReferenceBuilder.ts +3 -3
  117. package/src/{transpiler → core}/openapi/parsers/RequestBodyBuilder.ts +2 -2
  118. package/src/{transpiler → core}/openapi/parsers/ResponsesBuilder.ts +2 -2
  119. package/src/{transpiler → core}/openapi/parsers/__tests__/MethodParser.spec.ts +1 -1
  120. package/src/{transpiler → core}/openapi/parsers/__tests__/ParameterObjectBuilder.spec.ts +2 -2
  121. package/src/{transpiler → core}/openapi/parsers/__tests__/ReferenceBuilder.spec.ts +2 -2
  122. package/src/{transpiler → core}/openapi/parsers/__tests__/RequestBodyBuilder.spec.ts +2 -2
  123. package/src/{transpiler → core}/openapi/parsers/__tests__/ResponsesBuilder.spec.ts +1 -1
  124. package/src/{transpiler → core/openapi}/transpiler.ts +2 -6
  125. package/src/{model → core/openapi}/types-repository.ts +0 -9
  126. package/src/core/parse-apex-metadata.ts +14 -0
  127. package/src/core/settings.ts +56 -0
  128. package/src/core/shared/types.d.ts +92 -0
  129. package/src/core/shared/utils.ts +5 -0
  130. package/src/defaults.ts +8 -0
  131. package/src/index.ts +34 -2
  132. package/src/test-helpers/InterfaceMirrorBuilder.ts +0 -5
  133. package/src/test-helpers/SettingsBuilder.ts +1 -5
  134. package/src/util/fp.ts +3 -0
  135. package/src/util/logger.ts +2 -2
  136. package/src/util/string-utils.ts +0 -4
  137. package/tsconfig.json +5 -1
  138. package/apexdocs.config.ts +0 -13
  139. package/dist/__spec__/core/expect-extensions.d.ts +0 -3
  140. package/dist/__spec__/core/expect-extensions.js +0 -55
  141. package/dist/__spec__/core/expect-extensions.js.map +0 -1
  142. package/dist/__spec__/core/generating-class-docs.spec.d.ts +0 -1
  143. package/dist/__spec__/core/generating-class-docs.spec.js +0 -444
  144. package/dist/__spec__/core/generating-class-docs.spec.js.map +0 -1
  145. package/dist/__spec__/core/generating-enum-docs.spec.d.ts +0 -1
  146. package/dist/__spec__/core/generating-enum-docs.spec.js +0 -306
  147. package/dist/__spec__/core/generating-enum-docs.spec.js.map +0 -1
  148. package/dist/__spec__/core/generating-interface-docs.spec.d.ts +0 -1
  149. package/dist/__spec__/core/generating-interface-docs.spec.js +0 -364
  150. package/dist/__spec__/core/generating-interface-docs.spec.js.map +0 -1
  151. package/dist/__spec__/core/generating-reference-guide.spec.d.ts +0 -1
  152. package/dist/__spec__/core/generating-reference-guide.spec.js +0 -162
  153. package/dist/__spec__/core/generating-reference-guide.spec.js.map +0 -1
  154. package/dist/__spec__/core/test-helpers.d.ts +0 -2
  155. package/dist/__spec__/core/test-helpers.js +0 -12
  156. package/dist/__spec__/core/test-helpers.js.map +0 -1
  157. package/dist/application/Apexdocs.d.ts +0 -15
  158. package/dist/application/Apexdocs.js +0 -113
  159. package/dist/application/Apexdocs.js.map +0 -1
  160. package/dist/application/generators/generate-markdown-files.d.ts +0 -3
  161. package/dist/application/generators/generate-markdown-files.js +0 -64
  162. package/dist/application/generators/generate-markdown-files.js.map +0 -1
  163. package/dist/cli/args.d.ts +0 -39
  164. package/dist/cli/args.js +0 -154
  165. package/dist/cli/args.js.map +0 -1
  166. package/dist/cli/generate.d.ts +0 -2
  167. package/dist/cli/generate.js.map +0 -1
  168. package/dist/core/__test__/inheritance-chain.test.d.ts +0 -1
  169. package/dist/core/__test__/inheritance-chain.test.js +0 -42
  170. package/dist/core/__test__/inheritance-chain.test.js.map +0 -1
  171. package/dist/core/adapters/apex-types.d.ts +0 -6
  172. package/dist/core/adapters/apex-types.js +0 -109
  173. package/dist/core/adapters/apex-types.js.map +0 -1
  174. package/dist/core/adapters/documentables.d.ts +0 -7
  175. package/dist/core/adapters/documentables.js +0 -154
  176. package/dist/core/adapters/documentables.js.map +0 -1
  177. package/dist/core/adapters/fields-and-properties.d.ts +0 -3
  178. package/dist/core/adapters/fields-and-properties.js +0 -37
  179. package/dist/core/adapters/fields-and-properties.js.map +0 -1
  180. package/dist/core/adapters/methods-and-constructors.d.ts +0 -5
  181. package/dist/core/adapters/methods-and-constructors.js +0 -100
  182. package/dist/core/adapters/methods-and-constructors.js.map +0 -1
  183. package/dist/core/adapters/references.d.ts +0 -4
  184. package/dist/core/adapters/references.js +0 -78
  185. package/dist/core/adapters/references.js.map +0 -1
  186. package/dist/core/adapters/type-utils.d.ts +0 -3
  187. package/dist/core/adapters/type-utils.js +0 -12
  188. package/dist/core/adapters/type-utils.js.map +0 -1
  189. package/dist/core/apex-bundle.d.ts +0 -6
  190. package/dist/core/apex-bundle.js +0 -11
  191. package/dist/core/apex-bundle.js.map +0 -1
  192. package/dist/core/generate-docs.d.ts +0 -28
  193. package/dist/core/generate-docs.js +0 -296
  194. package/dist/core/generate-docs.js.map +0 -1
  195. package/dist/core/inheritance-chain.d.ts +0 -2
  196. package/dist/core/inheritance-chain.js +0 -36
  197. package/dist/core/inheritance-chain.js.map +0 -1
  198. package/dist/core/manifest.d.ts +0 -22
  199. package/dist/core/manifest.js +0 -53
  200. package/dist/core/manifest.js.map +0 -1
  201. package/dist/core/template.d.ts +0 -10
  202. package/dist/core/template.js +0 -97
  203. package/dist/core/template.js.map +0 -1
  204. package/dist/core/templates/reference-guide.d.ts +0 -1
  205. package/dist/core/templates/reference-guide.js +0 -18
  206. package/dist/core/templates/reference-guide.js.map +0 -1
  207. package/dist/index.js.map +0 -1
  208. package/dist/model/apex-type-wrappers/ClassMirrorWrapper.d.ts +0 -7
  209. package/dist/model/apex-type-wrappers/ClassMirrorWrapper.js +0 -14
  210. package/dist/model/apex-type-wrappers/ClassMirrorWrapper.js.map +0 -1
  211. package/dist/model/apex-type-wrappers/MethodMirrorWrapper.d.ts +0 -7
  212. package/dist/model/apex-type-wrappers/MethodMirrorWrapper.js +0 -12
  213. package/dist/model/apex-type-wrappers/MethodMirrorWrapper.js.map +0 -1
  214. package/dist/model/markdown-file.d.ts +0 -16
  215. package/dist/model/markdown-file.js +0 -111
  216. package/dist/model/markdown-file.js.map +0 -1
  217. package/dist/model/markdown-generation-util/doc-comment-annotation-util.d.ts +0 -8
  218. package/dist/model/markdown-generation-util/doc-comment-annotation-util.js +0 -47
  219. package/dist/model/markdown-generation-util/doc-comment-annotation-util.js.map +0 -1
  220. package/dist/model/markdown-generation-util/field-declaration-util.d.ts +0 -3
  221. package/dist/model/markdown-generation-util/field-declaration-util.js +0 -55
  222. package/dist/model/markdown-generation-util/field-declaration-util.js.map +0 -1
  223. package/dist/model/markdown-generation-util/index.d.ts +0 -3
  224. package/dist/model/markdown-generation-util/index.js +0 -20
  225. package/dist/model/markdown-generation-util/index.js.map +0 -1
  226. package/dist/model/markdown-generation-util/method-declaration-util.d.ts +0 -4
  227. package/dist/model/markdown-generation-util/method-declaration-util.js +0 -115
  228. package/dist/model/markdown-generation-util/method-declaration-util.js.map +0 -1
  229. package/dist/model/markdown-generation-util/type-declaration-util.d.ts +0 -3
  230. package/dist/model/markdown-generation-util/type-declaration-util.js +0 -82
  231. package/dist/model/markdown-generation-util/type-declaration-util.js.map +0 -1
  232. package/dist/model/markdown-home-file.d.ts +0 -11
  233. package/dist/model/markdown-home-file.js +0 -57
  234. package/dist/model/markdown-home-file.js.map +0 -1
  235. package/dist/model/markdown-type-file.d.ts +0 -26
  236. package/dist/model/markdown-type-file.js +0 -137
  237. package/dist/model/markdown-type-file.js.map +0 -1
  238. package/dist/model/openapi/apex-doc-types.d.ts +0 -19
  239. package/dist/model/openapi/apex-doc-types.js +0 -5
  240. package/dist/model/openapi/apex-doc-types.js.map +0 -1
  241. package/dist/model/openapi/open-api-types.d.ts +0 -93
  242. package/dist/model/openapi/open-api-types.js +0 -3
  243. package/dist/model/openapi/open-api-types.js.map +0 -1
  244. package/dist/model/openapi/open-api.d.ts +0 -16
  245. package/dist/model/openapi/open-api.js +0 -34
  246. package/dist/model/openapi/open-api.js.map +0 -1
  247. package/dist/model/openapi/openapi-type-file.d.ts +0 -7
  248. package/dist/model/openapi/openapi-type-file.js +0 -17
  249. package/dist/model/openapi/openapi-type-file.js.map +0 -1
  250. package/dist/model/outputFile.d.ts +0 -10
  251. package/dist/model/outputFile.js +0 -22
  252. package/dist/model/outputFile.js.map +0 -1
  253. package/dist/model/types-repository.d.ts +0 -16
  254. package/dist/model/types-repository.js +0 -54
  255. package/dist/model/types-repository.js.map +0 -1
  256. package/dist/service/apex-file-reader.d.ts +0 -14
  257. package/dist/service/apex-file-reader.js +0 -49
  258. package/dist/service/apex-file-reader.js.map +0 -1
  259. package/dist/service/file-system.d.ts +0 -14
  260. package/dist/service/file-system.js +0 -48
  261. package/dist/service/file-system.js.map +0 -1
  262. package/dist/service/file-writer.d.ts +0 -6
  263. package/dist/service/file-writer.js +0 -57
  264. package/dist/service/file-writer.js.map +0 -1
  265. package/dist/service/manifest-factory.d.ts +0 -10
  266. package/dist/service/manifest-factory.js +0 -17
  267. package/dist/service/manifest-factory.js.map +0 -1
  268. package/dist/service/metadata-processor.d.ts +0 -3
  269. package/dist/service/metadata-processor.js +0 -17
  270. package/dist/service/metadata-processor.js.map +0 -1
  271. package/dist/service/parser.d.ts +0 -21
  272. package/dist/service/parser.js +0 -138
  273. package/dist/service/parser.js.map +0 -1
  274. package/dist/service/state.d.ts +0 -9
  275. package/dist/service/state.js +0 -20
  276. package/dist/service/state.js.map +0 -1
  277. package/dist/service/walkers/class-walker.d.ts +0 -4
  278. package/dist/service/walkers/class-walker.js +0 -33
  279. package/dist/service/walkers/class-walker.js.map +0 -1
  280. package/dist/service/walkers/enum-walker.d.ts +0 -4
  281. package/dist/service/walkers/enum-walker.js +0 -11
  282. package/dist/service/walkers/enum-walker.js.map +0 -1
  283. package/dist/service/walkers/interface-walker.d.ts +0 -4
  284. package/dist/service/walkers/interface-walker.js +0 -15
  285. package/dist/service/walkers/interface-walker.js.map +0 -1
  286. package/dist/service/walkers/walker-factory.d.ts +0 -5
  287. package/dist/service/walkers/walker-factory.js +0 -21
  288. package/dist/service/walkers/walker-factory.js.map +0 -1
  289. package/dist/service/walkers/walker.d.ts +0 -19
  290. package/dist/service/walkers/walker.js +0 -17
  291. package/dist/service/walkers/walker.js.map +0 -1
  292. package/dist/settings.d.ts +0 -67
  293. package/dist/settings.js +0 -92
  294. package/dist/settings.js.map +0 -1
  295. package/dist/test-helpers/AnnotationBuilder.d.ts +0 -12
  296. package/dist/test-helpers/AnnotationBuilder.js +0 -31
  297. package/dist/test-helpers/AnnotationBuilder.js.map +0 -1
  298. package/dist/test-helpers/ClassMirrorBuilder.d.ts +0 -22
  299. package/dist/test-helpers/ClassMirrorBuilder.js +0 -64
  300. package/dist/test-helpers/ClassMirrorBuilder.js.map +0 -1
  301. package/dist/test-helpers/DocCommentAnnotationBuilder.d.ts +0 -8
  302. package/dist/test-helpers/DocCommentAnnotationBuilder.js +0 -26
  303. package/dist/test-helpers/DocCommentAnnotationBuilder.js.map +0 -1
  304. package/dist/test-helpers/DocCommentBuilder.d.ts +0 -12
  305. package/dist/test-helpers/DocCommentBuilder.js +0 -38
  306. package/dist/test-helpers/DocCommentBuilder.js.map +0 -1
  307. package/dist/test-helpers/FieldMirrorBuilder.d.ts +0 -18
  308. package/dist/test-helpers/FieldMirrorBuilder.js +0 -54
  309. package/dist/test-helpers/FieldMirrorBuilder.js.map +0 -1
  310. package/dist/test-helpers/InterfaceMirrorBuilder.d.ts +0 -16
  311. package/dist/test-helpers/InterfaceMirrorBuilder.js +0 -43
  312. package/dist/test-helpers/InterfaceMirrorBuilder.js.map +0 -1
  313. package/dist/test-helpers/MethodMirrorBuilder.d.ts +0 -29
  314. package/dist/test-helpers/MethodMirrorBuilder.js +0 -72
  315. package/dist/test-helpers/MethodMirrorBuilder.js.map +0 -1
  316. package/dist/test-helpers/SettingsBuilder.d.ts +0 -8
  317. package/dist/test-helpers/SettingsBuilder.js +0 -28
  318. package/dist/test-helpers/SettingsBuilder.js.map +0 -1
  319. package/dist/transpiler/factory.d.ts +0 -6
  320. package/dist/transpiler/factory.js +0 -33
  321. package/dist/transpiler/factory.js.map +0 -1
  322. package/dist/transpiler/file-container.d.ts +0 -6
  323. package/dist/transpiler/file-container.js +0 -16
  324. package/dist/transpiler/file-container.js.map +0 -1
  325. package/dist/transpiler/generator-choices.d.ts +0 -1
  326. package/dist/transpiler/generator-choices.js +0 -3
  327. package/dist/transpiler/generator-choices.js.map +0 -1
  328. package/dist/transpiler/markdown/class-file-generatorHelper.d.ts +0 -9
  329. package/dist/transpiler/markdown/class-file-generatorHelper.js +0 -61
  330. package/dist/transpiler/markdown/class-file-generatorHelper.js.map +0 -1
  331. package/dist/transpiler/markdown/docsify/docsify-docs-processor.d.ts +0 -6
  332. package/dist/transpiler/markdown/docsify/docsify-docs-processor.js +0 -13
  333. package/dist/transpiler/markdown/docsify/docsify-docs-processor.js.map +0 -1
  334. package/dist/transpiler/markdown/jekyll/jekyll-docsProcessor.d.ts +0 -11
  335. package/dist/transpiler/markdown/jekyll/jekyll-docsProcessor.js +0 -51
  336. package/dist/transpiler/markdown/jekyll/jekyll-docsProcessor.js.map +0 -1
  337. package/dist/transpiler/markdown/markdown-transpiler-base.d.ts +0 -11
  338. package/dist/transpiler/markdown/markdown-transpiler-base.js +0 -27
  339. package/dist/transpiler/markdown/markdown-transpiler-base.js.map +0 -1
  340. package/dist/transpiler/markdown/plain-markdown/class-template.d.ts +0 -1
  341. package/dist/transpiler/markdown/plain-markdown/class-template.js +0 -77
  342. package/dist/transpiler/markdown/plain-markdown/class-template.js.map +0 -1
  343. package/dist/transpiler/markdown/plain-markdown/constructors-partial-template.d.ts +0 -1
  344. package/dist/transpiler/markdown/plain-markdown/constructors-partial-template.js +0 -36
  345. package/dist/transpiler/markdown/plain-markdown/constructors-partial-template.js.map +0 -1
  346. package/dist/transpiler/markdown/plain-markdown/documentable-partial-template.d.ts +0 -1
  347. package/dist/transpiler/markdown/plain-markdown/documentable-partial-template.js +0 -30
  348. package/dist/transpiler/markdown/plain-markdown/documentable-partial-template.js.map +0 -1
  349. package/dist/transpiler/markdown/plain-markdown/enum-template.d.ts +0 -1
  350. package/dist/transpiler/markdown/plain-markdown/enum-template.js +0 -16
  351. package/dist/transpiler/markdown/plain-markdown/enum-template.js.map +0 -1
  352. package/dist/transpiler/markdown/plain-markdown/fieldsPartialTemplate.d.ts +0 -1
  353. package/dist/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js +0 -27
  354. package/dist/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js.map +0 -1
  355. package/dist/transpiler/markdown/plain-markdown/grouped-members-partial-template.d.ts +0 -1
  356. package/dist/transpiler/markdown/plain-markdown/grouped-members-partial-template.js +0 -10
  357. package/dist/transpiler/markdown/plain-markdown/grouped-members-partial-template.js.map +0 -1
  358. package/dist/transpiler/markdown/plain-markdown/interface-template.d.ts +0 -1
  359. package/dist/transpiler/markdown/plain-markdown/interface-template.js +0 -20
  360. package/dist/transpiler/markdown/plain-markdown/interface-template.js.map +0 -1
  361. package/dist/transpiler/markdown/plain-markdown/methods-partial-template.d.ts +0 -1
  362. package/dist/transpiler/markdown/plain-markdown/methods-partial-template.js +0 -47
  363. package/dist/transpiler/markdown/plain-markdown/methods-partial-template.js.map +0 -1
  364. package/dist/transpiler/markdown/plain-markdown/type-doc-partial.d.ts +0 -1
  365. package/dist/transpiler/markdown/plain-markdown/type-doc-partial.js +0 -31
  366. package/dist/transpiler/markdown/plain-markdown/type-doc-partial.js.map +0 -1
  367. package/dist/transpiler/openapi/open-api-docs-processor.d.ts +0 -13
  368. package/dist/transpiler/openapi/open-api-docs-processor.js +0 -78
  369. package/dist/transpiler/openapi/open-api-docs-processor.js.map +0 -1
  370. package/dist/transpiler/openapi/parsers/Builder.d.ts +0 -16
  371. package/dist/transpiler/openapi/parsers/Builder.js +0 -30
  372. package/dist/transpiler/openapi/parsers/Builder.js.map +0 -1
  373. package/dist/transpiler/openapi/parsers/MethodParser.d.ts +0 -20
  374. package/dist/transpiler/openapi/parsers/MethodParser.js +0 -190
  375. package/dist/transpiler/openapi/parsers/MethodParser.js.map +0 -1
  376. package/dist/transpiler/openapi/parsers/ParameterObjectBuilder.d.ts +0 -7
  377. package/dist/transpiler/openapi/parsers/ParameterObjectBuilder.js +0 -11
  378. package/dist/transpiler/openapi/parsers/ParameterObjectBuilder.js.map +0 -1
  379. package/dist/transpiler/openapi/parsers/ReferenceBuilder.d.ts +0 -39
  380. package/dist/transpiler/openapi/parsers/ReferenceBuilder.js +0 -250
  381. package/dist/transpiler/openapi/parsers/ReferenceBuilder.js.map +0 -1
  382. package/dist/transpiler/openapi/parsers/RequestBodyBuilder.d.ts +0 -10
  383. package/dist/transpiler/openapi/parsers/RequestBodyBuilder.js +0 -20
  384. package/dist/transpiler/openapi/parsers/RequestBodyBuilder.js.map +0 -1
  385. package/dist/transpiler/openapi/parsers/ResponsesBuilder.d.ts +0 -7
  386. package/dist/transpiler/openapi/parsers/ResponsesBuilder.js +0 -22
  387. package/dist/transpiler/openapi/parsers/ResponsesBuilder.js.map +0 -1
  388. package/dist/transpiler/processor-type-transpiler.d.ts +0 -10
  389. package/dist/transpiler/processor-type-transpiler.js +0 -9
  390. package/dist/transpiler/processor-type-transpiler.js.map +0 -1
  391. package/dist/transpiler/transpiler.d.ts +0 -5
  392. package/dist/transpiler/transpiler.js +0 -30
  393. package/dist/transpiler/transpiler.js.map +0 -1
  394. package/dist/util/error-logger.d.ts +0 -8
  395. package/dist/util/error-logger.js +0 -90
  396. package/dist/util/error-logger.js.map +0 -1
  397. package/dist/util/logger.d.ts +0 -21
  398. package/dist/util/logger.js +0 -61
  399. package/dist/util/logger.js.map +0 -1
  400. package/dist/util/string-utils.d.ts +0 -2
  401. package/dist/util/string-utils.js +0 -15
  402. package/dist/util/string-utils.js.map +0 -1
  403. package/examples/plain-markdown/template.md +0 -3
  404. package/src/__spec__/core/generating-class-docs.spec.ts +0 -531
  405. package/src/__spec__/core/generating-reference-guide.spec.ts +0 -164
  406. package/src/__spec__/core/test-helpers.ts +0 -9
  407. package/src/application/generators/generate-markdown-files.ts +0 -53
  408. package/src/core/apex-bundle.ts +0 -3
  409. package/src/core/generate-docs.ts +0 -432
  410. package/src/model/markdown-file.ts +0 -122
  411. package/src/model/markdown-generation-util/doc-comment-annotation-util.ts +0 -50
  412. package/src/model/markdown-generation-util/field-declaration-util.ts +0 -71
  413. package/src/model/markdown-generation-util/index.ts +0 -3
  414. package/src/model/markdown-generation-util/method-declaration-util.ts +0 -166
  415. package/src/model/markdown-generation-util/type-declaration-util.ts +0 -91
  416. package/src/model/markdown-home-file.ts +0 -58
  417. package/src/model/markdown-type-file.ts +0 -169
  418. package/src/model/openapi/openapi-type-file.ts +0 -14
  419. package/src/model/outputFile.ts +0 -20
  420. package/src/service/__tests__/apex-file-reader.spec.ts +0 -93
  421. package/src/service/apex-file-reader.ts +0 -51
  422. package/src/service/file-writer.ts +0 -34
  423. package/src/service/metadata-processor.ts +0 -16
  424. package/src/service/state.ts +0 -24
  425. package/src/service/walkers/class-walker.ts +0 -30
  426. package/src/service/walkers/enum-walker.ts +0 -7
  427. package/src/service/walkers/interface-walker.ts +0 -12
  428. package/src/service/walkers/walker-factory.ts +0 -19
  429. package/src/service/walkers/walker.ts +0 -42
  430. package/src/settings.ts +0 -153
  431. package/src/transpiler/factory.ts +0 -31
  432. package/src/transpiler/file-container.ts +0 -13
  433. package/src/transpiler/generator-choices.ts +0 -1
  434. package/src/transpiler/markdown/class-file-generatorHelper.ts +0 -61
  435. package/src/transpiler/markdown/docsify/docsify-docs-processor.ts +0 -12
  436. package/src/transpiler/markdown/jekyll/jekyll-docsProcessor.ts +0 -50
  437. package/src/transpiler/markdown/markdown-transpiler-base.ts +0 -28
  438. package/src/transpiler/processor-type-transpiler.ts +0 -18
  439. /package/src/{service → application}/file-system.ts +0 -0
  440. /package/src/core/{inheritance-chain.ts → markdown/reflection/inheritance-chain.ts} +0 -0
  441. /package/src/{transpiler/markdown/plain-markdown → core/markdown/templates}/documentable-partial-template.ts +0 -0
  442. /package/src/{transpiler/markdown/plain-markdown → core/markdown/templates}/enum-template.ts +0 -0
  443. /package/src/{transpiler/markdown/plain-markdown → core/markdown/templates}/fieldsPartialTemplate.ts +0 -0
  444. /package/src/{transpiler/markdown/plain-markdown → core/markdown/templates}/grouped-members-partial-template.ts +0 -0
  445. /package/src/{transpiler/markdown/plain-markdown → core/markdown/templates}/interface-template.ts +0 -0
  446. /package/src/{transpiler/markdown/plain-markdown → core/markdown/templates}/methods-partial-template.ts +0 -0
  447. /package/src/core/{templates → markdown/templates}/reference-guide.ts +0 -0
  448. /package/src/{transpiler/markdown/plain-markdown → core/markdown/templates}/type-doc-partial.ts +0 -0
  449. /package/src/{service → core/openapi}/__tests__/manifest-factory.spec.ts +0 -0
  450. /package/src/{model → core}/openapi/__tests__/open-api.spec.ts +0 -0
  451. /package/src/{model → core}/openapi/apex-doc-types.ts +0 -0
  452. /package/src/{model → core/openapi}/apex-type-wrappers/ClassMirrorWrapper.ts +0 -0
  453. /package/src/{model → core/openapi}/apex-type-wrappers/MethodMirrorWrapper.ts +0 -0
  454. /package/src/{model → core}/openapi/open-api-types.ts +0 -0
  455. /package/src/{model → core}/openapi/open-api.ts +0 -0
@@ -1,154 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.adaptDocumentable = exports.adaptDescribable = void 0;
4
- const references_1 = require("./references");
5
- const type_utils_1 = require("./type-utils");
6
- function adaptDescribable(describable, linkGenerator) {
7
- function describableToRenderableContent(describable) {
8
- if (!describable) {
9
- return;
10
- }
11
- let content = [];
12
- for (let i = 0; i < describable.length; i++) {
13
- const line = describable[i];
14
- // The language might or might not be present after ```
15
- const codeBlockMatch = line.match(/^```([a-zA-Z]*)$/);
16
- if (codeBlockMatch) {
17
- // Check if the language is present, if not, fallback to "apex"
18
- const language = codeBlockMatch[1] || 'apex';
19
- const codeBlockLines = [];
20
- i++;
21
- while (i < describable.length) {
22
- const currentLine = describable[i];
23
- if (currentLine.trim() === '```') {
24
- break;
25
- }
26
- codeBlockLines.push(currentLine);
27
- i++;
28
- }
29
- console.log('codeBlockLines', codeBlockLines);
30
- content = [
31
- ...content,
32
- {
33
- __type: 'code-block',
34
- language,
35
- content: codeBlockLines,
36
- },
37
- { __type: 'empty-line' },
38
- ];
39
- continue;
40
- }
41
- content = [
42
- ...content,
43
- ...(0, references_1.replaceInlineReferences)(line, linkGenerator),
44
- {
45
- __type: 'empty-line',
46
- },
47
- ];
48
- }
49
- return (content
50
- .flatMap((line) => line)
51
- // If the last element is an empty line, remove it
52
- .filter((line, index, lines) => !((0, type_utils_1.isEmptyLine)(line) && index === lines.length - 1)));
53
- // TODO: Now we want to also extract code blocks if we encounter any line that starts with "```"
54
- // return describable.reduce<RenderableContent[]>(
55
- // (acc, line) => {
56
- // if (line.trim() === '') {
57
- // return [...acc, { __type: 'empty-line' }];
58
- // }
59
- //
60
- // // The language might or might not be present after ```
61
- // const codeBlockMatch = line.match(/^```([a-zA-Z]*)$/);
62
- // if (codeBlockMatch) {
63
- // console.log('codeBlockMatch', codeBlockMatch);
64
- // // Check if the language is present, if not, fallback to "apex"
65
- // const language = codeBlockMatch[1] || 'apex';
66
- // const codeBlockLines: string[] = [];
67
- // let index = acc.length + 1;
68
- // while (index < describable.length) {
69
- // const currentLine = describable[index];
70
- // if (currentLine.trim() === '```') {
71
- // break;
72
- // }
73
- // codeBlockLines.push(currentLine);
74
- // index++;
75
- // }
76
- // return [
77
- // ...acc,
78
- // {
79
- // __type: 'code-block',
80
- // language,
81
- // content: codeBlockLines,
82
- // },
83
- // ];
84
- // }
85
- //
86
- // return [
87
- // ...acc,
88
- // ...replaceInlineReferences(line, linkGenerator),
89
- // {
90
- // __type: 'empty-line',
91
- // },
92
- // ];
93
- // },
94
- // <RenderableContent[]>[],
95
- // );
96
- // return (
97
- // describable
98
- // .map<RenderableContent[]>((line) => [
99
- // ...replaceInlineReferences(line, linkGenerator),
100
- // {
101
- // __type: 'empty-line',
102
- // },
103
- // ])
104
- // .flatMap((line) => line)
105
- // // If the last element is an empty line, remove it
106
- // .filter((line, index, lines) => !(isEmptyLine(line) && index === lines.length - 1))
107
- // );
108
- }
109
- return {
110
- description: describableToRenderableContent(describable),
111
- };
112
- }
113
- exports.adaptDescribable = adaptDescribable;
114
- function adaptDocumentable(documentable, linkGenerator, subHeadingLevel) {
115
- var _a, _b, _c;
116
- function extractCustomTags(type) {
117
- var _a, _b;
118
- const baseTags = ['description', 'group', 'author', 'date', 'see', 'example', 'mermaid', 'throws', 'exception'];
119
- return ((_b = (_a = type.docComment) === null || _a === void 0 ? void 0 : _a.annotations.filter((currentAnnotation) => !baseTags.includes(currentAnnotation.name.toLowerCase())).map((currentAnnotation) => (Object.assign(Object.assign({}, adaptDescribable(currentAnnotation.bodyLines, linkGenerator)), { name: currentAnnotation.name })))) !== null && _b !== void 0 ? _b : []);
120
- }
121
- function extractAnnotationBodyLines(type, annotationName) {
122
- var _a, _b;
123
- return (_b = (_a = type.docComment) === null || _a === void 0 ? void 0 : _a.annotations.find((currentAnnotation) => currentAnnotation.name.toLowerCase() === annotationName)) === null || _b === void 0 ? void 0 : _b.bodyLines;
124
- }
125
- function extractAnnotationBody(type, annotationName) {
126
- var _a, _b;
127
- return (_b = (_a = type.docComment) === null || _a === void 0 ? void 0 : _a.annotations.find((currentAnnotation) => currentAnnotation.name.toLowerCase() === annotationName)) === null || _b === void 0 ? void 0 : _b.body;
128
- }
129
- function extractSeeAnnotations(type) {
130
- var _a, _b;
131
- return ((_b = (_a = type.docComment) === null || _a === void 0 ? void 0 : _a.annotations.filter((currentAnnotation) => currentAnnotation.name.toLowerCase() === 'see').map((currentAnnotation) => currentAnnotation.body)) !== null && _b !== void 0 ? _b : []);
132
- }
133
- function bodyLinesToCodeBlock(language, bodyLines) {
134
- if (!bodyLines) {
135
- return;
136
- }
137
- return {
138
- __type: 'code-block',
139
- language,
140
- content: bodyLines,
141
- };
142
- }
143
- return Object.assign(Object.assign({}, adaptDescribable((_a = documentable.docComment) === null || _a === void 0 ? void 0 : _a.descriptionLines, linkGenerator)), { annotations: documentable.annotations.map((annotation) => annotation.type.toUpperCase()), customTags: extractCustomTags(documentable), mermaid: {
144
- headingLevel: subHeadingLevel,
145
- heading: 'Diagram',
146
- value: bodyLinesToCodeBlock('mermaid', extractAnnotationBodyLines(documentable, 'mermaid')),
147
- }, example: {
148
- headingLevel: subHeadingLevel,
149
- heading: 'Example',
150
- value: bodyLinesToCodeBlock('apex', (_c = (_b = documentable.docComment) === null || _b === void 0 ? void 0 : _b.exampleAnnotation) === null || _c === void 0 ? void 0 : _c.bodyLines),
151
- }, group: extractAnnotationBody(documentable, 'group'), author: extractAnnotationBody(documentable, 'author'), date: extractAnnotationBody(documentable, 'date'), sees: extractSeeAnnotations(documentable).map(linkGenerator) });
152
- }
153
- exports.adaptDocumentable = adaptDocumentable;
154
- //# sourceMappingURL=documentables.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"documentables.js","sourceRoot":"","sources":["../../../src/core/adapters/documentables.ts"],"names":[],"mappings":";;;AAEA,6CAAuF;AACvF,6CAA2C;AAE3C,SAAgB,gBAAgB,CAC9B,WAAwB,EACxB,aAA6C;IAI7C,SAAS,8BAA8B,CAAC,WAAwB;QAC9D,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAO;QACT,CAAC;QAED,IAAI,OAAO,GAAwB,EAAE,CAAC;QACtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5C,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;YAC5B,uDAAuD;YACvD,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;YACtD,IAAI,cAAc,EAAE,CAAC;gBACnB,+DAA+D;gBAC/D,MAAM,QAAQ,GAAG,cAAc,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;gBAC7C,MAAM,cAAc,GAAa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CAAC,EACxF,UAAU,EAAE,iBAAiB,CAAC,YAAY,CAAC,EAC3C,OAAO,EAAE;YACP,YAAY,EAAE,eAAe;YAC7B,OAAO,EAAE,SAAS;YAClB,KAAK,EAAE,oBAAoB,CAAC,SAAS,EAAE,0BAA0B,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;SAC5F,EACD,OAAO,EAAE;YACP,YAAY,EAAE,eAAe;YAC7B,OAAO,EAAE,SAAS;YAClB,KAAK,EAAE,oBAAoB,CAAC,MAAM,EAAE,MAAA,MAAA,YAAY,CAAC,UAAU,0CAAE,iBAAiB,0CAAE,SAAS,CAAC;SAC3F,EACD,KAAK,EAAE,qBAAqB,CAAC,YAAY,EAAE,OAAO,CAAC,EACnD,MAAM,EAAE,qBAAqB,CAAC,YAAY,EAAE,QAAQ,CAAC,EACrD,IAAI,EAAE,qBAAqB,CAAC,YAAY,EAAE,MAAM,CAAC,EACjD,IAAI,EAAE,qBAAqB,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,IAC5D;AACJ,CAAC;AApED,8CAoEC"}
@@ -1,3 +0,0 @@
1
- import { FieldMirrorWithInheritance, PropertyMirrorWithInheritance, RenderableField } from './types';
2
- import { GetRenderableContentByTypeName } from './references';
3
- export declare function adaptFieldOrProperty(field: FieldMirrorWithInheritance | PropertyMirrorWithInheritance, linkGenerator: GetRenderableContentByTypeName, baseHeadingLevel: number): RenderableField;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.adaptFieldOrProperty = void 0;
4
- const documentables_1 = require("./documentables");
5
- function adaptFieldOrProperty(field, linkGenerator, baseHeadingLevel) {
6
- function buildSignature() {
7
- const { access_modifier, name } = field;
8
- const memberModifiers = field.memberModifiers.join(' ');
9
- const codeContents = `${access_modifier} ${memberModifiers} ${name}`
10
- // remove double spaces
11
- .replace(/ {2}/g, ' ');
12
- return {
13
- __type: 'code-block',
14
- language: 'apex',
15
- content: [codeContents],
16
- };
17
- }
18
- return {
19
- headingLevel: baseHeadingLevel,
20
- doc: (0, documentables_1.adaptDocumentable)(field, linkGenerator, baseHeadingLevel + 1),
21
- heading: field.name,
22
- type: {
23
- headingLevel: baseHeadingLevel + 1,
24
- heading: 'Type',
25
- value: linkGenerator(field.typeReference.rawDeclaration),
26
- },
27
- inherited: field.inherited,
28
- accessModifier: field.access_modifier,
29
- signature: {
30
- headingLevel: baseHeadingLevel + 1,
31
- heading: 'Signature',
32
- value: buildSignature(),
33
- },
34
- };
35
- }
36
- exports.adaptFieldOrProperty = adaptFieldOrProperty;
37
- //# sourceMappingURL=fields-and-properties.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fields-and-properties.js","sourceRoot":"","sources":["../../../src/core/adapters/fields-and-properties.ts"],"names":[],"mappings":";;;AACA,mDAAoD;AAGpD,SAAgB,oBAAoB,CAClC,KAAiE,EACjE,aAA6C,EAC7C,gBAAwB;IAExB,SAAS,cAAc;QACrB,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;QACxC,MAAM,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxD,MAAM,YAAY,GAAG,GAAG,eAAe,IAAI,eAAe,IAAI,IAAI,EAAE;YAClE,uBAAuB;aACtB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACzB,OAAO;YACL,MAAM,EAAE,YAAY;YACpB,QAAQ,EAAE,MAAM;YAChB,OAAO,EAAE,CAAC,YAAY,CAAC;SACxB,CAAC;IACJ,CAAC;IAED,OAAO;QACL,YAAY,EAAE,gBAAgB;QAC9B,GAAG,EAAE,IAAA,iCAAiB,EAAC,KAAK,EAAE,aAAa,EAAE,gBAAgB,GAAG,CAAC,CAAC;QAClE,OAAO,EAAE,KAAK,CAAC,IAAI;QACnB,IAAI,EAAE;YACJ,YAAY,EAAE,gBAAgB,GAAG,CAAC;YAClC,OAAO,EAAE,MAAM;YACf,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC;SACzD;QACD,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,cAAc,EAAE,KAAK,CAAC,eAAe;QACrC,SAAS,EAAE;YACT,YAAY,EAAE,gBAAgB,GAAG,CAAC;YAClC,OAAO,EAAE,WAAW;YACpB,KAAK,EAAE,cAAc,EAAE;SACxB;KACF,CAAC;AACJ,CAAC;AAnCD,oDAmCC"}
@@ -1,5 +0,0 @@
1
- import { ConstructorMirror, MethodMirror } from '@cparra/apex-reflection';
2
- import { RenderableConstructor, RenderableMethod } from './types';
3
- import { GetRenderableContentByTypeName } from './references';
4
- export declare function adaptMethod(method: MethodMirror, linkGenerator: GetRenderableContentByTypeName, baseHeadingLevel: number): RenderableMethod;
5
- export declare function adaptConstructor(typeName: string, constructor: ConstructorMirror, linkGenerator: GetRenderableContentByTypeName, baseHeadingLevel: number): RenderableConstructor;
@@ -1,100 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.adaptConstructor = exports.adaptMethod = void 0;
4
- const documentables_1 = require("./documentables");
5
- function adaptMethod(method, linkGenerator, baseHeadingLevel) {
6
- var _a, _b, _c;
7
- function buildTitle(method) {
8
- const { name, parameters } = method;
9
- const parametersString = parameters.map((param) => param.name).join(', ');
10
- return `${name}(${parametersString})`;
11
- }
12
- function buildSignature(method) {
13
- const { access_modifier, typeReference, name, memberModifiers } = method;
14
- const parameters = method.parameters
15
- .map((param) => `${param.typeReference.rawDeclaration} ${param.name}`)
16
- .join(', ');
17
- const members = memberModifiers.length > 0 ? `${memberModifiers.join(' ')} ` : '';
18
- return {
19
- __type: 'code-block',
20
- language: 'apex',
21
- content: [`${access_modifier} ${members}${typeReference.rawDeclaration} ${name}(${parameters})`],
22
- };
23
- }
24
- return {
25
- headingLevel: baseHeadingLevel,
26
- doc: (0, documentables_1.adaptDocumentable)(method, linkGenerator, baseHeadingLevel + 1),
27
- heading: buildTitle(method),
28
- signature: {
29
- headingLevel: baseHeadingLevel + 1,
30
- heading: 'Signature',
31
- value: buildSignature(method),
32
- },
33
- returnType: {
34
- headingLevel: baseHeadingLevel + 1,
35
- heading: 'Return Type',
36
- value: Object.assign(Object.assign({}, (0, documentables_1.adaptDescribable)((_b = (_a = method.docComment) === null || _a === void 0 ? void 0 : _a.returnAnnotation) === null || _b === void 0 ? void 0 : _b.bodyLines, linkGenerator)), { type: linkGenerator(method.typeReference.rawDeclaration) }),
37
- },
38
- throws: {
39
- headingLevel: baseHeadingLevel + 1,
40
- heading: 'Throws',
41
- value: (_c = method.docComment) === null || _c === void 0 ? void 0 : _c.throwsAnnotations.map((thrown) => mapThrows(thrown, linkGenerator)),
42
- },
43
- parameters: {
44
- headingLevel: baseHeadingLevel + 1,
45
- heading: 'Parameters',
46
- value: method.parameters.map((param) => mapParameters(method, param, linkGenerator)),
47
- },
48
- inherited: method.inherited,
49
- };
50
- }
51
- exports.adaptMethod = adaptMethod;
52
- function adaptConstructor(typeName, constructor, linkGenerator, baseHeadingLevel) {
53
- var _a;
54
- function buildTitle(name, constructor) {
55
- const { parameters } = constructor;
56
- const parametersString = parameters.map((param) => param.name).join(', ');
57
- return `${name}(${parametersString})`;
58
- }
59
- function buildSignature(name, constructor) {
60
- const { access_modifier } = constructor;
61
- const parameters = constructor.parameters
62
- .map((param) => `${param.typeReference.rawDeclaration} ${param.name}`)
63
- .join(', ');
64
- return {
65
- __type: 'code-block',
66
- language: 'apex',
67
- content: [`${access_modifier} ${name}(${parameters})`],
68
- };
69
- }
70
- return {
71
- doc: (0, documentables_1.adaptDocumentable)(constructor, linkGenerator, baseHeadingLevel + 1),
72
- headingLevel: baseHeadingLevel,
73
- heading: buildTitle(typeName, constructor),
74
- signature: {
75
- headingLevel: baseHeadingLevel + 1,
76
- heading: 'Signature',
77
- value: buildSignature(typeName, constructor),
78
- },
79
- parameters: {
80
- headingLevel: baseHeadingLevel + 1,
81
- heading: 'Parameters',
82
- value: constructor.parameters.map((param) => mapParameters(constructor, param, linkGenerator)),
83
- },
84
- throws: {
85
- headingLevel: baseHeadingLevel + 1,
86
- heading: 'Throws',
87
- value: (_a = constructor.docComment) === null || _a === void 0 ? void 0 : _a.throwsAnnotations.map((thrown) => mapThrows(thrown, linkGenerator)),
88
- },
89
- };
90
- }
91
- exports.adaptConstructor = adaptConstructor;
92
- function mapParameters(documentable, param, linkGenerator) {
93
- var _a;
94
- const paramAnnotation = (_a = documentable.docComment) === null || _a === void 0 ? void 0 : _a.paramAnnotations.find((pa) => pa.paramName.toLowerCase() === param.name.toLowerCase());
95
- return Object.assign(Object.assign({}, (0, documentables_1.adaptDescribable)(paramAnnotation === null || paramAnnotation === void 0 ? void 0 : paramAnnotation.bodyLines, linkGenerator)), { name: param.name, type: linkGenerator(param.typeReference.rawDeclaration) });
96
- }
97
- function mapThrows(thrown, linkGenerator) {
98
- return Object.assign(Object.assign({}, (0, documentables_1.adaptDescribable)(thrown.bodyLines, linkGenerator)), { type: linkGenerator(thrown.exceptionName) });
99
- }
100
- //# sourceMappingURL=methods-and-constructors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"methods-and-constructors.js","sourceRoot":"","sources":["../../../src/core/adapters/methods-and-constructors.ts"],"names":[],"mappings":";;;AAEA,mDAAsE;AAItE,SAAgB,WAAW,CACzB,MAAoB,EACpB,aAA6C,EAC7C,gBAAwB;;IAExB,SAAS,UAAU,CAAC,MAAmC;QACrD,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QACpC,MAAM,gBAAgB,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1E,OAAO,GAAG,IAAI,IAAI,gBAAgB,GAAG,CAAC;IACxC,CAAC;IAED,SAAS,cAAc,CAAC,MAAmC;QACzD,MAAM,EAAE,eAAe,EAAE,aAAa,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IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,IACvD;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,MAAwB,EAAE,aAA6C;IACxF,uCACK,IAAA,gCAAgB,EAAC,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,KACpD,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,aAAa,CAAC,IACzC;AACJ,CAAC"}
@@ -1,4 +0,0 @@
1
- import { RenderableContent, StringOrLink } from './types';
2
- export type GetRenderableContentByTypeName = (typeName: string) => StringOrLink;
3
- export declare function replaceInlineReferences(text: string, linkReplacer: GetRenderableContentByTypeName, emailReplacer?: GetRenderableContentByTypeName): RenderableContent[];
4
- export declare function replaceInlineEmails(renderableContents: RenderableContent[], getLinkByTypeName: GetRenderableContentByTypeName): RenderableContent[];
@@ -1,78 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.replaceInlineEmails = exports.replaceInlineReferences = void 0;
4
- function defaultGetEmailByReference(email) {
5
- return {
6
- __type: 'link',
7
- title: email,
8
- url: `mailto:${email}`,
9
- };
10
- }
11
- function replaceInlineReferences(text, linkReplacer, emailReplacer = defaultGetEmailByReference) {
12
- return replaceInlineEmails(replaceInlineLinks([text], linkReplacer), emailReplacer);
13
- }
14
- exports.replaceInlineReferences = replaceInlineReferences;
15
- function replaceInlineLinks(renderableContents, getLinkByTypeName) {
16
- return renderableContents.flatMap((renderableContent) => inlineLinkContent(renderableContent, getLinkByTypeName));
17
- }
18
- function inlineLinkContent(renderableContent, getLinkByTypeName) {
19
- if (typeof renderableContent !== 'string') {
20
- return [renderableContent];
21
- }
22
- const text = renderableContent;
23
- // Matches either `<<ClassName>>` or `{@link ClassName}`
24
- const linkFormatRegEx = '{@link (.*?)}|<<([^>]+)>>';
25
- const matches = match(linkFormatRegEx, text);
26
- return createRenderableContents(matches, text, getLinkByTypeName);
27
- }
28
- function replaceInlineEmails(renderableContents, getLinkByTypeName) {
29
- return renderableContents.flatMap((renderableContent) => inlineEmailContent(renderableContent, getLinkByTypeName));
30
- }
31
- exports.replaceInlineEmails = replaceInlineEmails;
32
- function inlineEmailContent(renderableContent, getLinkByTypeName) {
33
- if (typeof renderableContent !== 'string') {
34
- return [renderableContent];
35
- }
36
- const text = renderableContent;
37
- // Parsing references using the format '{@email email}'
38
- const linkFormatRegEx = '{@email (.*?)}';
39
- const matches = match(linkFormatRegEx, text);
40
- return createRenderableContents(matches, text, getLinkByTypeName);
41
- }
42
- function match(regex, text) {
43
- const expression = new RegExp(regex, 'gi');
44
- let match;
45
- const matches = [];
46
- do {
47
- match = expression.exec(text);
48
- if (match) {
49
- matches.push(match);
50
- }
51
- } while (match);
52
- return matches;
53
- }
54
- function createRenderableContents(matches, text, linker) {
55
- if (matches.length === 0) {
56
- return [text];
57
- }
58
- const result = [];
59
- let lastIndex = 0;
60
- for (const match of matches) {
61
- const index = match.index;
62
- const length = match[0].length;
63
- // loop through the matches (skip the first one, which is the full match)
64
- // until we find the first capturing group that has a value
65
- const capturedGroup = match.slice(1).find((group) => group);
66
- if (!capturedGroup) {
67
- continue;
68
- }
69
- result.push(text.slice(lastIndex, index));
70
- result.push(linker(capturedGroup));
71
- lastIndex = index + length;
72
- }
73
- if (lastIndex < text.length) {
74
- result.push(text.slice(lastIndex));
75
- }
76
- return result;
77
- }
78
- //# sourceMappingURL=references.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"references.js","sourceRoot":"","sources":["../../../src/core/adapters/references.ts"],"names":[],"mappings":";;;AAIA,SAAS,0BAA0B,CAAC,KAAa;IAC/C,OAAO;QACL,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,KAAK;QACZ,GAAG,EAAE,UAAU,KAAK,EAAE;KACvB,CAAC;AACJ,CAAC;AAED,SAAgB,uBAAuB,CACrC,IAAY,EACZ,YAA4C,EAC5C,gBAAgD,0BAA0B;IAE1E,OAAO,mBAA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AAC;QAEnC,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;IAC7B,CAAC;IAED,IAAI,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QAC5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,3 +0,0 @@
1
- import { CodeBlock, EmptyLine, RenderableContent } from './types';
2
- export declare function isEmptyLine(content: RenderableContent): content is EmptyLine;
3
- export declare function isCodeBlock(content: RenderableContent): content is CodeBlock;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isCodeBlock = exports.isEmptyLine = void 0;
4
- function isEmptyLine(content) {
5
- return Object.keys(content).includes('__type') && content.__type === 'empty-line';
6
- }
7
- exports.isEmptyLine = isEmptyLine;
8
- function isCodeBlock(content) {
9
- return Object.keys(content).includes('__type') && content.__type === 'code-block';
10
- }
11
- exports.isCodeBlock = isCodeBlock;
12
- //# sourceMappingURL=type-utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"type-utils.js","sourceRoot":"","sources":["../../../src/core/adapters/type-utils.ts"],"names":[],"mappings":";;;AAEA,SAAgB,WAAW,CAAC,OAA0B;IACpD,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAK,OAA8B,CAAC,MAAM,KAAK,YAAY,CAAC;AAC5G,CAAC;AAFD,kCAEC;AAED,SAAgB,WAAW,CAAC,OAA0B;IACpD,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAK,OAA8B,CAAC,MAAM,KAAK,YAAY,CAAC;AAC5G,CAAC;AAFD,kCAEC"}
@@ -1,6 +0,0 @@
1
- export default class ApexBundle {
2
- filePath: string;
3
- rawTypeContent: string;
4
- rawMetadataContent: string | null;
5
- constructor(filePath: string, rawTypeContent: string, rawMetadataContent: string | null);
6
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- class ApexBundle {
4
- constructor(filePath, rawTypeContent, rawMetadataContent) {
5
- this.filePath = filePath;
6
- this.rawTypeContent = rawTypeContent;
7
- this.rawMetadataContent = rawMetadataContent;
8
- }
9
- }
10
- exports.default = ApexBundle;
11
- //# sourceMappingURL=apex-bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apex-bundle.js","sourceRoot":"","sources":["../../src/core/apex-bundle.ts"],"names":[],"mappings":";;AAAA,MAAqB,UAAU;IAC7B,YAAmB,QAAgB,EAAS,cAAsB,EAAS,kBAAiC;QAAzF,aAAQ,GAAR,QAAQ,CAAQ;QAAS,mBAAc,GAAd,cAAc,CAAQ;QAAS,uBAAkB,GAAlB,kBAAkB,CAAe;IAAG,CAAC;CACjH;AAFD,6BAEC"}
@@ -1,28 +0,0 @@
1
- import * as E from 'fp-ts/Either';
2
- import ApexBundle from './apex-bundle';
3
- export type DocumentationBundle = {
4
- format: 'markdown';
5
- referenceGuide: string;
6
- docs: DocOutput[];
7
- };
8
- type DocumentationConfig = {
9
- scope: string[];
10
- outputDir: string;
11
- namespace?: string;
12
- sortMembersAlphabetically?: boolean;
13
- defaultGroupName: string;
14
- referenceGuideTemplate: string;
15
- };
16
- type DocOutput = {
17
- directory: string;
18
- docContents: string;
19
- typeName: string;
20
- type: 'class' | 'interface' | 'enum';
21
- };
22
- export declare function generateDocs(input: ApexBundle[], config?: Partial<DocumentationConfig>): E.Either<ReflectionError[], DocumentationBundle>;
23
- export declare class ReflectionError {
24
- file: string;
25
- message: string;
26
- constructor(file: string, message: string);
27
- }
28
- export {};