@cparra/apexdocs 2.24.0 → 2.25.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/.eslintrc.js +12 -12
  2. package/.github/workflows/ci.yaml +22 -0
  3. package/.github/workflows/close_stale.yml +22 -22
  4. package/.prettierrc.js +7 -7
  5. package/LICENSE +21 -21
  6. package/README.md +742 -718
  7. package/apexdocs.config.ts +13 -13
  8. package/docs/{README.md → __old/README.md} +1 -1
  9. package/docs/{restapi.json → __old/restapi.json} +589 -589
  10. package/docs/{types → __old/types}/Classes/nspc.ChildClass.md +97 -97
  11. package/docs/{types → __old/types}/Main/nspc.SampleClass.md +189 -189
  12. package/examples/force-app/main/default/classes/AnotherInterface.cls +16 -16
  13. package/examples/force-app/main/default/classes/ChildClass.cls +42 -42
  14. package/examples/force-app/main/default/classes/EscapedAnnotations.cls +5 -5
  15. package/examples/force-app/main/default/classes/GrandparentClass.cls +4 -4
  16. package/examples/force-app/main/default/classes/GroupedClass.cls +8 -8
  17. package/examples/force-app/main/default/classes/MemberGrouping.cls +17 -17
  18. package/examples/force-app/main/default/classes/ParentClass.cls +16 -16
  19. package/examples/force-app/main/default/classes/SampleClass.cls +166 -166
  20. package/examples/force-app/main/default/classes/SampleClass.cls-meta.xml +5 -5
  21. package/examples/force-app/main/default/classes/SampleClassWithoutModifier.cls +9 -9
  22. package/examples/force-app/main/default/classes/SampleInterface.cls +16 -16
  23. package/examples/force-app/main/default/restapi/SampleRestResource.cls +195 -195
  24. package/examples/force-app/main/default/restapi/SampleRestResourceToSkip.cls +35 -35
  25. package/examples/force-app/main/default/restapi/SampleRestResourceWithInnerClass.cls +24 -24
  26. package/examples/force-app/main/default/restapi/SampleRestResourceWithoutApexDocs.cls +15 -15
  27. package/examples/force-app/main/default/restapi/references/Reference1.cls +9 -9
  28. package/examples/force-app/main/default/restapi/references/Reference2.cls +9 -9
  29. package/examples/force-app/main/default/restapi/references/Reference3.cls +3 -3
  30. package/examples/force-app/main/default/restapi/references/Reference4.cls +3 -3
  31. package/examples/force-app/main/default/restapi/references/Reference5.cls +3 -3
  32. package/examples/force-app/main/default/restapi/references/Reference6.cls +6 -6
  33. package/examples/force-app/main/default/restapi/references/Reference7.cls +3 -3
  34. package/examples/includes/header.md +3 -3
  35. package/examples/plain-markdown/.forceignore +12 -0
  36. package/examples/plain-markdown/README.md +301 -0
  37. package/examples/plain-markdown/config/project-scratch-def.json +5 -0
  38. package/examples/plain-markdown/force-app/classes/BaseClass.cls +3 -0
  39. package/examples/plain-markdown/force-app/classes/ParentInterface.cls +3 -0
  40. package/examples/plain-markdown/force-app/classes/ReferencedEnum.cls +3 -0
  41. package/examples/plain-markdown/force-app/classes/SampleClass.cls +35 -0
  42. package/examples/plain-markdown/force-app/classes/SampleEnum.cls +30 -0
  43. package/examples/plain-markdown/force-app/classes/SampleException.cls +1 -0
  44. package/examples/plain-markdown/force-app/classes/SampleInterface.cls +46 -0
  45. package/examples/plain-markdown/package-lock.json +665 -0
  46. package/examples/plain-markdown/package.json +24 -0
  47. package/examples/plain-markdown/sfdx-project.json +12 -0
  48. package/examples/plain-markdown/template.md +3 -0
  49. package/jest.config.js +5 -5
  50. package/lib/adapters/apex-types.d.ts +5 -0
  51. package/lib/adapters/apex-types.js +34 -0
  52. package/lib/adapters/apex-types.js.map +1 -0
  53. package/lib/adapters/documentables.d.ts +6 -0
  54. package/lib/adapters/documentables.js +41 -0
  55. package/lib/adapters/documentables.js.map +1 -0
  56. package/lib/adapters/fields-and-properties.d.ts +3 -0
  57. package/lib/adapters/fields-and-properties.js +10 -0
  58. package/lib/adapters/fields-and-properties.js.map +1 -0
  59. package/lib/adapters/methods-and-constructors.d.ts +4 -0
  60. package/lib/adapters/methods-and-constructors.js +49 -0
  61. package/lib/adapters/methods-and-constructors.js.map +1 -0
  62. package/lib/adapters/references.d.ts +5 -0
  63. package/lib/adapters/references.js +82 -0
  64. package/lib/adapters/references.js.map +1 -0
  65. package/lib/adapters/type-utils.d.ts +2 -0
  66. package/lib/adapters/type-utils.js +8 -0
  67. package/lib/adapters/type-utils.js.map +1 -0
  68. package/lib/application/Apexdocs.d.ts +13 -13
  69. package/lib/application/Apexdocs.js +79 -76
  70. package/lib/application/Apexdocs.js.map +1 -1
  71. package/lib/cli/generate.d.ts +2 -2
  72. package/lib/cli/generate.js +156 -130
  73. package/lib/cli/generate.js.map +1 -1
  74. package/lib/index.d.ts +1 -1
  75. package/lib/index.js +17 -17
  76. package/lib/model/apex-bundle.d.ts +6 -6
  77. package/lib/model/apex-bundle.js +10 -10
  78. package/lib/model/apex-type-wrappers/ClassMirrorWrapper.d.ts +7 -7
  79. package/lib/model/apex-type-wrappers/ClassMirrorWrapper.js +13 -13
  80. package/lib/model/apex-type-wrappers/MethodMirrorWrapper.d.ts +7 -7
  81. package/lib/model/apex-type-wrappers/MethodMirrorWrapper.js +11 -11
  82. package/lib/model/inheritance.d.ts +8 -8
  83. package/lib/model/inheritance.js +2 -2
  84. package/lib/model/manifest.d.ts +22 -22
  85. package/lib/model/manifest.js +46 -46
  86. package/lib/model/manifest.js.map +1 -1
  87. package/lib/model/markdown-file.d.ts +16 -16
  88. package/lib/model/markdown-file.js +109 -106
  89. package/lib/model/markdown-file.js.map +1 -1
  90. package/lib/model/markdown-generation-util/doc-comment-annotation-util.d.ts +8 -8
  91. package/lib/model/markdown-generation-util/doc-comment-annotation-util.js +46 -43
  92. package/lib/model/markdown-generation-util/doc-comment-annotation-util.js.map +1 -1
  93. package/lib/model/markdown-generation-util/field-declaration-util.d.ts +3 -3
  94. package/lib/model/markdown-generation-util/field-declaration-util.js +54 -54
  95. package/lib/model/markdown-generation-util/index.d.ts +3 -3
  96. package/lib/model/markdown-generation-util/index.js +19 -19
  97. package/lib/model/markdown-generation-util/method-declaration-util.d.ts +4 -4
  98. package/lib/model/markdown-generation-util/method-declaration-util.js +114 -114
  99. package/lib/model/markdown-generation-util/type-declaration-util.d.ts +3 -3
  100. package/lib/model/markdown-generation-util/type-declaration-util.js +81 -81
  101. package/lib/model/markdown-home-file.d.ts +11 -11
  102. package/lib/model/markdown-home-file.js +56 -53
  103. package/lib/model/markdown-home-file.js.map +1 -1
  104. package/lib/model/markdown-type-file.d.ts +26 -26
  105. package/lib/model/markdown-type-file.js +136 -133
  106. package/lib/model/markdown-type-file.js.map +1 -1
  107. package/lib/model/openapi/apex-doc-types.d.ts +19 -19
  108. package/lib/model/openapi/apex-doc-types.js +4 -4
  109. package/lib/model/openapi/open-api-types.d.ts +93 -93
  110. package/lib/model/openapi/open-api-types.js +2 -2
  111. package/lib/model/openapi/open-api.d.ts +16 -16
  112. package/lib/model/openapi/open-api.js +33 -33
  113. package/lib/model/openapi/openapi-type-file.d.ts +7 -7
  114. package/lib/model/openapi/openapi-type-file.js +16 -16
  115. package/lib/model/outputFile.d.ts +10 -10
  116. package/lib/model/outputFile.js +28 -28
  117. package/lib/model/types-repository.d.ts +16 -16
  118. package/lib/model/types-repository.js +53 -53
  119. package/lib/service/apex-file-reader.d.ts +14 -14
  120. package/lib/service/apex-file-reader.js +48 -45
  121. package/lib/service/apex-file-reader.js.map +1 -1
  122. package/lib/service/file-system.d.ts +14 -14
  123. package/lib/service/file-system.js +47 -24
  124. package/lib/service/file-system.js.map +1 -1
  125. package/lib/service/file-writer.d.ts +6 -6
  126. package/lib/service/file-writer.js +56 -33
  127. package/lib/service/file-writer.js.map +1 -1
  128. package/lib/service/manifest-factory.d.ts +10 -10
  129. package/lib/service/manifest-factory.js +16 -13
  130. package/lib/service/manifest-factory.js.map +1 -1
  131. package/lib/service/metadata-processor.d.ts +3 -3
  132. package/lib/service/metadata-processor.js +16 -16
  133. package/lib/service/parser.d.ts +21 -21
  134. package/lib/service/parser.js +137 -134
  135. package/lib/service/parser.js.map +1 -1
  136. package/lib/service/state.d.ts +9 -9
  137. package/lib/service/state.js +19 -19
  138. package/lib/service/walkers/class-walker.d.ts +4 -4
  139. package/lib/service/walkers/class-walker.js +32 -32
  140. package/lib/service/walkers/enum-walker.d.ts +4 -4
  141. package/lib/service/walkers/enum-walker.js +10 -10
  142. package/lib/service/walkers/interface-walker.d.ts +4 -4
  143. package/lib/service/walkers/interface-walker.js +14 -14
  144. package/lib/service/walkers/walker-factory.d.ts +5 -5
  145. package/lib/service/walkers/walker-factory.js +20 -20
  146. package/lib/service/walkers/walker.d.ts +19 -19
  147. package/lib/service/walkers/walker.js +16 -16
  148. package/lib/settings.d.ts +70 -64
  149. package/lib/settings.js +99 -88
  150. package/lib/settings.js.map +1 -1
  151. package/lib/templating/compile.d.ts +7 -0
  152. package/lib/templating/compile.js +98 -0
  153. package/lib/templating/compile.js.map +1 -0
  154. package/lib/templating/helpers.d.ts +2 -0
  155. package/lib/templating/helpers.js +18 -0
  156. package/lib/templating/helpers.js.map +1 -0
  157. package/lib/test-helpers/AnnotationBuilder.d.ts +12 -12
  158. package/lib/test-helpers/AnnotationBuilder.js +30 -30
  159. package/lib/test-helpers/ClassMirrorBuilder.d.ts +18 -18
  160. package/lib/test-helpers/ClassMirrorBuilder.js +53 -53
  161. package/lib/test-helpers/DocCommentAnnotationBuilder.d.ts +8 -8
  162. package/lib/test-helpers/DocCommentAnnotationBuilder.js +25 -25
  163. package/lib/test-helpers/DocCommentBuilder.d.ts +12 -12
  164. package/lib/test-helpers/DocCommentBuilder.js +37 -37
  165. package/lib/test-helpers/FieldMirrorBuilder.d.ts +18 -18
  166. package/lib/test-helpers/FieldMirrorBuilder.js +53 -53
  167. package/lib/test-helpers/InterfaceMirrorBuilder.d.ts +16 -0
  168. package/lib/test-helpers/InterfaceMirrorBuilder.js +43 -0
  169. package/lib/test-helpers/InterfaceMirrorBuilder.js.map +1 -0
  170. package/lib/test-helpers/MethodMirrorBuilder.d.ts +29 -10
  171. package/lib/test-helpers/MethodMirrorBuilder.js +71 -36
  172. package/lib/test-helpers/MethodMirrorBuilder.js.map +1 -1
  173. package/lib/test-helpers/SettingsBuilder.d.ts +8 -8
  174. package/lib/test-helpers/SettingsBuilder.js +26 -26
  175. package/lib/transpiler/factory.d.ts +6 -6
  176. package/lib/transpiler/factory.js +34 -31
  177. package/lib/transpiler/factory.js.map +1 -1
  178. package/lib/transpiler/file-container.d.ts +6 -6
  179. package/lib/transpiler/file-container.js +15 -15
  180. package/lib/transpiler/generator-choices.d.ts +1 -1
  181. package/lib/transpiler/generator-choices.js +2 -2
  182. package/lib/transpiler/markdown/class-file-generatorHelper.d.ts +11 -8
  183. package/lib/transpiler/markdown/class-file-generatorHelper.js +74 -55
  184. package/lib/transpiler/markdown/class-file-generatorHelper.js.map +1 -1
  185. package/lib/transpiler/markdown/docsify/docsify-docs-processor.d.ts +6 -6
  186. package/lib/transpiler/markdown/docsify/docsify-docs-processor.js +12 -12
  187. package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.d.ts +11 -11
  188. package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js +50 -50
  189. package/lib/transpiler/markdown/markdown-transpiler-base.d.ts +11 -11
  190. package/lib/transpiler/markdown/markdown-transpiler-base.js +26 -23
  191. package/lib/transpiler/markdown/markdown-transpiler-base.js.map +1 -1
  192. package/lib/transpiler/markdown/plain-markdown/class-template.d.ts +1 -0
  193. package/lib/transpiler/markdown/plain-markdown/class-template.js +36 -0
  194. package/lib/transpiler/markdown/plain-markdown/class-template.js.map +1 -0
  195. package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.d.ts +1 -0
  196. package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.js +39 -0
  197. package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.js.map +1 -0
  198. package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.d.ts +1 -0
  199. package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.js +25 -0
  200. package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.js.map +1 -0
  201. package/lib/transpiler/markdown/plain-markdown/enum-template.d.ts +1 -0
  202. package/lib/transpiler/markdown/plain-markdown/enum-template.js +15 -0
  203. package/lib/transpiler/markdown/plain-markdown/enum-template.js.map +1 -0
  204. package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.d.ts +1 -0
  205. package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js +24 -0
  206. package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js.map +1 -0
  207. package/lib/transpiler/markdown/plain-markdown/interface-template.d.ts +1 -0
  208. package/lib/transpiler/markdown/plain-markdown/interface-template.js +20 -0
  209. package/lib/transpiler/markdown/plain-markdown/interface-template.js.map +1 -0
  210. package/lib/transpiler/markdown/plain-markdown/methods-partial-template.d.ts +1 -0
  211. package/lib/transpiler/markdown/plain-markdown/methods-partial-template.js +49 -0
  212. package/lib/transpiler/markdown/plain-markdown/methods-partial-template.js.map +1 -0
  213. package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.d.ts +13 -6
  214. package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js +121 -13
  215. package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js.map +1 -1
  216. package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.d.ts +1 -0
  217. package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.js +31 -0
  218. package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.js.map +1 -0
  219. package/lib/transpiler/openapi/open-api-docs-processor.d.ts +13 -13
  220. package/lib/transpiler/openapi/open-api-docs-processor.js +77 -74
  221. package/lib/transpiler/openapi/open-api-docs-processor.js.map +1 -1
  222. package/lib/transpiler/openapi/parsers/Builder.d.ts +16 -16
  223. package/lib/transpiler/openapi/parsers/Builder.js +29 -29
  224. package/lib/transpiler/openapi/parsers/Builder.js.map +1 -1
  225. package/lib/transpiler/openapi/parsers/MethodParser.d.ts +20 -20
  226. package/lib/transpiler/openapi/parsers/MethodParser.js +189 -166
  227. package/lib/transpiler/openapi/parsers/MethodParser.js.map +1 -1
  228. package/lib/transpiler/openapi/parsers/ParameterObjectBuilder.d.ts +7 -7
  229. package/lib/transpiler/openapi/parsers/ParameterObjectBuilder.js +10 -10
  230. package/lib/transpiler/openapi/parsers/ReferenceBuilder.d.ts +39 -39
  231. package/lib/transpiler/openapi/parsers/ReferenceBuilder.js +248 -225
  232. package/lib/transpiler/openapi/parsers/ReferenceBuilder.js.map +1 -1
  233. package/lib/transpiler/openapi/parsers/RequestBodyBuilder.d.ts +10 -10
  234. package/lib/transpiler/openapi/parsers/RequestBodyBuilder.js +19 -19
  235. package/lib/transpiler/openapi/parsers/ResponsesBuilder.d.ts +7 -7
  236. package/lib/transpiler/openapi/parsers/ResponsesBuilder.js +21 -21
  237. package/lib/transpiler/processor-type-transpiler.d.ts +10 -10
  238. package/lib/transpiler/processor-type-transpiler.js +8 -8
  239. package/lib/transpiler/transpiler.d.ts +5 -5
  240. package/lib/transpiler/transpiler.js +29 -26
  241. package/lib/transpiler/transpiler.js.map +1 -1
  242. package/lib/util/error-logger.d.ts +8 -8
  243. package/lib/util/error-logger.js +89 -89
  244. package/lib/util/error-logger.js.map +1 -1
  245. package/lib/util/logger.d.ts +21 -21
  246. package/lib/util/logger.js +60 -57
  247. package/lib/util/logger.js.map +1 -1
  248. package/lib/util/string-utils.d.ts +2 -2
  249. package/lib/util/string-utils.js +14 -14
  250. package/package.json +79 -78
  251. package/src/adapters/__tests__/interface-adapter.spec.ts +76 -0
  252. package/src/adapters/__tests__/references.spec.ts +115 -0
  253. package/src/adapters/apex-types.ts +67 -0
  254. package/src/adapters/documentables.ts +58 -0
  255. package/src/adapters/fields-and-properties.ts +14 -0
  256. package/src/adapters/methods-and-constructors.ts +78 -0
  257. package/src/adapters/references.ts +113 -0
  258. package/src/adapters/type-utils.ts +5 -0
  259. package/src/adapters/types.d.ts +8 -0
  260. package/src/cli/generate.ts +3 -0
  261. package/src/model/__tests__/manifest.spec.ts +1 -0
  262. package/src/model/manifest.ts +3 -3
  263. package/src/model/markdown-file.ts +1 -1
  264. package/src/model/openapi/open-api-types.ts +2 -2
  265. package/src/service/__tests__/apex-file-reader.spec.ts +4 -4
  266. package/src/service/__tests__/manifest-factory.spec.ts +1 -2
  267. package/src/settings.ts +15 -0
  268. package/src/templating/__tests__/compile.spec.ts +741 -0
  269. package/src/templating/compile.ts +187 -0
  270. package/src/templating/helpers.ts +14 -0
  271. package/src/templating/types.d.ts +104 -0
  272. package/src/test-helpers/FieldMirrorBuilder.ts +1 -1
  273. package/src/test-helpers/InterfaceMirrorBuilder.ts +44 -0
  274. package/src/test-helpers/MethodMirrorBuilder.ts +46 -6
  275. package/src/transpiler/markdown/class-file-generatorHelper.ts +22 -2
  276. package/src/transpiler/markdown/plain-markdown/class-template.ts +32 -0
  277. package/src/transpiler/markdown/plain-markdown/constructors-partial-template.ts +35 -0
  278. package/src/transpiler/markdown/plain-markdown/documentable-partial-template.ts +21 -0
  279. package/src/transpiler/markdown/plain-markdown/enum-template.ts +11 -0
  280. package/src/transpiler/markdown/plain-markdown/fieldsPartialTemplate.ts +20 -0
  281. package/src/transpiler/markdown/plain-markdown/interface-template.ts +16 -0
  282. package/src/transpiler/markdown/plain-markdown/methods-partial-template.ts +45 -0
  283. package/src/transpiler/markdown/plain-markdown/plain-docsProcessor.ts +122 -0
  284. package/src/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.ts +27 -0
  285. package/src/transpiler/openapi/parsers/Builder.ts +1 -1
  286. package/src/transpiler/openapi/parsers/MethodParser.ts +1 -1
  287. package/src/transpiler/openapi/parsers/ReferenceBuilder.ts +1 -1
  288. package/src/util/error-logger.ts +4 -4
  289. package/src/util/logger.ts +3 -3
  290. package/tsconfig.json +21 -20
  291. package/tslint.json +5 -5
  292. package/lib/model/manifest-diff.d.ts +0 -27
  293. package/lib/model/manifest-diff.js +0 -69
  294. package/lib/model/manifest-diff.js.map +0 -1
  295. package/src/model/__tests__/manifest-diff.spec.ts +0 -139
  296. package/src/model/manifest-diff.ts +0 -94
  297. /package/docs/{index.html → __old/index.html} +0 -0
  298. /package/docs/{types → __old/types}/Classes/nspc.AnotherInterface.md +0 -0
  299. /package/docs/{types → __old/types}/Main/nspc.GroupedClass.md +0 -0
  300. /package/docs/{types → __old/types}/Misc-Group/nspc.EscapedAnnotations.md +0 -0
  301. /package/docs/{types → __old/types}/Misc-Group/nspc.GrandparentClass.md +0 -0
  302. /package/docs/{types → __old/types}/Misc-Group/nspc.InterfaceWithInheritance.md +0 -0
  303. /package/docs/{types → __old/types}/Misc-Group/nspc.MemberGrouping.md +0 -0
  304. /package/docs/{types → __old/types}/Misc-Group/nspc.ParentClass.md +0 -0
  305. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference1.md +0 -0
  306. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference2.md +0 -0
  307. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference3.md +0 -0
  308. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference4.md +0 -0
  309. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference5.md +0 -0
  310. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference6.md +0 -0
  311. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference7.md +0 -0
  312. /package/docs/{types → __old/types}/Misc-Group/nspc.SampleClassWithoutModifier.md +0 -0
  313. /package/docs/{types → __old/types}/Misc-Group/nspc.SampleRestResource.md +0 -0
  314. /package/docs/{types → __old/types}/Misc-Group/nspc.SampleRestResourceWithInnerClass.md +0 -0
  315. /package/docs/{types → __old/types}/Misc-Group/nspc.SampleRestResourceWithoutApexDocs.md +0 -0
  316. /package/docs/{types → __old/types}/README.md +0 -0
  317. /package/docs/{types → __old/types}/Sample-Interfaces/nspc.SampleInterface.md +0 -0
