@cparra/apexdocs 2.25.0-alpha.0 → 2.25.0-alpha.10

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 (494) hide show
  1. package/README.md +37 -0
  2. package/__mocks__/chalk.js +12 -0
  3. package/__mocks__/log-update.js +6 -0
  4. package/dist/cli/generate.js +2963 -0
  5. package/dist/defaults-DUwru49Q.js +12 -0
  6. package/dist/defaults-SH0Rsi5E.js +11 -0
  7. package/dist/defaults-jLXD2y8-.js +13 -0
  8. package/dist/index.d.ts +101 -0
  9. package/dist/index.js +36 -0
  10. package/eslint.config.mjs +10 -0
  11. package/examples/markdown/docs/index.md +109 -0
  12. package/examples/markdown/docs/miscellaneous/BaseClass.md +16 -0
  13. package/examples/markdown/docs/miscellaneous/MultiInheritanceClass.md +72 -0
  14. package/examples/markdown/docs/miscellaneous/ParentInterface.md +15 -0
  15. package/examples/markdown/docs/miscellaneous/ReferencedEnum.md +8 -0
  16. package/examples/markdown/docs/miscellaneous/SampleException.md +24 -0
  17. package/examples/markdown/docs/miscellaneous/SampleInterface.md +112 -0
  18. package/examples/markdown/docs/miscellaneous/Url.md +309 -0
  19. package/examples/markdown/docs/sample-enums/SampleEnum.md +36 -0
  20. package/examples/markdown/docs/samplegroup/SampleClass.md +170 -0
  21. package/examples/markdown/force-app/classes/MultiInheritanceClass.cls +1 -0
  22. package/examples/{plain-markdown → markdown}/force-app/classes/SampleClass.cls +37 -0
  23. package/examples/markdown/force-app/classes/SampleException.cls +17 -0
  24. package/examples/markdown/force-app/classes/Url.cls +194 -0
  25. package/examples/{plain-markdown → markdown}/package.json +4 -8
  26. package/examples/vitepress/.forceignore +12 -0
  27. package/examples/vitepress/apexdocs.config.ts +106 -0
  28. package/examples/vitepress/config/project-scratch-def.json +13 -0
  29. package/examples/vitepress/docs/.vitepress/cache/deps/@theme_index.js +259 -0
  30. package/examples/vitepress/docs/.vitepress/cache/deps/@theme_index.js.map +7 -0
  31. package/examples/vitepress/docs/.vitepress/cache/deps/_metadata.json +40 -0
  32. package/examples/vitepress/docs/.vitepress/cache/deps/chunk-574YRH25.js +11474 -0
  33. package/examples/vitepress/docs/.vitepress/cache/deps/chunk-574YRH25.js.map +7 -0
  34. package/examples/vitepress/docs/.vitepress/cache/deps/chunk-E5DZZB2I.js +9172 -0
  35. package/examples/vitepress/docs/.vitepress/cache/deps/chunk-E5DZZB2I.js.map +7 -0
  36. package/examples/vitepress/docs/.vitepress/cache/deps/package.json +3 -0
  37. package/examples/vitepress/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +4339 -0
  38. package/examples/vitepress/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +7 -0
  39. package/examples/vitepress/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +567 -0
  40. package/examples/vitepress/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +7 -0
  41. package/examples/vitepress/docs/.vitepress/cache/deps/vue.js +323 -0
  42. package/examples/vitepress/docs/.vitepress/cache/deps/vue.js.map +7 -0
  43. package/examples/vitepress/docs/.vitepress/config.mts +21 -0
  44. package/examples/vitepress/docs/.vitepress/sidebar.json +119 -0
  45. package/examples/vitepress/docs/api-examples.md +49 -0
  46. package/examples/vitepress/docs/index-frontmatter.md +16 -0
  47. package/examples/vitepress/docs/index.md +56 -0
  48. package/examples/vitepress/docs/markdown-examples.md +85 -0
  49. package/examples/vitepress/docs/miscellaneous/BaseClass.md +20 -0
  50. package/examples/vitepress/docs/miscellaneous/MultiInheritanceClass.md +76 -0
  51. package/examples/vitepress/docs/miscellaneous/ParentInterface.md +19 -0
  52. package/examples/vitepress/docs/miscellaneous/ReferencedEnum.md +15 -0
  53. package/examples/vitepress/docs/miscellaneous/SampleException.md +28 -0
  54. package/examples/vitepress/docs/miscellaneous/SampleInterface.md +116 -0
  55. package/examples/vitepress/docs/miscellaneous/Url.md +317 -0
  56. package/examples/vitepress/docs/sample-enums/SampleEnum.md +40 -0
  57. package/examples/vitepress/docs/samplegroup/SampleClass.md +174 -0
  58. package/examples/vitepress/force-app/main/default/classes/BaseClass.cls +3 -0
  59. package/examples/vitepress/force-app/main/default/classes/MultiInheritanceClass.cls +1 -0
  60. package/examples/vitepress/force-app/main/default/classes/ParentInterface.cls +3 -0
  61. package/examples/vitepress/force-app/main/default/classes/ReferencedEnum.cls +5 -0
  62. package/examples/vitepress/force-app/main/default/classes/SampleClass.cls +72 -0
  63. package/examples/vitepress/force-app/main/default/classes/SampleEnum.cls +30 -0
  64. package/examples/vitepress/force-app/main/default/classes/SampleException.cls +17 -0
  65. package/examples/vitepress/force-app/main/default/classes/SampleInterface.cls +46 -0
  66. package/examples/vitepress/force-app/main/default/classes/Url.cls +198 -0
  67. package/examples/vitepress/package-lock.json +2574 -0
  68. package/examples/vitepress/package.json +18 -0
  69. package/examples/vitepress/sfdx-project.json +12 -0
  70. package/jest.config.js +6 -1
  71. package/jest.d.ts +7 -0
  72. package/package.json +29 -30
  73. package/src/application/Apexdocs.ts +17 -70
  74. package/src/application/__tests__/apex-file-reader.spec.ts +104 -0
  75. package/src/application/apex-file-reader.ts +42 -0
  76. package/src/application/file-writer.ts +21 -0
  77. package/src/application/generators/markdown.ts +58 -0
  78. package/src/application/generators/openapi.ts +56 -0
  79. package/src/cli/args.ts +43 -0
  80. package/src/cli/commands/markdown.ts +52 -0
  81. package/src/cli/generate.ts +10 -134
  82. package/src/core/manifest.ts +90 -0
  83. package/src/core/markdown/__test__/expect-extensions.ts +32 -0
  84. package/src/core/markdown/__test__/generating-class-docs.spec.ts +735 -0
  85. package/src/core/markdown/__test__/generating-enum-docs.spec.ts +385 -0
  86. package/src/core/markdown/__test__/generating-interface-docs.spec.ts +461 -0
  87. package/src/core/markdown/__test__/generating-reference-guide.spec.ts +180 -0
  88. package/src/core/markdown/__test__/inheritance-chain.test.ts +54 -0
  89. package/src/core/markdown/__test__/test-helpers.ts +23 -0
  90. package/src/core/markdown/adapters/__tests__/documentables.spec.ts +109 -0
  91. package/src/core/markdown/adapters/__tests__/interface-adapter.spec.ts +148 -0
  92. package/src/{adapters → core/markdown/adapters}/__tests__/references.spec.ts +23 -2
  93. package/src/core/markdown/adapters/apex-types.ts +238 -0
  94. package/src/core/markdown/adapters/documentables.ts +116 -0
  95. package/src/core/markdown/adapters/fields-and-properties.ts +45 -0
  96. package/src/{adapters/references.ts → core/markdown/adapters/inline.ts} +43 -13
  97. package/src/core/markdown/adapters/methods-and-constructors.ts +133 -0
  98. package/src/core/markdown/adapters/reference-guide.ts +35 -0
  99. package/src/core/markdown/adapters/renderable-bundle.ts +78 -0
  100. package/src/core/markdown/adapters/renderable-to-page-data.ts +89 -0
  101. package/src/core/markdown/adapters/type-utils.ts +13 -0
  102. package/src/core/markdown/adapters/types.d.ts +180 -0
  103. package/src/core/markdown/generate-docs.ts +216 -0
  104. package/src/core/markdown/reflection/error-handling.ts +37 -0
  105. package/src/core/markdown/reflection/filter-scope.ts +13 -0
  106. package/src/core/markdown/reflection/inheritance-chain-expanion.ts +22 -0
  107. package/src/core/markdown/reflection/inheritance-chain.ts +23 -0
  108. package/src/core/markdown/reflection/inherited-member-expansion.ts +105 -0
  109. package/src/core/markdown/reflection/reflect-source.ts +45 -0
  110. package/src/core/markdown/reflection/sort-members.ts +59 -0
  111. package/src/core/markdown/templates/class-template.ts +75 -0
  112. package/src/core/markdown/templates/constructors-partial-template.ts +32 -0
  113. package/src/core/markdown/templates/documentable-partial-template.ts +26 -0
  114. package/src/core/markdown/templates/enum-template.ts +12 -0
  115. package/src/core/markdown/templates/fieldsPartialTemplate.ts +23 -0
  116. package/src/core/markdown/templates/grouped-members-partial-template.ts +6 -0
  117. package/src/core/markdown/templates/hookable.ts +7 -0
  118. package/src/{transpiler/markdown/plain-markdown → core/markdown/templates}/interface-template.ts +4 -4
  119. package/src/core/markdown/templates/methods-partial-template.ts +43 -0
  120. package/src/core/markdown/templates/reference-guide.ts +14 -0
  121. package/src/core/markdown/templates/template.ts +114 -0
  122. package/src/core/markdown/templates/type-doc-partial.ts +27 -0
  123. package/src/core/markdown/utils.ts +3 -0
  124. package/src/{transpiler → core}/openapi/__tests__/open-api-docs-processor.spec.ts +1 -1
  125. package/src/{model → core/openapi}/apex-type-wrappers/__tests__/ClassMirrorWrapper.spec.ts +3 -3
  126. package/src/core/openapi/file-container.ts +13 -0
  127. package/src/{service → core/openapi}/manifest-factory.ts +3 -3
  128. package/src/{transpiler → core}/openapi/open-api-docs-processor.ts +9 -10
  129. package/src/core/openapi/openapi-type-file.ts +12 -0
  130. package/src/{service → core/openapi}/parser.ts +9 -9
  131. package/src/{transpiler → core}/openapi/parsers/Builder.ts +2 -2
  132. package/src/{transpiler → core}/openapi/parsers/MethodParser.ts +5 -5
  133. package/src/{transpiler → core}/openapi/parsers/ParameterObjectBuilder.ts +2 -2
  134. package/src/{transpiler → core}/openapi/parsers/ReferenceBuilder.ts +6 -5
  135. package/src/{transpiler → core}/openapi/parsers/RequestBodyBuilder.ts +2 -2
  136. package/src/{transpiler → core}/openapi/parsers/ResponsesBuilder.ts +2 -2
  137. package/src/{transpiler → core}/openapi/parsers/__tests__/MethodParser.spec.ts +1 -1
  138. package/src/{transpiler → core}/openapi/parsers/__tests__/ParameterObjectBuilder.spec.ts +2 -2
  139. package/src/{transpiler → core}/openapi/parsers/__tests__/ReferenceBuilder.spec.ts +2 -2
  140. package/src/{transpiler → core}/openapi/parsers/__tests__/RequestBodyBuilder.spec.ts +2 -2
  141. package/src/{transpiler → core}/openapi/parsers/__tests__/ResponsesBuilder.spec.ts +1 -1
  142. package/src/{transpiler → core/openapi}/transpiler.ts +2 -6
  143. package/src/{model → core/openapi}/types-repository.ts +0 -9
  144. package/src/core/parse-apex-metadata.ts +14 -0
  145. package/src/core/settings.ts +56 -0
  146. package/src/core/shared/types.d.ts +131 -0
  147. package/src/core/shared/utils.ts +5 -0
  148. package/src/defaults.ts +9 -0
  149. package/src/index.ts +41 -1
  150. package/src/test-helpers/ClassMirrorBuilder.ts +14 -1
  151. package/src/test-helpers/InterfaceMirrorBuilder.ts +0 -5
  152. package/src/test-helpers/SettingsBuilder.ts +1 -4
  153. package/src/util/fp.ts +3 -0
  154. package/src/util/logger.ts +3 -3
  155. package/src/util/string-utils.ts +0 -4
  156. package/tsconfig.json +7 -3
  157. package/.eslintrc.js +0 -12
  158. package/apexdocs.config.ts +0 -13
  159. package/docs/.nojekyll +0 -0
  160. package/docs/__old/README.md +0 -1
  161. package/docs/__old/index.html +0 -22
  162. package/docs/__old/restapi.json +0 -589
  163. package/docs/__old/types/Classes/nspc.AnotherInterface.md +0 -22
  164. package/docs/__old/types/Classes/nspc.ChildClass.md +0 -97
  165. package/docs/__old/types/Main/nspc.GroupedClass.md +0 -10
  166. package/docs/__old/types/Main/nspc.SampleClass.md +0 -189
  167. package/docs/__old/types/Misc-Group/nspc.EscapedAnnotations.md +0 -4
  168. package/docs/__old/types/Misc-Group/nspc.GrandparentClass.md +0 -13
  169. package/docs/__old/types/Misc-Group/nspc.InterfaceWithInheritance.md +0 -29
  170. package/docs/__old/types/Misc-Group/nspc.MemberGrouping.md +0 -13
  171. package/docs/__old/types/Misc-Group/nspc.ParentClass.md +0 -37
  172. package/docs/__old/types/Misc-Group/nspc.Reference1.md +0 -18
  173. package/docs/__old/types/Misc-Group/nspc.Reference2.md +0 -12
  174. package/docs/__old/types/Misc-Group/nspc.Reference3.md +0 -7
  175. package/docs/__old/types/Misc-Group/nspc.Reference4.md +0 -7
  176. package/docs/__old/types/Misc-Group/nspc.Reference5.md +0 -7
  177. package/docs/__old/types/Misc-Group/nspc.Reference6.md +0 -9
  178. package/docs/__old/types/Misc-Group/nspc.Reference7.md +0 -7
  179. package/docs/__old/types/Misc-Group/nspc.SampleClassWithoutModifier.md +0 -11
  180. package/docs/__old/types/Misc-Group/nspc.SampleRestResource.md +0 -104
  181. package/docs/__old/types/Misc-Group/nspc.SampleRestResourceWithInnerClass.md +0 -33
  182. package/docs/__old/types/Misc-Group/nspc.SampleRestResourceWithoutApexDocs.md +0 -14
  183. package/docs/__old/types/README.md +0 -97
  184. package/docs/__old/types/Sample-Interfaces/nspc.SampleInterface.md +0 -23
  185. package/examples/includes/header.md +0 -3
  186. package/examples/plain-markdown/README.md +0 -301
  187. package/examples/plain-markdown/force-app/classes/SampleException.cls +0 -1
  188. package/examples/plain-markdown/template.md +0 -3
  189. package/lib/adapters/apex-types.d.ts +0 -5
  190. package/lib/adapters/apex-types.js +0 -34
  191. package/lib/adapters/apex-types.js.map +0 -1
  192. package/lib/adapters/documentables.d.ts +0 -6
  193. package/lib/adapters/documentables.js +0 -41
  194. package/lib/adapters/documentables.js.map +0 -1
  195. package/lib/adapters/fields-and-properties.d.ts +0 -3
  196. package/lib/adapters/fields-and-properties.js +0 -10
  197. package/lib/adapters/fields-and-properties.js.map +0 -1
  198. package/lib/adapters/methods-and-constructors.d.ts +0 -4
  199. package/lib/adapters/methods-and-constructors.js +0 -49
  200. package/lib/adapters/methods-and-constructors.js.map +0 -1
  201. package/lib/adapters/references.d.ts +0 -5
  202. package/lib/adapters/references.js +0 -82
  203. package/lib/adapters/references.js.map +0 -1
  204. package/lib/adapters/type-utils.d.ts +0 -2
  205. package/lib/adapters/type-utils.js +0 -8
  206. package/lib/adapters/type-utils.js.map +0 -1
  207. package/lib/application/Apexdocs.d.ts +0 -13
  208. package/lib/application/Apexdocs.js +0 -80
  209. package/lib/application/Apexdocs.js.map +0 -1
  210. package/lib/cli/generate.d.ts +0 -2
  211. package/lib/cli/generate.js +0 -157
  212. package/lib/cli/generate.js.map +0 -1
  213. package/lib/index.d.ts +0 -1
  214. package/lib/index.js +0 -18
  215. package/lib/index.js.map +0 -1
  216. package/lib/model/apex-bundle.d.ts +0 -6
  217. package/lib/model/apex-bundle.js +0 -11
  218. package/lib/model/apex-bundle.js.map +0 -1
  219. package/lib/model/apex-type-wrappers/ClassMirrorWrapper.d.ts +0 -7
  220. package/lib/model/apex-type-wrappers/ClassMirrorWrapper.js +0 -14
  221. package/lib/model/apex-type-wrappers/ClassMirrorWrapper.js.map +0 -1
  222. package/lib/model/apex-type-wrappers/MethodMirrorWrapper.d.ts +0 -7
  223. package/lib/model/apex-type-wrappers/MethodMirrorWrapper.js +0 -12
  224. package/lib/model/apex-type-wrappers/MethodMirrorWrapper.js.map +0 -1
  225. package/lib/model/inheritance.d.ts +0 -8
  226. package/lib/model/inheritance.js +0 -3
  227. package/lib/model/inheritance.js.map +0 -1
  228. package/lib/model/manifest.d.ts +0 -22
  229. package/lib/model/manifest.js +0 -47
  230. package/lib/model/manifest.js.map +0 -1
  231. package/lib/model/markdown-file.d.ts +0 -16
  232. package/lib/model/markdown-file.js +0 -110
  233. package/lib/model/markdown-file.js.map +0 -1
  234. package/lib/model/markdown-generation-util/doc-comment-annotation-util.d.ts +0 -8
  235. package/lib/model/markdown-generation-util/doc-comment-annotation-util.js +0 -47
  236. package/lib/model/markdown-generation-util/doc-comment-annotation-util.js.map +0 -1
  237. package/lib/model/markdown-generation-util/field-declaration-util.d.ts +0 -3
  238. package/lib/model/markdown-generation-util/field-declaration-util.js +0 -55
  239. package/lib/model/markdown-generation-util/field-declaration-util.js.map +0 -1
  240. package/lib/model/markdown-generation-util/index.d.ts +0 -3
  241. package/lib/model/markdown-generation-util/index.js +0 -20
  242. package/lib/model/markdown-generation-util/index.js.map +0 -1
  243. package/lib/model/markdown-generation-util/method-declaration-util.d.ts +0 -4
  244. package/lib/model/markdown-generation-util/method-declaration-util.js +0 -115
  245. package/lib/model/markdown-generation-util/method-declaration-util.js.map +0 -1
  246. package/lib/model/markdown-generation-util/type-declaration-util.d.ts +0 -3
  247. package/lib/model/markdown-generation-util/type-declaration-util.js +0 -82
  248. package/lib/model/markdown-generation-util/type-declaration-util.js.map +0 -1
  249. package/lib/model/markdown-home-file.d.ts +0 -11
  250. package/lib/model/markdown-home-file.js +0 -57
  251. package/lib/model/markdown-home-file.js.map +0 -1
  252. package/lib/model/markdown-type-file.d.ts +0 -26
  253. package/lib/model/markdown-type-file.js +0 -137
  254. package/lib/model/markdown-type-file.js.map +0 -1
  255. package/lib/model/openapi/apex-doc-types.d.ts +0 -19
  256. package/lib/model/openapi/apex-doc-types.js +0 -5
  257. package/lib/model/openapi/apex-doc-types.js.map +0 -1
  258. package/lib/model/openapi/open-api-types.d.ts +0 -93
  259. package/lib/model/openapi/open-api-types.js +0 -3
  260. package/lib/model/openapi/open-api-types.js.map +0 -1
  261. package/lib/model/openapi/open-api.d.ts +0 -16
  262. package/lib/model/openapi/open-api.js +0 -34
  263. package/lib/model/openapi/open-api.js.map +0 -1
  264. package/lib/model/openapi/openapi-type-file.d.ts +0 -7
  265. package/lib/model/openapi/openapi-type-file.js +0 -17
  266. package/lib/model/openapi/openapi-type-file.js.map +0 -1
  267. package/lib/model/outputFile.d.ts +0 -10
  268. package/lib/model/outputFile.js +0 -29
  269. package/lib/model/outputFile.js.map +0 -1
  270. package/lib/model/types-repository.d.ts +0 -16
  271. package/lib/model/types-repository.js +0 -54
  272. package/lib/model/types-repository.js.map +0 -1
  273. package/lib/service/apex-file-reader.d.ts +0 -14
  274. package/lib/service/apex-file-reader.js +0 -49
  275. package/lib/service/apex-file-reader.js.map +0 -1
  276. package/lib/service/file-system.d.ts +0 -14
  277. package/lib/service/file-system.js +0 -48
  278. package/lib/service/file-system.js.map +0 -1
  279. package/lib/service/file-writer.d.ts +0 -6
  280. package/lib/service/file-writer.js +0 -57
  281. package/lib/service/file-writer.js.map +0 -1
  282. package/lib/service/manifest-factory.d.ts +0 -10
  283. package/lib/service/manifest-factory.js +0 -17
  284. package/lib/service/manifest-factory.js.map +0 -1
  285. package/lib/service/metadata-processor.d.ts +0 -3
  286. package/lib/service/metadata-processor.js +0 -17
  287. package/lib/service/metadata-processor.js.map +0 -1
  288. package/lib/service/parser.d.ts +0 -21
  289. package/lib/service/parser.js +0 -138
  290. package/lib/service/parser.js.map +0 -1
  291. package/lib/service/state.d.ts +0 -9
  292. package/lib/service/state.js +0 -20
  293. package/lib/service/state.js.map +0 -1
  294. package/lib/service/walkers/class-walker.d.ts +0 -4
  295. package/lib/service/walkers/class-walker.js +0 -33
  296. package/lib/service/walkers/class-walker.js.map +0 -1
  297. package/lib/service/walkers/enum-walker.d.ts +0 -4
  298. package/lib/service/walkers/enum-walker.js +0 -11
  299. package/lib/service/walkers/enum-walker.js.map +0 -1
  300. package/lib/service/walkers/interface-walker.d.ts +0 -4
  301. package/lib/service/walkers/interface-walker.js +0 -15
  302. package/lib/service/walkers/interface-walker.js.map +0 -1
  303. package/lib/service/walkers/walker-factory.d.ts +0 -5
  304. package/lib/service/walkers/walker-factory.js +0 -21
  305. package/lib/service/walkers/walker-factory.js.map +0 -1
  306. package/lib/service/walkers/walker.d.ts +0 -19
  307. package/lib/service/walkers/walker.js +0 -17
  308. package/lib/service/walkers/walker.js.map +0 -1
  309. package/lib/settings.d.ts +0 -70
  310. package/lib/settings.js +0 -100
  311. package/lib/settings.js.map +0 -1
  312. package/lib/templating/compile.d.ts +0 -7
  313. package/lib/templating/compile.js +0 -98
  314. package/lib/templating/compile.js.map +0 -1
  315. package/lib/templating/helpers.d.ts +0 -2
  316. package/lib/templating/helpers.js +0 -18
  317. package/lib/templating/helpers.js.map +0 -1
  318. package/lib/test-helpers/AnnotationBuilder.d.ts +0 -12
  319. package/lib/test-helpers/AnnotationBuilder.js +0 -31
  320. package/lib/test-helpers/AnnotationBuilder.js.map +0 -1
  321. package/lib/test-helpers/ClassMirrorBuilder.d.ts +0 -18
  322. package/lib/test-helpers/ClassMirrorBuilder.js +0 -54
  323. package/lib/test-helpers/ClassMirrorBuilder.js.map +0 -1
  324. package/lib/test-helpers/DocCommentAnnotationBuilder.d.ts +0 -8
  325. package/lib/test-helpers/DocCommentAnnotationBuilder.js +0 -26
  326. package/lib/test-helpers/DocCommentAnnotationBuilder.js.map +0 -1
  327. package/lib/test-helpers/DocCommentBuilder.d.ts +0 -12
  328. package/lib/test-helpers/DocCommentBuilder.js +0 -38
  329. package/lib/test-helpers/DocCommentBuilder.js.map +0 -1
  330. package/lib/test-helpers/FieldMirrorBuilder.d.ts +0 -18
  331. package/lib/test-helpers/FieldMirrorBuilder.js +0 -54
  332. package/lib/test-helpers/FieldMirrorBuilder.js.map +0 -1
  333. package/lib/test-helpers/InterfaceMirrorBuilder.d.ts +0 -16
  334. package/lib/test-helpers/InterfaceMirrorBuilder.js +0 -43
  335. package/lib/test-helpers/InterfaceMirrorBuilder.js.map +0 -1
  336. package/lib/test-helpers/MethodMirrorBuilder.d.ts +0 -29
  337. package/lib/test-helpers/MethodMirrorBuilder.js +0 -72
  338. package/lib/test-helpers/MethodMirrorBuilder.js.map +0 -1
  339. package/lib/test-helpers/SettingsBuilder.d.ts +0 -8
  340. package/lib/test-helpers/SettingsBuilder.js +0 -27
  341. package/lib/test-helpers/SettingsBuilder.js.map +0 -1
  342. package/lib/transpiler/factory.d.ts +0 -6
  343. package/lib/transpiler/factory.js +0 -35
  344. package/lib/transpiler/factory.js.map +0 -1
  345. package/lib/transpiler/file-container.d.ts +0 -6
  346. package/lib/transpiler/file-container.js +0 -16
  347. package/lib/transpiler/file-container.js.map +0 -1
  348. package/lib/transpiler/generator-choices.d.ts +0 -1
  349. package/lib/transpiler/generator-choices.js +0 -3
  350. package/lib/transpiler/generator-choices.js.map +0 -1
  351. package/lib/transpiler/markdown/class-file-generatorHelper.d.ts +0 -11
  352. package/lib/transpiler/markdown/class-file-generatorHelper.js +0 -75
  353. package/lib/transpiler/markdown/class-file-generatorHelper.js.map +0 -1
  354. package/lib/transpiler/markdown/docsify/docsify-docs-processor.d.ts +0 -6
  355. package/lib/transpiler/markdown/docsify/docsify-docs-processor.js +0 -13
  356. package/lib/transpiler/markdown/docsify/docsify-docs-processor.js.map +0 -1
  357. package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.d.ts +0 -11
  358. package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js +0 -51
  359. package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js.map +0 -1
  360. package/lib/transpiler/markdown/markdown-transpiler-base.d.ts +0 -11
  361. package/lib/transpiler/markdown/markdown-transpiler-base.js +0 -27
  362. package/lib/transpiler/markdown/markdown-transpiler-base.js.map +0 -1
  363. package/lib/transpiler/markdown/plain-markdown/class-template.d.ts +0 -1
  364. package/lib/transpiler/markdown/plain-markdown/class-template.js +0 -36
  365. package/lib/transpiler/markdown/plain-markdown/class-template.js.map +0 -1
  366. package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.d.ts +0 -1
  367. package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.js +0 -39
  368. package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.js.map +0 -1
  369. package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.d.ts +0 -1
  370. package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.js +0 -25
  371. package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.js.map +0 -1
  372. package/lib/transpiler/markdown/plain-markdown/enum-template.d.ts +0 -1
  373. package/lib/transpiler/markdown/plain-markdown/enum-template.js +0 -15
  374. package/lib/transpiler/markdown/plain-markdown/enum-template.js.map +0 -1
  375. package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.d.ts +0 -1
  376. package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js +0 -24
  377. package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js.map +0 -1
  378. package/lib/transpiler/markdown/plain-markdown/interface-template.d.ts +0 -1
  379. package/lib/transpiler/markdown/plain-markdown/interface-template.js +0 -20
  380. package/lib/transpiler/markdown/plain-markdown/interface-template.js.map +0 -1
  381. package/lib/transpiler/markdown/plain-markdown/methods-partial-template.d.ts +0 -1
  382. package/lib/transpiler/markdown/plain-markdown/methods-partial-template.js +0 -49
  383. package/lib/transpiler/markdown/plain-markdown/methods-partial-template.js.map +0 -1
  384. package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.d.ts +0 -13
  385. package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js +0 -122
  386. package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js.map +0 -1
  387. package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.d.ts +0 -1
  388. package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.js +0 -31
  389. package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.js.map +0 -1
  390. package/lib/transpiler/openapi/open-api-docs-processor.d.ts +0 -13
  391. package/lib/transpiler/openapi/open-api-docs-processor.js +0 -78
  392. package/lib/transpiler/openapi/open-api-docs-processor.js.map +0 -1
  393. package/lib/transpiler/openapi/parsers/Builder.d.ts +0 -16
  394. package/lib/transpiler/openapi/parsers/Builder.js +0 -30
  395. package/lib/transpiler/openapi/parsers/Builder.js.map +0 -1
  396. package/lib/transpiler/openapi/parsers/MethodParser.d.ts +0 -20
  397. package/lib/transpiler/openapi/parsers/MethodParser.js +0 -190
  398. package/lib/transpiler/openapi/parsers/MethodParser.js.map +0 -1
  399. package/lib/transpiler/openapi/parsers/ParameterObjectBuilder.d.ts +0 -7
  400. package/lib/transpiler/openapi/parsers/ParameterObjectBuilder.js +0 -11
  401. package/lib/transpiler/openapi/parsers/ParameterObjectBuilder.js.map +0 -1
  402. package/lib/transpiler/openapi/parsers/ReferenceBuilder.d.ts +0 -39
  403. package/lib/transpiler/openapi/parsers/ReferenceBuilder.js +0 -249
  404. package/lib/transpiler/openapi/parsers/ReferenceBuilder.js.map +0 -1
  405. package/lib/transpiler/openapi/parsers/RequestBodyBuilder.d.ts +0 -10
  406. package/lib/transpiler/openapi/parsers/RequestBodyBuilder.js +0 -20
  407. package/lib/transpiler/openapi/parsers/RequestBodyBuilder.js.map +0 -1
  408. package/lib/transpiler/openapi/parsers/ResponsesBuilder.d.ts +0 -7
  409. package/lib/transpiler/openapi/parsers/ResponsesBuilder.js +0 -22
  410. package/lib/transpiler/openapi/parsers/ResponsesBuilder.js.map +0 -1
  411. package/lib/transpiler/processor-type-transpiler.d.ts +0 -10
  412. package/lib/transpiler/processor-type-transpiler.js +0 -9
  413. package/lib/transpiler/processor-type-transpiler.js.map +0 -1
  414. package/lib/transpiler/transpiler.d.ts +0 -5
  415. package/lib/transpiler/transpiler.js +0 -30
  416. package/lib/transpiler/transpiler.js.map +0 -1
  417. package/lib/util/error-logger.d.ts +0 -8
  418. package/lib/util/error-logger.js +0 -90
  419. package/lib/util/error-logger.js.map +0 -1
  420. package/lib/util/logger.d.ts +0 -21
  421. package/lib/util/logger.js +0 -61
  422. package/lib/util/logger.js.map +0 -1
  423. package/lib/util/string-utils.d.ts +0 -2
  424. package/lib/util/string-utils.js +0 -15
  425. package/lib/util/string-utils.js.map +0 -1
  426. package/src/adapters/__tests__/interface-adapter.spec.ts +0 -76
  427. package/src/adapters/apex-types.ts +0 -67
  428. package/src/adapters/documentables.ts +0 -58
  429. package/src/adapters/fields-and-properties.ts +0 -14
  430. package/src/adapters/methods-and-constructors.ts +0 -78
  431. package/src/adapters/type-utils.ts +0 -5
  432. package/src/adapters/types.d.ts +0 -8
  433. package/src/model/apex-bundle.ts +0 -3
  434. package/src/model/inheritance.ts +0 -7
  435. package/src/model/manifest.ts +0 -74
  436. package/src/model/markdown-file.ts +0 -121
  437. package/src/model/markdown-generation-util/doc-comment-annotation-util.ts +0 -50
  438. package/src/model/markdown-generation-util/field-declaration-util.ts +0 -71
  439. package/src/model/markdown-generation-util/index.ts +0 -3
  440. package/src/model/markdown-generation-util/method-declaration-util.ts +0 -166
  441. package/src/model/markdown-generation-util/type-declaration-util.ts +0 -91
  442. package/src/model/markdown-home-file.ts +0 -58
  443. package/src/model/markdown-type-file.ts +0 -165
  444. package/src/model/openapi/openapi-type-file.ts +0 -14
  445. package/src/model/outputFile.ts +0 -29
  446. package/src/service/__tests__/apex-file-reader.spec.ts +0 -92
  447. package/src/service/apex-file-reader.ts +0 -51
  448. package/src/service/file-writer.ts +0 -34
  449. package/src/service/metadata-processor.ts +0 -16
  450. package/src/service/state.ts +0 -24
  451. package/src/service/walkers/class-walker.ts +0 -30
  452. package/src/service/walkers/enum-walker.ts +0 -7
  453. package/src/service/walkers/interface-walker.ts +0 -12
  454. package/src/service/walkers/walker-factory.ts +0 -19
  455. package/src/service/walkers/walker.ts +0 -42
  456. package/src/settings.ts +0 -162
  457. package/src/templating/__tests__/compile.spec.ts +0 -741
  458. package/src/templating/compile.ts +0 -187
  459. package/src/templating/helpers.ts +0 -14
  460. package/src/templating/types.d.ts +0 -104
  461. package/src/transpiler/factory.ts +0 -33
  462. package/src/transpiler/file-container.ts +0 -13
  463. package/src/transpiler/generator-choices.ts +0 -1
  464. package/src/transpiler/markdown/class-file-generatorHelper.ts +0 -78
  465. package/src/transpiler/markdown/docsify/docsify-docs-processor.ts +0 -12
  466. package/src/transpiler/markdown/jekyll/jekyll-docsProcessor.ts +0 -50
  467. package/src/transpiler/markdown/markdown-transpiler-base.ts +0 -28
  468. package/src/transpiler/markdown/plain-markdown/class-template.ts +0 -32
  469. package/src/transpiler/markdown/plain-markdown/constructors-partial-template.ts +0 -35
  470. package/src/transpiler/markdown/plain-markdown/documentable-partial-template.ts +0 -21
  471. package/src/transpiler/markdown/plain-markdown/enum-template.ts +0 -11
  472. package/src/transpiler/markdown/plain-markdown/fieldsPartialTemplate.ts +0 -20
  473. package/src/transpiler/markdown/plain-markdown/methods-partial-template.ts +0 -45
  474. package/src/transpiler/markdown/plain-markdown/plain-docsProcessor.ts +0 -134
  475. package/src/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.ts +0 -27
  476. package/src/transpiler/processor-type-transpiler.ts +0 -18
  477. /package/examples/{plain-markdown → markdown}/.forceignore +0 -0
  478. /package/examples/{plain-markdown → markdown}/config/project-scratch-def.json +0 -0
  479. /package/examples/{plain-markdown → markdown}/force-app/classes/BaseClass.cls +0 -0
  480. /package/examples/{plain-markdown → markdown}/force-app/classes/ParentInterface.cls +0 -0
  481. /package/examples/{plain-markdown → markdown}/force-app/classes/ReferencedEnum.cls +0 -0
  482. /package/examples/{plain-markdown → markdown}/force-app/classes/SampleEnum.cls +0 -0
  483. /package/examples/{plain-markdown → markdown}/force-app/classes/SampleInterface.cls +0 -0
  484. /package/examples/{plain-markdown → markdown}/package-lock.json +0 -0
  485. /package/examples/{plain-markdown → markdown}/sfdx-project.json +0 -0
  486. /package/src/{service → application}/file-system.ts +0 -0
  487. /package/src/{model/__tests__ → core/__test__}/manifest.spec.ts +0 -0
  488. /package/src/{service → core/openapi}/__tests__/manifest-factory.spec.ts +0 -0
  489. /package/src/{model → core}/openapi/__tests__/open-api.spec.ts +0 -0
  490. /package/src/{model → core}/openapi/apex-doc-types.ts +0 -0
  491. /package/src/{model → core/openapi}/apex-type-wrappers/ClassMirrorWrapper.ts +0 -0
  492. /package/src/{model → core/openapi}/apex-type-wrappers/MethodMirrorWrapper.ts +0 -0
  493. /package/src/{model → core}/openapi/open-api-types.ts +0 -0
  494. /package/src/{model → core}/openapi/open-api.ts +0 -0