@@ -1,34 +1,57 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FileWriter = void 0;
4
- const fs = require("fs");
5
- const path = require("path");
6
- const settings_1 = require("../settings");
7
- class FileWriter {
8
- static write(files, onWriteCallback) {
9
- const onBeforeFileWrite = (file) => settings_1.Settings.getInstance().onBeforeFileWrite(file);
10
- files.forEach((file) => {
11
- const resolvedFile = this.getTargetLocation(file, onBeforeFileWrite);
12
- const fullDir = path.join(resolvedFile.dir.baseDir, resolvedFile.dir.fileDir);
13
- if (!fs.existsSync(fullDir)) {
14
- fs.mkdirSync(fullDir, { recursive: true });
15
- }
16
- const filePath = path.join(fullDir, `${resolvedFile.name}${resolvedFile.extension}`);
17
- fs.writeFileSync(filePath, file.body, 'utf8');
18
- onWriteCallback(resolvedFile);
19
- });
20
- }
21
- static getTargetLocation(file, onBeforeFileWrite) {
22
- const targetFile = {
23
- name: file.fileName,
24
- extension: file.fileExtension(),
25
- dir: {
26
- baseDir: settings_1.Settings.getInstance().outputDir,
27
- fileDir: file.dir,
28
- },
29
- };
30
- return onBeforeFileWrite(targetFile);
31
- }
32
- }
33
- exports.FileWriter = FileWriter;
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.FileWriter = void 0;
27
+ const fs = __importStar(require("fs"));
28
+ const path = __importStar(require("path"));
29
+ const settings_1 = require("../settings");
30
+ class FileWriter {
31
+ static write(files, onWriteCallback) {
32
+ const onBeforeFileWrite = (file) => settings_1.Settings.getInstance().onBeforeFileWrite(file);
33
+ files.forEach((file) => {
34
+ const resolvedFile = this.getTargetLocation(file, onBeforeFileWrite);
35
+ const fullDir = path.join(resolvedFile.dir.baseDir, resolvedFile.dir.fileDir);
36
+ if (!fs.existsSync(fullDir)) {
37
+ fs.mkdirSync(fullDir, { recursive: true });
38
+ }
39
+ const filePath = path.join(fullDir, `${resolvedFile.name}${resolvedFile.extension}`);
40
+ fs.writeFileSync(filePath, file.body, 'utf8');
41
+ onWriteCallback(resolvedFile);
42
+ });
43
+ }
44
+ static getTargetLocation(file, onBeforeFileWrite) {
45
+ const targetFile = {
46
+ name: file.fileName,
47
+ extension: file.fileExtension(),
48
+ dir: {
49
+ baseDir: settings_1.Settings.getInstance().outputDir,
50
+ fileDir: file.dir,
51
+ },
52
+ };
53
+ return onBeforeFileWrite(targetFile);
54
+ }
55
+ }
56
+ exports.FileWriter = FileWriter;
34
57
  //# sourceMappingURL=file-writer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-writer.js","sourceRoot":"","sources":["../../src/service/file-writer.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,6BAA6B;AAE7B,0CAAsE;AAEtE,MAAa,UAAU;IACrB,MAAM,CAAC,KAAK,CAAC,KAAmB,EAAE,eAA2C;QAC3E,MAAM,iBAAiB,GAAsB,CAAC,IAAgB,EAAE,EAAE,CAAC,mBAAQ,CAAC,WAAW,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAClH,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACrB,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;YACrE,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,C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CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACrB,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;YACrE,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAC9E,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;gBAC3B,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;aAC5C;YAED,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,YAAY,CAAC,IAAI,GAAG,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC;YACrF,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAC9C,eAAe,CAAC,YAAY,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,MAAM,CAAC,iBAAiB,CAAC,IAAgB,EAAE,iBAAoC;QACrF,MAAM,UAAU,GAAe;YAC7B,IAAI,EAAE,IAAI,CAAC,QAAQ;YACnB,SAAS,EAAE,IAAI,CAAC,aAAa,EAAE;YAC/B,GAAG,EAAE;gBACH,OAAO,EAAE,mBAAQ,CAAC,WAAW,EAAE,CAAC,SAAS;gBACzC,OAAO,EAAE,IAAI,CAAC,GAAG;aAClB;SACF,CAAC;QAEF,OAAO,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;CACF;AA5BD,gCA4BC"}
@@ -1,10 +1,10 @@
1
- import Manifest from '../model/manifest';
2
- import { TypeParser } from './parser';
3
- import { ReflectionResult } from '@cparra/apex-reflection';
4
- import ApexBundle from '../model/apex-bundle';
5
- /**
6
- * Builds a new Manifest object, sourcing its types from the received TypeParser.
7
- * @param typeParser In charge of returning the list of reflected types.
8
- * @param reflect Reflection function.
9
- */
10
- export declare function createManifest(typeParser: TypeParser, reflect: (apexBundle: ApexBundle) => ReflectionResult): Manifest;
1
+ import Manifest from '../model/manifest';
2
+ import { TypeParser } from './parser';
3
+ import { ReflectionResult } from '@cparra/apex-reflection';
4
+ import ApexBundle from '../model/apex-bundle';
5
+ /**
6
+ * Builds a new Manifest object, sourcing its types from the received TypeParser.
7
+ * @param typeParser In charge of returning the list of reflected types.
8
+ * @param reflect Reflection function.
9
+ */
10
+ export declare function createManifest(typeParser: TypeParser, reflect: (apexBundle: ApexBundle) => ReflectionResult): Manifest;
@@ -1,14 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createManifest = void 0;
4
- const manifest_1 = require("../model/manifest");
5
- /**
6
- * Builds a new Manifest object, sourcing its types from the received TypeParser.
7
- * @param typeParser In charge of returning the list of reflected types.
8
- * @param reflect Reflection function.
9
- */
10
- function createManifest(typeParser, reflect) {
11
- return new manifest_1.default(typeParser.parse(reflect));
12
- }
13
- exports.createManifest = createManifest;
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.createManifest = void 0;
7
+ const manifest_1 = __importDefault(require("../model/manifest"));
8
+ /**
9
+ * Builds a new Manifest object, sourcing its types from the received TypeParser.
10
+ * @param typeParser In charge of returning the list of reflected types.
11
+ * @param reflect Reflection function.
12
+ */
13
+ function createManifest(typeParser, reflect) {
14
+ return new manifest_1.default(typeParser.parse(reflect));
15
+ }
16
+ exports.createManifest = createManifest;
14
17
  //# sourceMappingURL=manifest-factory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"manifest-factory.js","sourceRoot":"","sources":["../../src/service/manifest-factory.ts"],"names":[],"mappings":";;;AAAA,gDAAyC;AAKzC;;;;GAIG;AACH,SAAgB,cAAc,CAC5B,UAAsB,EACtB,OAAqD;IAErD,OAAO,IAAI,kBAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AACjD,CAAC;AALD,wCAKC"}