@@ -1,301 +0,0 @@
1
- # Template file
2
-
3
- # BaseClass Class
4
- `abstract`
5
-
6
- ## Namespace
7
- ns
8
-
9
- ## Fields
10
- ### `sampleEnumFromBase`
11
-
12
- #### Type
13
- [ns.SampleEnum](../Sample-Enums/ns.SampleEnum.md)
14
-
15
-
16
- ---
17
-
18
- # ParentInterface Interface
19
-
20
- ## Namespace
21
- ns
22
-
23
- ## Methods
24
- ### `sampleParentMethod()`
25
-
26
- ### Signature
27
- ```apex
28
- public void sampleParentMethod()
29
- ```
30
-
31
- ### Returns
32
- **void**
33
-
34
-
35
- ---
36
-
37
- # ReferencedEnum Enum
38
-
39
- ## Namespace
40
- ns
41
-
42
- ## Enum Values
43
-
44
-
45
- ---
46
-
47
- # SampleClass Class
48
- `virtual`
49
-
50
- aliquip ex sunt officia ullamco anim deserunt magna aliquip nisi eiusmod in sit officia veniam ex
51
-
52
- deserunt ea officia exercitation laboris enim in duis quis enim eiusmod eu amet cupidatat.
53
-
54
- **Group** SampleGroup
55
-
56
- ## Namespace
57
- ns
58
-
59
- ## Example
60
- ```apex
61
- SampleClass sample = new SampleClass();
62
- sample.doSomething();
63
- ```
64
-
65
- **Extends**
66
- [ns.BaseClass](../Miscellaneous/ns.BaseClass.md)
67
-
68
- **Implements**
69
- [ns.SampleInterface](../Miscellaneous/ns.SampleInterface.md),
70
- [ns.ParentInterface](../Miscellaneous/ns.ParentInterface.md)
71
-
72
- ## Fields
73
- ### `name`
74
-
75
- This is a sample field.
76
-
77
- #### Type
78
- String
79
-
80
- ---
81
-
82
- ### `sampleEnumFromBase`
83
-
84
- *Inherited*
85
-
86
- #### Type
87
- [ns.SampleEnum](../Sample-Enums/ns.SampleEnum.md)
88
-
89
- ## Constructors
90
- ### `SampleClass()`
91
-
92
- This is a sample constructor.
93
-
94
- ### Signature
95
- ```apex
96
- public SampleClass()
97
- ```
98
-
99
- ---
100
- ### `SampleClass(name)`
101
-
102
- ### Signature
103
- ```apex
104
- public SampleClass(String name)
105
- ```
106
-
107
- ### Parameters
108
- | Name | Type | Description |
109
- |------|------|-------------|
110
- | name | String | |
111
-
112
- ## Methods
113
- ### `sayHello()`
114
-
115
- `DEPRECATED`
116
-
117
- This is a sample method.
118
-
119
- ### Signature
120
- ```apex
121
- public virtual String sayHello()
122
- ```
123
-
124
- ### Returns
125
- **String**
126
-
127
- A string value.
128
-
129
- ### Example
130
- ```apex
131
- SampleClass sample = new SampleClass();
132
- sample.doSomething();
133
- ```
134
-
135
-
136
- ---
137
-
138
- # SampleEnum Enum
139
-
140
- `NAMESPACEACCESSIBLE`
141
-
142
- This is a sample enum. This references [ns.ReferencedEnum](../Miscellaneous/ns.ReferencedEnum.md) .
143
-
144
- This description has several lines
145
-
146
- **Some Custom**
147
-
148
- **Group** Sample Enums
149
-
150
- **Author** John Doe
151
-
152
- **Date** 2022-01-01
153
-
154
- **See** [ns.ReferencedEnum](../Miscellaneous/ns.ReferencedEnum.md)
155
-
156
- ## Namespace
157
- ns
158
-
159
- ```mermaid
160
- graph TD
161
- A[SampleEnum] -->|references| B[ReferencedEnum]
162
- B -->|referenced by| A
163
- ```
164
-
165
- ## Enum Values
166
- ### VALUE1
167
- This is value 1
168
- ### VALUE2
169
- This is value 2
170
- ### VALUE3
171
- This is value 3
172
-
173
-
174
- ---
175
-
176
- # SampleException Class
177
-
178
- ## Namespace
179
- ns
180
-
181
- **Extends**
182
- Exception
183
-
184
-
185
- ---
186
-
187
- # SampleInterface Interface
188
-
189
- `NAMESPACEACCESSIBLE`
190
-
191
- This is a sample interface
192
-
193
- **Author** John Doe
194
-
195
- **Date** 2020-01-01
196
-
197
- **See** [ns.SampleEnum](../Sample-Enums/ns.SampleEnum.md)
198
-
199
- **See** [ns.ReferencedEnum](./ns.ReferencedEnum.md)
200
-
201
- ## Namespace
202
- ns
203
-
204
- ```mermaid
205
- graph TD
206
- A[SampleInterface] -->|extends| B[ParentInterface]
207
- B -->|extends| C[GrandParentInterface]
208
- C -->|extends| D[GreatGrandParentInterface]
209
- ```
210
-
211
- ## Example
212
- ```apex
213
- SampleInterface sampleInterface = new SampleInterface();
214
- sampleInterface.sampleMethod();
215
- ```
216
-
217
- **Extends**
218
- [ns.ParentInterface](./ns.ParentInterface.md)
219
-
220
- ## Methods
221
- ### `sampleMethod()`
222
-
223
- `NAMESPACEACCESSIBLE`
224
-
225
- This is a sample method
226
-
227
- **Custom Tag**
228
-
229
- **Another Custom Tag**
230
-
231
- ### Signature
232
- ```apex
233
- public String sampleMethod()
234
- ```
235
-
236
- ### Returns
237
- **String**
238
-
239
- Some return value
240
-
241
- ### Throws
242
- [ns.SampleException](./ns.SampleException.md): This is a sample exception
243
-
244
- AnotherSampleException: This is another sample exception
245
-
246
- ```mermaid
247
- graph TD
248
- A[SampleInterface] -->|extends| B[ParentInterface]
249
- B -->|extends| C[GrandParentInterface]
250
- C -->|extends| D[GreatGrandParentInterface]
251
- ```
252
-
253
- ### Example
254
- ```apex
255
- SampleInterface sampleInterface = new SampleInterface();
256
- sampleInterface.sampleMethod();
257
- ```
258
-
259
- ---
260
-
261
- ### `sampleMethodWithParams(param1, param2, theEnum)`
262
-
263
- `NAMESPACEACCESSIBLE`
264
- `DEPRECATED`
265
-
266
- This is a sample method with parameters
267
-
268
- Sometimes it won't be possible to find a NonExistent link.
269
-
270
- ### Signature
271
- ```apex
272
- public SampleEnum sampleMethodWithParams(String param1, Integer param2, SampleEnum theEnum)
273
- ```
274
-
275
- ### Parameters
276
- | Name | Type | Description |
277
- |------|------|-------------|
278
- | param1 | String | This is the first parameter |
279
- | param2 | Integer | This is the second parameter |
280
- | theEnum | [ns.SampleEnum](../Sample-Enums/ns.SampleEnum.md) | This is an enum parameter |
281
-
282
- ### Returns
283
- **[ns.SampleEnum](../Sample-Enums/ns.SampleEnum.md)**
284
-
285
- Some return value
286
-
287
- ---
288
-
289
- ### `sampleParentMethod()`
290
-
291
- *Inherited*
292
-
293
- ### Signature
294
- ```apex
295
- public void sampleParentMethod()
296
- ```
297
-
298
- ### Returns
299
- **void**
300
-
301
-
@@ -1 +0,0 @@
1
- public class SampleException extends Exception {}
@@ -1,3 +0,0 @@
1
- # Template file
2
-
3
- {{{api_docs}}}
@@ -1,5 +0,0 @@
1
- import { ClassMirror, EnumMirror, InterfaceMirror } from '@cparra/apex-reflection';
2
- import { ClassSource, EnumSource, InterfaceSource } from '../templating/types';
3
- export declare function enumTypeToEnumSource(enumType: EnumMirror): EnumSource;
4
- export declare function interfaceTypeToInterfaceSource(interfaceType: InterfaceMirror): InterfaceSource;
5
- export declare function classTypeToClassSource(classType: ClassMirror): ClassSource;
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.classTypeToClassSource = exports.interfaceTypeToInterfaceSource = exports.enumTypeToEnumSource = void 0;
4
- const documentables_1 = require("./documentables");
5
- const references_1 = require("./references");
6
- const methods_and_constructors_1 = require("./methods-and-constructors");
7
- const fields_and_properties_1 = require("./fields-and-properties");
8
- function baseTypeAdapter(type) {
9
- function extractAnnotationBody(type, annotationName) {
10
- var _a, _b;
11
- 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;
12
- }
13
- function extractSeeAnnotations(type) {
14
- var _a, _b;
15
- 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 : []);
16
- }
17
- return Object.assign(Object.assign({}, (0, documentables_1.adaptDocumentable)(type)), { accessModifier: type.access_modifier, name: type.name, group: extractAnnotationBody(type, 'group'), author: extractAnnotationBody(type, 'author'), date: extractAnnotationBody(type, 'date'), sees: extractSeeAnnotations(type).map(references_1.linkFromTypeNameGenerator) });
18
- }
19
- function enumTypeToEnumSource(enumType) {
20
- return Object.assign(Object.assign({ __type: 'enum' }, baseTypeAdapter(enumType)), { values: enumType.values.map((value) => {
21
- var _a;
22
- return (Object.assign(Object.assign({}, (0, documentables_1.adaptDescribable)((_a = value.docComment) === null || _a === void 0 ? void 0 : _a.descriptionLines)), { value: value.name }));
23
- }) });
24
- }
25
- exports.enumTypeToEnumSource = enumTypeToEnumSource;
26
- function interfaceTypeToInterfaceSource(interfaceType) {
27
- return Object.assign(Object.assign({ __type: 'interface' }, baseTypeAdapter(interfaceType)), { extends: interfaceType.extended_interfaces.map(references_1.linkFromTypeNameGenerator), methods: interfaceType.methods.map(methods_and_constructors_1.adaptMethod) });
28
- }
29
- exports.interfaceTypeToInterfaceSource = interfaceTypeToInterfaceSource;
30
- function classTypeToClassSource(classType) {
31
- return Object.assign(Object.assign({ __type: 'class' }, baseTypeAdapter(classType)), { classModifier: classType.classModifier, sharingModifier: classType.sharingModifier, implements: classType.implemented_interfaces.map(references_1.linkFromTypeNameGenerator), extends: classType.extended_class ? (0, references_1.linkFromTypeNameGenerator)(classType.extended_class) : undefined, methods: classType.methods.map(methods_and_constructors_1.adaptMethod), constructors: classType.constructors.map((constructor) => (0, methods_and_constructors_1.adaptConstructor)(classType.name, constructor)), fields: classType.fields.map((field) => (0, fields_and_properties_1.adaptField)(field)) });
32
- }
33
- exports.classTypeToClassSource = classTypeToClassSource;
34
- //# sourceMappingURL=apex-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apex-types.js","sourceRoot":"","sources":["../../src/adapters/apex-types.ts"],"names":[],"mappings":";;;AAEA,mDAAsE;AACtE,6CAAyD;AAEzD,yEAA2E;AAC3E,mEAAqD;AAErD,SAAS,eAAe,CAAC,IAAgD;IACvE,SAAS,qBAAqB,CAAC,IAAU,EAAE,cAAsB;;QAC/D,OAAO,MAAA,MAAA,IAAI,CAAC,UAAU,0CAAE,WAAW,CAAC,IAAI,CACtC,CAAC,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,cAAc,CAC/E,0CAAE,IAAI,CAAC;IACV,CAAC;IAED,SAAS,qBAAqB,CAAC,IAAU;;QACvC,OAAO,CACL,MAAA,MAAA,IAAI,CAAC,UAAU,0CAAE,WAAW,CACzB,MAAM,CAAC,CAAC,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,KAAK,EAC5E,GAAG,CAAC,CAAC,iBAAiB,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,mCAAI,EAAE,CAC5D,CAAC;IACJ,CAAC;IAED,uCACK,IAAA,iCAAiB,EAAC,IAAI,CAAC,KAC1B,cAAc,EAAE,IAAI,CAAC,eAAe,EACpC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,EAC3C,MAAM,EAAE,qBAAqB,CAAC,IAAI,EAAE,QAAQ,CAAC,EAC7C,IAAI,EAAE,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,EACzC,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAC,GAAG,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,EACxG,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,kCAAU,EAAC,KAAmC,CAAC,CAAC,IACxF;AACJ,CAAC;AAZD,wDAYC"}
@@ -1,6 +0,0 @@
1
- import { DocumentableSource, RenderableContent } from '../templating/types';
2
- import { Describable, Documentable } from './types';
3
- export declare function adaptDescribable(describable: Describable): {
4
- description?: RenderableContent[];
5
- };
6
- export declare function adaptDocumentable(documentable: Documentable): DocumentableSource;
@@ -1,41 +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) {
7
- function describableToRenderableContent(describable) {
8
- if (!describable) {
9
- return;
10
- }
11
- return (describable
12
- .map((line) => [
13
- ...(0, references_1.replaceInlineReferences)(line),
14
- {
15
- type: 'empty-line',
16
- },
17
- ])
18
- .flatMap((line) => line)
19
- // If the last element is an empty line, remove it
20
- .filter((line, index, lines) => !((0, type_utils_1.isEmptyLine)(line) && index === lines.length - 1)));
21
- }
22
- return {
23
- description: describableToRenderableContent(describable),
24
- };
25
- }
26
- exports.adaptDescribable = adaptDescribable;
27
- function adaptDocumentable(documentable) {
28
- var _a, _b, _c;
29
- function extractCustomTags(type) {
30
- var _a, _b;
31
- const baseTags = ['description', 'group', 'author', 'date', 'see', 'example', 'mermaid', 'throws', 'exception'];
32
- 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)), { name: currentAnnotation.name })))) !== null && _b !== void 0 ? _b : []);
33
- }
34
- function extractAnnotationBodyLines(type, annotationName) {
35
- var _a, _b;
36
- 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;
37
- }
38
- return Object.assign(Object.assign({}, adaptDescribable((_a = documentable.docComment) === null || _a === void 0 ? void 0 : _a.descriptionLines)), { annotations: documentable.annotations.map((annotation) => annotation.type.toUpperCase()), customTags: extractCustomTags(documentable), mermaid: extractAnnotationBodyLines(documentable, 'mermaid'), example: (_c = (_b = documentable.docComment) === null || _b === void 0 ? void 0 : _b.exampleAnnotation) === null || _c === void 0 ? void 0 : _c.bodyLines });
39
- }
40
- exports.adaptDocumentable = adaptDocumentable;
41
- //# sourceMappingURL=documentables.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"documentables.js","sourceRoot":"","sources":["../../src/adapters/documentables.ts"],"names":[],"mappings":";;;AAEA,6CAAuD;AACvD,6CAA2C;AAE3C,SAAgB,gBAAgB,CAAC,WAAwB;IACvD,SAAS,8BAA8B,CAAC,WAAwB;QAC9D,IAAI,CAAC,WAAW,EAAE;YAChB,OAAO;SACR;QAED,OAAO,CACL,WAAW;aACR,GAAG,CAAsB,CAAC,IAAI,EAAE,EAAE,CAAC;YAClC,GAAG,IAAA,oCAAuB,EAAC,IAAI,CAAC;YAChC;gBACE,IAAI,EAAE,YAAY;aACnB;SACF,CAAC;aACD,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC;YACxB,kDAAkD;aACjD,MAAM,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,IAAA,wBAAW,EAAC,IAAI,CAAC,IAAI,KAAK,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CACtF,CAAC;IACJ,CAAC;IAED,OAAO;QACL,WAAW,EAAE,8BAA8B,CAAC,WAAW,CAAC;KACzD,CAAC;AACJ,CAAC;AAvBD,4CAuBC;AAED,SAAgB,iBAAiB,CAAC,YAA0B;;IAC1D,SAAS,iB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ldMirrorWithInheritance } from '../model/inheritance';
2
- import { FieldSource } from '../templating/types';
3
- export declare function adaptField(field: FieldMirrorWithInheritance): FieldSource;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.adaptField = void 0;
4
- const documentables_1 = require("./documentables");
5
- const references_1 = require("./references");
6
- function adaptField(field) {
7
- return Object.assign(Object.assign({}, (0, documentables_1.adaptDocumentable)(field)), { name: field.name, type: (0, references_1.linkFromTypeNameGenerator)(field.typeReference.rawDeclaration), inherited: field.inherited, accessModifier: field.access_modifier });
8
- }
9
- exports.adaptField = adaptField;
10
- //# sourceMappingURL=fields-and-properties.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fields-and-properties.js","sourceRoot":"","sources":["../../src/adapters/fields-and-properties.ts"],"names":[],"mappings":";;;AAEA,mDAAoD;AACpD,6CAAyD;AAEzD,SAAgB,UAAU,CAAC,KAAiC;IAC1D,uCACK,IAAA,iCAAiB,EAAC,KAAK,CAAC,KAC3B,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,IAAI,EAAE,IAAA,sCAAyB,EAAC,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,EACnE,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,cAAc,EAAE,KAAK,CAAC,eAAe,IACrC;AACJ,CAAC;AARD,gCAQC"}
@@ -1,4 +0,0 @@
1
- import { ConstructorMirror, MethodMirror } from '@cparra/apex-reflection';
2
- import { ConstructorSource, MethodSource } from '../templating/types';
3
- export declare function adaptMethod(method: MethodMirror): MethodSource;
4
- export declare function adaptConstructor(typeName: string, constructor: ConstructorMirror): ConstructorSource;
@@ -1,49 +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
- const references_1 = require("./references");
6
- function adaptMethod(method) {
7
- var _a, _b, _c;
8
- function buildTitle(method) {
9
- const { name, parameters } = method;
10
- const parametersString = parameters.map((param) => param.name).join(', ');
11
- return `${name}(${parametersString})`;
12
- }
13
- function buildSignature(method) {
14
- const { access_modifier, typeReference, name, memberModifiers } = method;
15
- const parameters = method.parameters
16
- .map((param) => `${param.typeReference.rawDeclaration} ${param.name}`)
17
- .join(', ');
18
- const members = memberModifiers.length > 0 ? `${memberModifiers.join(' ')} ` : '';
19
- return `${access_modifier} ${members}${typeReference.rawDeclaration} ${name}(${parameters})`;
20
- }
21
- return Object.assign(Object.assign({}, (0, documentables_1.adaptDocumentable)(method)), { title: buildTitle(method), signature: buildSignature(method), returnType: 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)), { type: (0, references_1.linkFromTypeNameGenerator)(method.typeReference.rawDeclaration) }), throws: (_c = method.docComment) === null || _c === void 0 ? void 0 : _c.throwsAnnotations.map((thrown) => mapThrows(thrown)), parameters: method.parameters.map((param) => mapParameters(method, param)), inherited: method.inherited });
22
- }
23
- exports.adaptMethod = adaptMethod;
24
- function adaptConstructor(typeName, constructor) {
25
- var _a;
26
- function buildTitle(name, constructor) {
27
- const { parameters } = constructor;
28
- const parametersString = parameters.map((param) => param.name).join(', ');
29
- return `${name}(${parametersString})`;
30
- }
31
- function buildSignature(name, constructor) {
32
- const { access_modifier } = constructor;
33
- const parameters = constructor.parameters
34
- .map((param) => `${param.typeReference.rawDeclaration} ${param.name}`)
35
- .join(', ');
36
- return `${access_modifier} ${name}(${parameters})`;
37
- }
38
- return Object.assign(Object.assign({}, (0, documentables_1.adaptDocumentable)(constructor)), { title: buildTitle(typeName, constructor), signature: buildSignature(typeName, constructor), parameters: constructor.parameters.map((param) => mapParameters(constructor, param)), throws: (_a = constructor.docComment) === null || _a === void 0 ? void 0 : _a.throwsAnnotations.map((thrown) => mapThrows(thrown)) });
39
- }
40
- exports.adaptConstructor = adaptConstructor;
41
- function mapParameters(documentable, param) {
42
- var _a;
43
- const paramAnnotation = (_a = documentable.docComment) === null || _a === void 0 ? void 0 : _a.paramAnnotations.find((pa) => pa.paramName.toLowerCase() === param.name.toLowerCase());
44
- return Object.assign(Object.assign({}, (0, documentables_1.adaptDescribable)(paramAnnotation === null || paramAnnotation === void 0 ? void 0 : paramAnnotation.bodyLines)), { name: param.name, type: (0, references_1.linkFromTypeNameGenerator)(param.typeReference.rawDeclaration) });
45
- }
46
- function mapThrows(thrown) {
47
- return Object.assign(Object.assign({}, (0, documentables_1.adaptDescribable)(thrown.bodyLines)), { type: (0, references_1.linkFromTypeNameGenerator)(thrown.exceptionName) });
48
- }
49
- //# sourceMappingURL=methods-and-constructors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"methods-and-constructors.js","sourceRoot":"","sources":["../../src/adapters/methods-and-constructors.ts"],"names":[],"mappings":";;;AAGA,mDAAsE;AACtE,6CAAyD;AAGzD,SAAgB,WAAW,CAAC,MAAoB;;IAC9C,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,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;QACzE,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU;aACjC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;aACrE,IAAI,CAAC,IAAI,CAAC,CAAC;QACd,MAAM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AC,aAAa,CAAC,cAAc,CAAC,IACnE;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,MAAwB;IACzC,uCACK,IAAA,gCAAgB,EAAC,MAAM,CAAC,SAAS,CAAC,KACrC,IAAI,EAAE,IAAA,sCAAyB,EAAC,MAAM,CAAC,aAAa,CAAC,IACrD;AACJ,CAAC"}
@@ -1,5 +0,0 @@
1
- import { RenderableContent, StringOrLink } from '../templating/types';
2
- export type GetRenderableContentByTypeName = (typeName: string) => StringOrLink;
3
- export declare const linkFromTypeNameGenerator: GetRenderableContentByTypeName;
4
- export declare function replaceInlineReferences(text: string, linkReplacer?: GetRenderableContentByTypeName, emailReplacer?: GetRenderableContentByTypeName): RenderableContent[];
5
- export declare function replaceInlineEmails(renderableContents: RenderableContent[], getLinkByTypeName: GetRenderableContentByTypeName): RenderableContent[];
@@ -1,82 +0,0 @@
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.replaceInlineEmails = exports.replaceInlineReferences = exports.linkFromTypeNameGenerator = void 0;
7
- const class_file_generatorHelper_1 = __importDefault(require("../transpiler/markdown/class-file-generatorHelper"));
8
- exports.linkFromTypeNameGenerator = class_file_generatorHelper_1.default.getRenderableLinkByTypeName;
9
- function defaultGetEmailByReference(email) {
10
- return {
11
- title: email,
12
- url: `mailto:${email}`,
13
- };
14
- }
15
- function replaceInlineReferences(text, linkReplacer = exports.linkFromTypeNameGenerator, emailReplacer = defaultGetEmailByReference) {
16
- return replaceInlineEmails(replaceInlineLinks([text], linkReplacer), emailReplacer);
17
- }
18
- exports.replaceInlineReferences = replaceInlineReferences;
19
- function replaceInlineLinks(renderableContents, getLinkByTypeName) {
20
- return renderableContents.flatMap((renderableContent) => inlineLinkContent(renderableContent, getLinkByTypeName));
21
- }
22
- function inlineLinkContent(renderableContent, getLinkByTypeName) {
23
- if (typeof renderableContent !== 'string') {
24
- return [renderableContent];
25
- }
26
- const text = renderableContent;
27
- // Matches either `<<ClassName>>` or `{@link ClassName}`
28
- const linkFormatRegEx = '{@link (.*?)}|<<([^>]+)>>';
29
- const matches = match(linkFormatRegEx, text);
30
- return createRenderableContents(matches, text, getLinkByTypeName);
31
- }
32
- function replaceInlineEmails(renderableContents, getLinkByTypeName) {
33
- return renderableContents.flatMap((renderableContent) => inlineEmailContent(renderableContent, getLinkByTypeName));
34
- }
35
- exports.replaceInlineEmails = replaceInlineEmails;
36
- function inlineEmailContent(renderableContent, getLinkByTypeName) {
37
- if (typeof renderableContent !== 'string') {
38
- return [renderableContent];
39
- }
40
- const text = renderableContent;
41
- // Parsing references using the format '{@email email}'
42
- const linkFormatRegEx = '{@email (.*?)}';
43
- const matches = match(linkFormatRegEx, text);
44
- return createRenderableContents(matches, text, getLinkByTypeName);
45
- }
46
- function match(regex, text) {
47
- const expression = new RegExp(regex, 'gi');
48
- let match;
49
- const matches = [];
50
- do {
51
- match = expression.exec(text);
52
- if (match) {
53
- matches.push(match);
54
- }
55
- } while (match);
56
- return matches;
57
- }
58
- function createRenderableContents(matches, text, linker) {
59
- if (matches.length === 0) {
60
- return [text];
61
- }
62
- const result = [];
63
- let lastIndex = 0;
64
- for (const match of matches) {
65
- const index = match.index;
66
- const length = match[0].length;
67
- // loop through the matches (skip the first one, which is the full match)
68
- // until we find the first capturing group that has a value
69
- const capturedGroup = match.slice(1).find((group) => group);
70
- if (!capturedGroup) {
71
- continue;
72
- }
73
- result.push(text.slice(lastIndex, index));
74
- result.push(linker(capturedGroup));
75
- lastIndex = index + length;
76
- }
77
- if (lastIndex < text.length) {
78
- result.push(text.slice(lastIndex));
79
- }
80
- return result;
81
- }
82
- //# sourceMappingURL=references.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"references.js","sourceRoot":"","sources":["../../src/adapters/references.ts"],"names":[],"mappings":";;;;;;AAAA,mHAAyF;AAK5E,QAAA,yBAAyB,GACpC,oCAAwB,CA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AAS;SACV;QACD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;QAC1C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;QAEnC,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;KAC5B;IAED,IAAI,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE;QAC3B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;KACpC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,2 +0,0 @@
1
- import { EmptyLine, RenderableContent } from '../templating/types';
2
- export declare function isEmptyLine(content: RenderableContent): content is EmptyLine;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- 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
- //# sourceMappingURL=type-utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"type-utils.js","sourceRoot":"","sources":["../../src/adapters/type-utils.ts"],"names":[],"mappings":";;;AAEA,SAAgB,WAAW,CAAC,OAA0B;IACpD,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAK,OAA4B,CAAC,IAAI,KAAK,YAAY,CAAC;AACtG,CAAC;AAFD,kCAEC"}
@@ -1,13 +0,0 @@
1
- import { ReflectionResult } from '@cparra/apex-reflection';
2
- import ApexBundle from '../model/apex-bundle';
3
- /**
4
- * Application entry-point to generate documentation out of Apex source files.
5
- */
6
- export declare class Apexdocs {
7
- /**
8
- * Generates documentation out of Apex source files.
9
- */
10
- static generate(): void;
11
- private static filterByScopes;
12
- static _reflectionWithLogger: (apexBundle: ApexBundle) => ReflectionResult;
13
- }