1
+ {"version":3,"file":"manifest-factory.js","sourceRoot":"","sources":["../../src/service/manifest-factory.ts"],"names":[],"mappings":";;;;;;AAAA,iEAAyC;AAKzC;;;;GAIG;AACH,SAAgB,cAAc,CAC5B,UAAsB,EACtB,OAAqD;IAErD,OAAO,IAAI,kBAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AACjD,CAAC;AALD,wCAKC"}
@@ -1,3 +1,3 @@
1
- export default class MetadataProcessor {
2
- static process(input: string): Map<string, string>;
3
- }
1
+ export default class MetadataProcessor {
2
+ static process(input: string): Map<string, string>;
3
+ }
@@ -1,17 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const fast_xml_parser_1 = require("fast-xml-parser");
4
- class MetadataProcessor {
5
- static process(input) {
6
- var _a;
7
- const map = new Map();
8
- const xml = new fast_xml_parser_1.XMLParser().parse(input);
9
- map.set('apiVersion', (_a = xml.ApexClass.apiVersion) !== null && _a !== void 0 ? _a : '');
10
- if (xml.ApexClass.status) {
11
- map.set('status', xml.ApexClass.status);
12
- }
13
- return map;
14
- }
15
- }
16
- exports.default = MetadataProcessor;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const fast_xml_parser_1 = require("fast-xml-parser");
4
+ class MetadataProcessor {
5
+ static process(input) {
6
+ var _a;
7
+ const map = new Map();
8
+ const xml = new fast_xml_parser_1.XMLParser().parse(input);
9
+ map.set('apiVersion', (_a = xml.ApexClass.apiVersion) !== null && _a !== void 0 ? _a : '');
10
+ if (xml.ApexClass.status) {
11
+ map.set('status', xml.ApexClass.status);
12
+ }
13
+ return map;
14
+ }
15
+ }
16
+ exports.default = MetadataProcessor;
17
17
  //# sourceMappingURL=metadata-processor.js.map
@@ -1,21 +1,21 @@
1
- import { ClassMirror, InterfaceMirror, ReflectionResult, Type } from '@cparra/apex-reflection';
2
- import ApexBundle from '../model/apex-bundle';
3
- export interface TypeParser {
4
- parse(reflect: (apexBundle: ApexBundle) => ReflectionResult): Type[];
5
- }
6
- type NameAware = {
7
- name: string;
8
- };
9
- export declare class RawBodyParser implements TypeParser {
10
- typeBundles: ApexBundle[];
11
- constructor(typeBundles: ApexBundle[]);
12
- parse(reflect: (apexBundle: ApexBundle) => ReflectionResult): Type[];
13
- addFieldsFromParent(types: Type[]): Type[];
14
- addMembersFromParent(currentClass: ClassMirror, allTypes: Type[]): ClassMirror;
15
- addMethodsFromParent(currentInterface: InterfaceMirror, allTypes: Type[]): InterfaceMirror;
16
- private getInheritedFields;
17
- private getInheritedProperties;
18
- private getInheritedMethods;
19
- memberExists(members: NameAware[], fieldName: string): boolean;
20
- }
21
- export {};
1
+ import { ClassMirror, InterfaceMirror, ReflectionResult, Type } from '@cparra/apex-reflection';
2
+ import ApexBundle from '../model/apex-bundle';
3
+ export interface TypeParser {
4
+ parse(reflect: (apexBundle: ApexBundle) => ReflectionResult): Type[];
5
+ }
6
+ type NameAware = {
7
+ name: string;
8
+ };
9
+ export declare class RawBodyParser implements TypeParser {
10
+ typeBundles: ApexBundle[];
11
+ constructor(typeBundles: ApexBundle[]);
12
+ parse(reflect: (apexBundle: ApexBundle) => ReflectionResult): Type[];
13
+ addFieldsFromParent(types: Type[]): Type[];
14
+ addMembersFromParent(currentClass: ClassMirror, allTypes: Type[]): ClassMirror;
15
+ addMethodsFromParent(currentInterface: InterfaceMirror, allTypes: Type[]): InterfaceMirror;
16
+ private getInheritedFields;
17
+ private getInheritedProperties;
18
+ private getInheritedMethods;
19
+ memberExists(members: NameAware[], fieldName: string): boolean;
20
+ }
21
+ export {};
@@ -1,135 +1,138 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RawBodyParser = void 0;
4
- const metadata_processor_1 = require("./metadata-processor");
5
- const logger_1 = require("../util/logger");
6
- class RawBodyParser {
7
- constructor(typeBundles) {
8
- this.typeBundles = typeBundles;
9
- }
10
- parse(reflect) {
11
- const types = this.typeBundles
12
- .map((currentBundle) => {
13
- logger_1.Logger.log(`Parsing file: ${currentBundle.filePath}`);
14
- const result = reflect(currentBundle);
15
- if (!!result.typeMirror && !!currentBundle.rawMetadataContent) {
16
- // If successful and there is a metadata file
17
- const metadataParams = metadata_processor_1.default.process(currentBundle.rawMetadataContent);
18
- metadataParams.forEach((value, key) => {
19
- var _a;
20
- const declaration = `${key}: ${value}`;
21
- (_a = result.typeMirror) === null || _a === void 0 ? void 0 : _a.annotations.push({
22
- rawDeclaration: declaration,
23
- name: declaration,
24
- type: declaration,
25
- });
26
- });
27
- }
28
- return result;
29
- })
30
- .filter((reflectionResult) => {
31
- return reflectionResult.typeMirror;
32
- })
33
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
34
- .map((reflectionResult) => reflectionResult.typeMirror);
35
- return this.addFieldsFromParent(types);
36
- }
37
- addFieldsFromParent(types) {
38
- const typesWithFields = [];
39
- for (const currentType of types) {
40
- if (currentType.type_name !== 'class' && currentType.type_name !== 'interface') {
41
- typesWithFields.push(currentType);
42
- continue;
43
- }
44
- if (currentType.type_name === 'class') {
45
- let typeAsClass = currentType;
46
- if (!typeAsClass.extended_class) {
47
- typesWithFields.push(currentType);
48
- continue;
49
- }
50
- typeAsClass = this.addMembersFromParent(typeAsClass, types);
51
- typesWithFields.push(typeAsClass);
52
- continue;
53
- }
54
- // If reaching here then we are dealing with an interface
55
- let typeAsInterface = currentType;
56
- if (!typeAsInterface.extended_interfaces.length) {
57
- typesWithFields.push(currentType);
58
- continue;
59
- }
60
- typeAsInterface = this.addMethodsFromParent(typeAsInterface, types);
61
- typesWithFields.push(typeAsInterface);
62
- }
63
- return typesWithFields;
64
- }
65
- addMembersFromParent(currentClass, allTypes) {
66
- if (!currentClass.extended_class) {
67
- return currentClass;
68
- }
69
- const parent = allTypes.find((currentType) => currentType.name === currentClass.extended_class);
70
- if (!parent || parent.type_name !== 'class') {
71
- return currentClass;
72
- }
73
- let parentAsClass = parent;
74
- if (parentAsClass.extended_class) {
75
- parentAsClass = this.addMembersFromParent(parentAsClass, allTypes);
76
- }
77
- currentClass.fields = [...currentClass.fields, ...this.getInheritedFields(parentAsClass, currentClass)];
78
- currentClass.properties = [...currentClass.properties, ...this.getInheritedProperties(parentAsClass, currentClass)];
79
- currentClass.methods = [...currentClass.methods, ...this.getInheritedMethods(parentAsClass, currentClass)];
80
- return currentClass;
81
- }
82
- addMethodsFromParent(currentInterface, allTypes) {
83
- if (!currentInterface.extended_interfaces.length) {
84
- return currentInterface;
85
- }
86
- const parents = [];
87
- for (const currentInterfaceName of currentInterface.extended_interfaces) {
88
- const parent = allTypes.find((currentType) => currentType.name === currentInterfaceName);
89
- if (parent) {
90
- parents.push(parent);
91
- }
92
- }
93
- for (const parent of parents) {
94
- let parentAsInterface = parent;
95
- if (parentAsInterface.extended_interfaces.length) {
96
- parentAsInterface = this.addMethodsFromParent(parentAsInterface, allTypes);
97
- }
98
- currentInterface.methods = [
99
- ...currentInterface.methods,
100
- ...this.getInheritedMethods(parentAsInterface, currentInterface),
101
- ];
102
- }
103
- return currentInterface;
104
- }
105
- getInheritedFields(parentAsClass, currentClass) {
106
- return (parentAsClass.fields
107
- // Filter out private fields
108
- .filter((currentField) => currentField.access_modifier.toLowerCase() !== 'private')
109
- // Filter out fields that also exist on the child
110
- .filter((currentField) => !this.memberExists(currentClass.fields, currentField.name))
111
- .map((currentField) => (Object.assign(Object.assign({}, currentField), { inherited: true }))));
112
- }
113
- getInheritedProperties(parentAsClass, currentClass) {
114
- return (parentAsClass.properties
115
- // Filter out private properties
116
- .filter((currentProperty) => currentProperty.access_modifier.toLowerCase() !== 'private')
117
- // Filter out properties that also exist on the child
118
- .filter((currentProperty) => !this.memberExists(currentClass.properties, currentProperty.name))
119
- .map((currentProperty) => (Object.assign(Object.assign({}, currentProperty), { inherited: true }))));
120
- }
121
- getInheritedMethods(parentAsClass, currentClass) {
122
- return (parentAsClass.methods
123
- // Filter out private methods
124
- .filter((currentMethod) => currentMethod.access_modifier.toLowerCase() !== 'private')
125
- // Filter out methods that also exist on the child
126
- .filter((currentMethod) => !this.memberExists(currentClass.methods, currentMethod.name))
127
- .map((currentMethod) => (Object.assign(Object.assign({}, currentMethod), { inherited: true }))));
128
- }
129
- memberExists(members, fieldName) {
130
- const fieldNames = members.map((currentMember) => currentMember.name);
131
- return fieldNames.includes(fieldName);
132
- }
133
- }
134
- exports.RawBodyParser = RawBodyParser;
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.RawBodyParser = void 0;
7
+ const metadata_processor_1 = __importDefault(require("./metadata-processor"));
8
+ const logger_1 = require("../util/logger");
9
+ class RawBodyParser {
10
+ constructor(typeBundles) {
11
+ this.typeBundles = typeBundles;
12
+ }
13
+ parse(reflect) {
14
+ const types = this.typeBundles
15
+ .map((currentBundle) => {
16
+ logger_1.Logger.log(`Parsing file: ${currentBundle.filePath}`);
17
+ const result = reflect(currentBundle);
18
+ if (!!result.typeMirror && !!currentBundle.rawMetadataContent) {
19
+ // If successful and there is a metadata file
20
+ const metadataParams = metadata_processor_1.default.process(currentBundle.rawMetadataContent);
21
+ metadataParams.forEach((value, key) => {
22
+ var _a;
23
+ const declaration = `${key}: ${value}`;
24
+ (_a = result.typeMirror) === null || _a === void 0 ? void 0 : _a.annotations.push({
25
+ rawDeclaration: declaration,
26
+ name: declaration,
27
+ type: declaration,
28
+ });
29
+ });
30
+ }
31
+ return result;
32
+ })
33
+ .filter((reflectionResult) => {
34
+ return reflectionResult.typeMirror;
35
+ })
36
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
37
+ .map((reflectionResult) => reflectionResult.typeMirror);
38
+ return this.addFieldsFromParent(types);
39
+ }
40
+ addFieldsFromParent(types) {
41
+ const typesWithFields = [];
42
+ for (const currentType of types) {
43
+ if (currentType.type_name !== 'class' && currentType.type_name !== 'interface') {
44
+ typesWithFields.push(currentType);
45
+ continue;
46
+ }
47
+ if (currentType.type_name === 'class') {
48
+ let typeAsClass = currentType;
49
+ if (!typeAsClass.extended_class) {
50
+ typesWithFields.push(currentType);
51
+ continue;
52
+ }
53
+ typeAsClass = this.addMembersFromParent(typeAsClass, types);
54
+ typesWithFields.push(typeAsClass);
55
+ continue;
56
+ }
57
+ // If reaching here then we are dealing with an interface
58
+ let typeAsInterface = currentType;
59
+ if (!typeAsInterface.extended_interfaces.length) {
60
+ typesWithFields.push(currentType);
61
+ continue;
62
+ }
63
+ typeAsInterface = this.addMethodsFromParent(typeAsInterface, types);
64
+ typesWithFields.push(typeAsInterface);
65
+ }
66
+ return typesWithFields;
67
+ }
68
+ addMembersFromParent(currentClass, allTypes) {
69
+ if (!currentClass.extended_class) {
70
+ return currentClass;
71
+ }
72
+ const parent = allTypes.find((currentType) => currentType.name === currentClass.extended_class);
73
+ if (!parent || parent.type_name !== 'class') {
74
+ return currentClass;
75
+ }
76
+ let parentAsClass = parent;
77
+ if (parentAsClass.extended_class) {
78
+ parentAsClass = this.addMembersFromParent(parentAsClass, allTypes);
79
+ }
80
+ currentClass.fields = [...currentClass.fields, ...this.getInheritedFields(parentAsClass, currentClass)];
81
+ currentClass.properties = [...currentClass.properties, ...this.getInheritedProperties(parentAsClass, currentClass)];
82
+ currentClass.methods = [...currentClass.methods, ...this.getInheritedMethods(parentAsClass, currentClass)];
83
+ return currentClass;
84
+ }
85
+ addMethodsFromParent(currentInterface, allTypes) {
86
+ if (!currentInterface.extended_interfaces.length) {
87
+ return currentInterface;
88
+ }
89
+ const parents = [];
90
+ for (const currentInterfaceName of currentInterface.extended_interfaces) {
91
+ const parent = allTypes.find((currentType) => currentType.name === currentInterfaceName);
92
+ if (parent) {
93
+ parents.push(parent);
94
+ }
95
+ }
96
+ for (const parent of parents) {
97
+ let parentAsInterface = parent;
98
+ if (parentAsInterface.extended_interfaces.length) {
99
+ parentAsInterface = this.addMethodsFromParent(parentAsInterface, allTypes);
100
+ }
101
+ currentInterface.methods = [
102
+ ...currentInterface.methods,
103
+ ...this.getInheritedMethods(parentAsInterface, currentInterface),
104
+ ];
105
+ }
106
+ return currentInterface;
107
+ }
108
+ getInheritedFields(parentAsClass, currentClass) {
109
+ return (parentAsClass.fields
110
+ // Filter out private fields
111
+ .filter((currentField) => currentField.access_modifier.toLowerCase() !== 'private')
112
+ // Filter out fields that also exist on the child
113
+ .filter((currentField) => !this.memberExists(currentClass.fields, currentField.name))
114
+ .map((currentField) => (Object.assign(Object.assign({}, currentField), { inherited: true }))));
115
+ }
116
+ getInheritedProperties(parentAsClass, currentClass) {
117
+ return (parentAsClass.properties
118
+ // Filter out private properties
119
+ .filter((currentProperty) => currentProperty.access_modifier.toLowerCase() !== 'private')
120
+ // Filter out properties that also exist on the child
121
+ .filter((currentProperty) => !this.memberExists(currentClass.properties, currentProperty.name))
122
+ .map((currentProperty) => (Object.assign(Object.assign({}, currentProperty), { inherited: true }))));
123
+ }
124
+ getInheritedMethods(parentAsClass, currentClass) {
125
+ return (parentAsClass.methods
126
+ // Filter out private methods
127
+ .filter((currentMethod) => currentMethod.access_modifier.toLowerCase() !== 'private')
128
+ // Filter out methods that also exist on the child
129
+ .filter((currentMethod) => !this.memberExists(currentClass.methods, currentMethod.name))
130
+ .map((currentMethod) => (Object.assign(Object.assign({}, currentMethod), { inherited: true }))));
131
+ }
132
+ memberExists(members, fieldName) {
133
+ const fieldNames = members.map((currentMember) => currentMember.name);
134
+ return fieldNames.includes(fieldName);
135
+ }
136
+ }
137
+ exports.RawBodyParser = RawBodyParser;
135
138
  //# sourceMappingURL=parser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/service/parser.ts"],"names":[],"mappings":";;;AAEA,6DAAqD;A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CAkKC"}
@@ -1,9 +1,9 @@
1
- import { Type } from '@cparra/apex-reflection';
2
- export default class State {
3
- private static instance;
4
- private typeBeingProcessed?;
5
- private constructor();
6
- static getInstance(): State;
7
- setTypeBeingProcessed(typeToSet: Type): void;
8
- getTypeBeingProcessed(): Type | undefined;
9
- }
1
+ import { Type } from '@cparra/apex-reflection';
2
+ export default class State {
3
+ private static instance;
4
+ private typeBeingProcessed?;
5
+ private constructor();
6
+ static getInstance(): State;
7
+ setTypeBeingProcessed(typeToSet: Type): void;
8
+ getTypeBeingProcessed(): Type | undefined;
9
+ }
@@ -1,20 +1,20 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- class State {
4
- // eslint-disable-next-line @typescript-eslint/no-empty-function
5
- constructor() { }
6
- static getInstance() {
7
- if (!State.instance) {
8
- State.instance = new State();
9
- }
10
- return State.instance;
11
- }
12
- setTypeBeingProcessed(typeToSet) {
13
- this.typeBeingProcessed = typeToSet;
14
- }
15
- getTypeBeingProcessed() {
16
- return this.typeBeingProcessed;
17
- }
18
- }
19
- exports.default = State;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class State {
4
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
5
+ constructor() { }
6
+ static getInstance() {
7
+ if (!State.instance) {
8
+ State.instance = new State();
9
+ }
10
+ return State.instance;
11
+ }
12
+ setTypeBeingProcessed(typeToSet) {
13
+ this.typeBeingProcessed = typeToSet;
14
+ }
15
+ getTypeBeingProcessed() {
16
+ return this.typeBeingProcessed;
17
+ }
18
+ }
19
+ exports.default = State;
20
20
  //# sourceMappingURL=state.js.map
@@ -1,4 +1,4 @@
1
- import { Walker, WalkerListener } from './walker';
2
- export declare class ClassWalker extends Walker {
3
- walk(listener: WalkerListener): void;
4
- }
1
+ import { Walker, WalkerListener } from './walker';
2
+ export declare class ClassWalker extends Walker {
3
+ walk(listener: WalkerListener): void;
4
+ }