@cparra/apexdocs 3.0.0 → 3.1.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 (261) hide show
  1. package/README.md +11 -5
  2. package/package.json +4 -1
  3. package/.github/workflows/ci.yaml +0 -22
  4. package/.github/workflows/close_stale.yml +0 -22
  5. package/.prettierrc.js +0 -7
  6. package/__mocks__/chalk.js +0 -12
  7. package/__mocks__/log-update.js +0 -6
  8. package/eslint.config.mjs +0 -10
  9. package/examples/README.md +0 -5
  10. package/examples/docsify/README.md +0 -17
  11. package/examples/docsify/apexdocs.config.ts +0 -13
  12. package/examples/docsify/classes/ASampleClass.cls +0 -57
  13. package/examples/docsify/classes/CodeControl.cls +0 -19
  14. package/examples/docsify/classes/SampleClass.cls +0 -95
  15. package/examples/docsify/classes/SampleInterface.cls +0 -17
  16. package/examples/docsify/classes/SomeDto.cls +0 -122
  17. package/examples/docsify/docs/.nojekyll +0 -0
  18. package/examples/docsify/docs/README.md +0 -25
  19. package/examples/docsify/docs/_config.yml +0 -1
  20. package/examples/docsify/docs/index.html +0 -22
  21. package/examples/docsify/docs/miscellaneous/ASampleClass.md +0 -88
  22. package/examples/docsify/docs/miscellaneous/CodeControl.md +0 -107
  23. package/examples/docsify/docs/miscellaneous/SomeDto.md +0 -244
  24. package/examples/docsify/docs/sample-classes/SampleClass.md +0 -171
  25. package/examples/docsify/docs/sample-interfaces/SampleInterface.md +0 -36
  26. package/examples/docsify/package-lock.json +0 -2459
  27. package/examples/docsify/package.json +0 -14
  28. package/examples/imported/.forceignore +0 -12
  29. package/examples/imported/README.md +0 -6
  30. package/examples/imported/config/project-scratch-def.json +0 -5
  31. package/examples/imported/docs/index.md +0 -109
  32. package/examples/imported/docs/miscellaneous/BaseClass.md +0 -13
  33. package/examples/imported/docs/miscellaneous/MultiInheritanceClass.md +0 -69
  34. package/examples/imported/docs/miscellaneous/ParentInterface.md +0 -12
  35. package/examples/imported/docs/miscellaneous/ReferencedEnum.md +0 -5
  36. package/examples/imported/docs/miscellaneous/SampleException.md +0 -21
  37. package/examples/imported/docs/miscellaneous/SampleInterface.md +0 -113
  38. package/examples/imported/docs/miscellaneous/Url.md +0 -308
  39. package/examples/imported/docs/sample-enums/SampleEnum.md +0 -33
  40. package/examples/imported/docs/samplegroup/SampleClass.md +0 -167
  41. package/examples/imported/force-app/classes/BaseClass.cls +0 -3
  42. package/examples/imported/force-app/classes/MultiInheritanceClass.cls +0 -1
  43. package/examples/imported/force-app/classes/ParentInterface.cls +0 -3
  44. package/examples/imported/force-app/classes/ReferencedEnum.cls +0 -3
  45. package/examples/imported/force-app/classes/SampleClass.cls +0 -72
  46. package/examples/imported/force-app/classes/SampleEnum.cls +0 -30
  47. package/examples/imported/force-app/classes/SampleException.cls +0 -17
  48. package/examples/imported/force-app/classes/SampleInterface.cls +0 -50
  49. package/examples/imported/force-app/classes/Url.cls +0 -196
  50. package/examples/imported/package-lock.json +0 -665
  51. package/examples/imported/package.json +0 -6
  52. package/examples/imported/scripts/process-docs.mjs +0 -16
  53. package/examples/imported/sfdx-project.json +0 -12
  54. package/examples/markdown/.forceignore +0 -12
  55. package/examples/markdown/README.md +0 -7
  56. package/examples/markdown/config/project-scratch-def.json +0 -5
  57. package/examples/markdown/docs/index.md +0 -109
  58. package/examples/markdown/docs/miscellaneous/BaseClass.md +0 -16
  59. package/examples/markdown/docs/miscellaneous/MultiInheritanceClass.md +0 -72
  60. package/examples/markdown/docs/miscellaneous/ParentInterface.md +0 -15
  61. package/examples/markdown/docs/miscellaneous/ReferencedEnum.md +0 -8
  62. package/examples/markdown/docs/miscellaneous/SampleException.md +0 -24
  63. package/examples/markdown/docs/miscellaneous/SampleInterface.md +0 -116
  64. package/examples/markdown/docs/miscellaneous/Url.md +0 -311
  65. package/examples/markdown/docs/sample-enums/SampleEnum.md +0 -36
  66. package/examples/markdown/docs/samplegroup/SampleClass.md +0 -170
  67. package/examples/markdown/force-app/classes/BaseClass.cls +0 -3
  68. package/examples/markdown/force-app/classes/MultiInheritanceClass.cls +0 -1
  69. package/examples/markdown/force-app/classes/ParentInterface.cls +0 -3
  70. package/examples/markdown/force-app/classes/ReferencedEnum.cls +0 -3
  71. package/examples/markdown/force-app/classes/SampleClass.cls +0 -72
  72. package/examples/markdown/force-app/classes/SampleEnum.cls +0 -30
  73. package/examples/markdown/force-app/classes/SampleException.cls +0 -17
  74. package/examples/markdown/force-app/classes/SampleInterface.cls +0 -50
  75. package/examples/markdown/force-app/classes/Url.cls +0 -196
  76. package/examples/markdown/package-lock.json +0 -665
  77. package/examples/markdown/package.json +0 -20
  78. package/examples/markdown/sfdx-project.json +0 -12
  79. package/examples/markdown-jsconfig/.forceignore +0 -12
  80. package/examples/markdown-jsconfig/README.md +0 -9
  81. package/examples/markdown-jsconfig/apexdocs.config.mjs +0 -22
  82. package/examples/markdown-jsconfig/config/project-scratch-def.json +0 -5
  83. package/examples/markdown-jsconfig/docs/index.md +0 -12
  84. package/examples/markdown-jsconfig/docs/miscellaneous/Url.md +0 -315
  85. package/examples/markdown-jsconfig/force-app/classes/Url.cls +0 -196
  86. package/examples/markdown-jsconfig/package-lock.json +0 -665
  87. package/examples/markdown-jsconfig/package.json +0 -15
  88. package/examples/markdown-jsconfig/sfdx-project.json +0 -12
  89. package/examples/open-api/README.md +0 -5
  90. package/examples/open-api/config/project-scratch-def.json +0 -13
  91. package/examples/open-api/docs/openapi.json +0 -14
  92. package/examples/open-api/force-app/main/default/classes/ChildClass.cls +0 -42
  93. package/examples/open-api/force-app/main/default/classes/SampleClass.cls +0 -167
  94. package/examples/open-api/force-app/main/default/restapi/SampleRestResource.cls +0 -195
  95. package/examples/open-api/force-app/main/default/restapi/SampleRestResourceToSkip.cls +0 -35
  96. package/examples/open-api/force-app/main/default/restapi/SampleRestResourceWithInnerClass.cls +0 -24
  97. package/examples/open-api/force-app/main/default/restapi/SampleRestResourceWithoutApexDocs.cls +0 -15
  98. package/examples/open-api/force-app/main/default/restapi/references/Reference1.cls +0 -9
  99. package/examples/open-api/force-app/main/default/restapi/references/Reference2.cls +0 -9
  100. package/examples/open-api/force-app/main/default/restapi/references/Reference3.cls +0 -3
  101. package/examples/open-api/force-app/main/default/restapi/references/Reference4.cls +0 -3
  102. package/examples/open-api/force-app/main/default/restapi/references/Reference5.cls +0 -3
  103. package/examples/open-api/force-app/main/default/restapi/references/Reference6.cls +0 -6
  104. package/examples/open-api/force-app/main/default/restapi/references/Reference7.cls +0 -3
  105. package/examples/open-api/package-lock.json +0 -724
  106. package/examples/open-api/package.json +0 -20
  107. package/examples/open-api/sfdx-project.json +0 -12
  108. package/examples/vitepress/.forceignore +0 -12
  109. package/examples/vitepress/README.md +0 -25
  110. package/examples/vitepress/apexdocs.config.ts +0 -113
  111. package/examples/vitepress/config/project-scratch-def.json +0 -13
  112. package/examples/vitepress/docs/.vitepress/cache/deps/@theme_index.js +0 -259
  113. package/examples/vitepress/docs/.vitepress/cache/deps/@theme_index.js.map +0 -7
  114. package/examples/vitepress/docs/.vitepress/cache/deps/_metadata.json +0 -40
  115. package/examples/vitepress/docs/.vitepress/cache/deps/chunk-574YRH25.js +0 -11474
  116. package/examples/vitepress/docs/.vitepress/cache/deps/chunk-574YRH25.js.map +0 -7
  117. package/examples/vitepress/docs/.vitepress/cache/deps/chunk-E5DZZB2I.js +0 -9172
  118. package/examples/vitepress/docs/.vitepress/cache/deps/chunk-E5DZZB2I.js.map +0 -7
  119. package/examples/vitepress/docs/.vitepress/cache/deps/package.json +0 -3
  120. package/examples/vitepress/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +0 -4339
  121. package/examples/vitepress/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +0 -7
  122. package/examples/vitepress/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +0 -567
  123. package/examples/vitepress/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +0 -7
  124. package/examples/vitepress/docs/.vitepress/cache/deps/vue.js +0 -323
  125. package/examples/vitepress/docs/.vitepress/cache/deps/vue.js.map +0 -7
  126. package/examples/vitepress/docs/.vitepress/config.mts +0 -21
  127. package/examples/vitepress/docs/.vitepress/sidebar.json +0 -119
  128. package/examples/vitepress/docs/api-examples.md +0 -49
  129. package/examples/vitepress/docs/index-frontmatter.md +0 -16
  130. package/examples/vitepress/docs/index.md +0 -56
  131. package/examples/vitepress/docs/markdown-examples.md +0 -85
  132. package/examples/vitepress/docs/miscellaneous/BaseClass.md +0 -20
  133. package/examples/vitepress/docs/miscellaneous/MultiInheritanceClass.md +0 -76
  134. package/examples/vitepress/docs/miscellaneous/ParentInterface.md +0 -19
  135. package/examples/vitepress/docs/miscellaneous/ReferencedEnum.md +0 -15
  136. package/examples/vitepress/docs/miscellaneous/SampleException.md +0 -28
  137. package/examples/vitepress/docs/miscellaneous/SampleInterface.md +0 -116
  138. package/examples/vitepress/docs/miscellaneous/Url.md +0 -317
  139. package/examples/vitepress/docs/sample-enums/SampleEnum.md +0 -40
  140. package/examples/vitepress/docs/samplegroup/SampleClass.md +0 -174
  141. package/examples/vitepress/force-app/main/default/classes/BaseClass.cls +0 -3
  142. package/examples/vitepress/force-app/main/default/classes/MultiInheritanceClass.cls +0 -1
  143. package/examples/vitepress/force-app/main/default/classes/ParentInterface.cls +0 -3
  144. package/examples/vitepress/force-app/main/default/classes/ReferencedEnum.cls +0 -5
  145. package/examples/vitepress/force-app/main/default/classes/Url.cls +0 -198
  146. package/examples/vitepress/force-app/main/default/classes/feature-a/SampleClass.cls +0 -73
  147. package/examples/vitepress/force-app/main/default/classes/feature-a/SampleEnum.cls +0 -30
  148. package/examples/vitepress/force-app/main/default/classes/feature-a/SampleException.cls +0 -17
  149. package/examples/vitepress/force-app/main/default/classes/feature-a/SampleInterface.cls +0 -46
  150. package/examples/vitepress/package-lock.json +0 -2574
  151. package/examples/vitepress/package.json +0 -18
  152. package/examples/vitepress/sfdx-project.json +0 -12
  153. package/jest.config.js +0 -10
  154. package/jest.d.ts +0 -7
  155. package/src/application/Apexdocs.ts +0 -69
  156. package/src/application/__tests__/apex-file-reader.spec.ts +0 -128
  157. package/src/application/apex-file-reader.ts +0 -56
  158. package/src/application/file-system.ts +0 -69
  159. package/src/application/file-writer.ts +0 -43
  160. package/src/application/generators/markdown.ts +0 -45
  161. package/src/application/generators/openapi.ts +0 -75
  162. package/src/cli/args.ts +0 -55
  163. package/src/cli/commands/markdown.ts +0 -56
  164. package/src/cli/commands/openapi.ts +0 -36
  165. package/src/cli/generate.ts +0 -32
  166. package/src/core/__test__/manifest.spec.ts +0 -16
  167. package/src/core/manifest.ts +0 -90
  168. package/src/core/markdown/__test__/expect-extensions.ts +0 -32
  169. package/src/core/markdown/__test__/generating-class-docs.spec.ts +0 -362
  170. package/src/core/markdown/__test__/generating-docs.spec.ts +0 -378
  171. package/src/core/markdown/__test__/generating-enum-docs.spec.ts +0 -61
  172. package/src/core/markdown/__test__/generating-interface-docs.spec.ts +0 -169
  173. package/src/core/markdown/__test__/generating-reference-guide.spec.ts +0 -196
  174. package/src/core/markdown/__test__/inheritance-chain.test.ts +0 -54
  175. package/src/core/markdown/__test__/test-helpers.ts +0 -25
  176. package/src/core/markdown/adapters/__tests__/documentables.spec.ts +0 -109
  177. package/src/core/markdown/adapters/__tests__/interface-adapter.spec.ts +0 -150
  178. package/src/core/markdown/adapters/__tests__/link-generator.spec.ts +0 -130
  179. package/src/core/markdown/adapters/__tests__/references.spec.ts +0 -136
  180. package/src/core/markdown/adapters/apex-types.ts +0 -238
  181. package/src/core/markdown/adapters/documentables.ts +0 -115
  182. package/src/core/markdown/adapters/fields-and-properties.ts +0 -45
  183. package/src/core/markdown/adapters/generate-link.ts +0 -82
  184. package/src/core/markdown/adapters/inline.ts +0 -143
  185. package/src/core/markdown/adapters/methods-and-constructors.ts +0 -133
  186. package/src/core/markdown/adapters/reference-guide.ts +0 -37
  187. package/src/core/markdown/adapters/renderable-bundle.ts +0 -61
  188. package/src/core/markdown/adapters/renderable-to-page-data.ts +0 -91
  189. package/src/core/markdown/adapters/type-utils.ts +0 -13
  190. package/src/core/markdown/adapters/types.d.ts +0 -180
  191. package/src/core/markdown/generate-docs.ts +0 -210
  192. package/src/core/markdown/reflection/__test__/filter-scope.spec.ts +0 -290
  193. package/src/core/markdown/reflection/__test__/helpers.ts +0 -18
  194. package/src/core/markdown/reflection/__test__/remove-excluded-tags.spec.ts +0 -200
  195. package/src/core/markdown/reflection/filter-scope.ts +0 -13
  196. package/src/core/markdown/reflection/inheritance-chain-expanion.ts +0 -22
  197. package/src/core/markdown/reflection/inheritance-chain.ts +0 -23
  198. package/src/core/markdown/reflection/inherited-member-expansion.ts +0 -105
  199. package/src/core/markdown/reflection/reflect-source.ts +0 -123
  200. package/src/core/markdown/reflection/remove-excluded-tags.ts +0 -168
  201. package/src/core/markdown/reflection/sort-types-and-members.ts +0 -61
  202. package/src/core/markdown/templates/class-template.ts +0 -75
  203. package/src/core/markdown/templates/constructors-partial-template.ts +0 -32
  204. package/src/core/markdown/templates/documentable-partial-template.ts +0 -26
  205. package/src/core/markdown/templates/enum-template.ts +0 -12
  206. package/src/core/markdown/templates/fieldsPartialTemplate.ts +0 -23
  207. package/src/core/markdown/templates/grouped-members-partial-template.ts +0 -6
  208. package/src/core/markdown/templates/hookable.ts +0 -7
  209. package/src/core/markdown/templates/interface-template.ts +0 -16
  210. package/src/core/markdown/templates/methods-partial-template.ts +0 -43
  211. package/src/core/markdown/templates/reference-guide.ts +0 -14
  212. package/src/core/markdown/templates/template.ts +0 -114
  213. package/src/core/markdown/templates/type-doc-partial.ts +0 -27
  214. package/src/core/markdown/utils.ts +0 -3
  215. package/src/core/openApiSettings.ts +0 -41
  216. package/src/core/openapi/__tests__/manifest-factory.spec.ts +0 -16
  217. package/src/core/openapi/__tests__/open-api-docs-processor.spec.ts +0 -59
  218. package/src/core/openapi/__tests__/open-api.spec.ts +0 -22
  219. package/src/core/openapi/apex-doc-types.ts +0 -26
  220. package/src/core/openapi/apex-type-wrappers/ClassMirrorWrapper.ts +0 -12
  221. package/src/core/openapi/apex-type-wrappers/MethodMirrorWrapper.ts +0 -11
  222. package/src/core/openapi/apex-type-wrappers/__tests__/ClassMirrorWrapper.spec.ts +0 -15
  223. package/src/core/openapi/file-container.ts +0 -13
  224. package/src/core/openapi/manifest-factory.ts +0 -16
  225. package/src/core/openapi/open-api-docs-processor.ts +0 -93
  226. package/src/core/openapi/open-api-types.ts +0 -119
  227. package/src/core/openapi/open-api.ts +0 -45
  228. package/src/core/openapi/openapi-type-file.ts +0 -12
  229. package/src/core/openapi/parser.ts +0 -163
  230. package/src/core/openapi/parsers/Builder.ts +0 -40
  231. package/src/core/openapi/parsers/MethodParser.ts +0 -249
  232. package/src/core/openapi/parsers/ParameterObjectBuilder.ts +0 -13
  233. package/src/core/openapi/parsers/ReferenceBuilder.ts +0 -299
  234. package/src/core/openapi/parsers/RequestBodyBuilder.ts +0 -19
  235. package/src/core/openapi/parsers/ResponsesBuilder.ts +0 -21
  236. package/src/core/openapi/parsers/__tests__/MethodParser.spec.ts +0 -44
  237. package/src/core/openapi/parsers/__tests__/ParameterObjectBuilder.spec.ts +0 -68
  238. package/src/core/openapi/parsers/__tests__/ReferenceBuilder.spec.ts +0 -751
  239. package/src/core/openapi/parsers/__tests__/RequestBodyBuilder.spec.ts +0 -64
  240. package/src/core/openapi/parsers/__tests__/ResponsesBuilder.spec.ts +0 -55
  241. package/src/core/openapi/transpiler.ts +0 -17
  242. package/src/core/openapi/types-repository.ts +0 -54
  243. package/src/core/parse-apex-metadata.ts +0 -30
  244. package/src/core/shared/types.d.ts +0 -150
  245. package/src/core/shared/utils.ts +0 -5
  246. package/src/defaults.ts +0 -21
  247. package/src/index.ts +0 -110
  248. package/src/test-helpers/AnnotationBuilder.ts +0 -29
  249. package/src/test-helpers/ClassMirrorBuilder.ts +0 -69
  250. package/src/test-helpers/DocCommentAnnotationBuilder.ts +0 -24
  251. package/src/test-helpers/DocCommentBuilder.ts +0 -36
  252. package/src/test-helpers/FieldMirrorBuilder.ts +0 -59
  253. package/src/test-helpers/InterfaceMirrorBuilder.ts +0 -39
  254. package/src/test-helpers/MethodMirrorBuilder.ts +0 -77
  255. package/src/test-helpers/SettingsBuilder.ts +0 -17
  256. package/src/util/error-logger.ts +0 -92
  257. package/src/util/fp.ts +0 -3
  258. package/src/util/logger.ts +0 -51
  259. package/src/util/string-utils.ts +0 -7
  260. package/tsconfig.json +0 -25
  261. package/tslint.json +0 -6
package/README.md CHANGED
@@ -74,9 +74,11 @@ Here are some live projects using ApexDocs:
74
74
 
75
75
  ## ▶️ Available Commands
76
76
 
77
+ ### Markdown
78
+
77
79
  `markdown`
78
80
 
79
- ### Flags
81
+ #### Flags
80
82
 
81
83
  | Flag | Alias | Description | Default | Required |
82
84
  |------------------------|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|----------|
@@ -89,7 +91,7 @@ Here are some live projects using ApexDocs:
89
91
  | `--includeMetadata ` | N/A | Whether to include the file's meta.xml information: Whether it is active and and the API version | `false` | No |
90
92
  | `--linkingStrategy` | N/A | The strategy to use when linking to other classes. Possible values are `relative`, `no-link`, and `none` | `relative` | No |
91
93
 
92
- #### Linking Strategy
94
+ ##### Linking Strategy
93
95
 
94
96
  The linking strategy determines how ApexDocs will link to other classes in your documentation. For example,
95
97
  if I have class `A` that links through class `B` (e.g. through an `{@link B}` tag, the `@see` tag,
@@ -115,15 +117,19 @@ Does not apply any kind of logic. Instead, the links will be determined by the p
115
117
  from the root of the documentation site OR by whatever path you have returned in the `transformReference` hook
116
118
  for the file.
117
119
 
118
- ### Sample Usage
120
+ #### Sample Usage
119
121
 
120
122
  ```bash
121
123
  apexdocs markdown -s force-app -t docs -p global public namespaceaccessible -n MyNamespace
122
124
  ```
123
125
 
126
+ ---
127
+
128
+ ### OpenApi
129
+
124
130
  `openapi`
125
131
 
126
- ### Flags
132
+ #### Flags
127
133
 
128
134
  | Flag | Alias | Description | Default | Required |
129
135
  |----------------|-------|-------------------------------------------------------------------------------|-----------------|----------|
@@ -134,7 +140,7 @@ apexdocs markdown -s force-app -t docs -p global public namespaceaccessible -n M
134
140
  | `--title` | N/A | The title of the OpenApi file. | `Apex REST API` | No |
135
141
  | `--apiVersion` | N/A | The version of the API. | `1.0.0` | No |
136
142
 
137
- ### Sample Usage
143
+ #### Sample Usage
138
144
 
139
145
  ```bash
140
146
  apexdocs openapi -s force-app -t docs -n MyNamespace --title "My Custom OpenApi Title"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cparra/apexdocs",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "Library with CLI capabilities to generate documentation for Salesforce Apex classes.",
5
5
  "keywords": [
6
6
  "apex",
@@ -12,6 +12,9 @@
12
12
  ],
13
13
  "exports": "./dist/index.js",
14
14
  "types": "./dist/index.d.ts",
15
+ "files": [
16
+ "dist"
17
+ ],
15
18
  "bin": {
16
19
  "apexdocs": "./dist/cli/generate.js"
17
20
  },
@@ -1,22 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches: ["master", "develop"]
6
- pull_request:
7
- branches: ["main", "develop"]
8
- workflow_dispatch:
9
-
10
- jobs:
11
- build:
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v4
15
- - name: Setup node
16
- uses: actions/setup-node@v3
17
- with:
18
- node-version: "20"
19
- cache: "npm"
20
- - run: npm ci
21
- - run: npm run build --if-present
22
- - run: npm test
@@ -1,22 +0,0 @@
1
- name: Close inactive issues
2
- on:
3
- schedule:
4
- - cron: "30 1 * * *"
5
-
6
- jobs:
7
- close-issues:
8
- runs-on: ubuntu-latest
9
- permissions:
10
- issues: write
11
- pull-requests: write
12
- steps:
13
- - uses: actions/stale@v5
14
- with:
15
- days-before-issue-stale: 30
16
- days-before-issue-close: 14
17
- stale-issue-label: "stale"
18
- stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
19
- close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
20
- days-before-pr-stale: -1
21
- days-before-pr-close: -1
22
- repo-token: ${{ secrets.GITHUB_TOKEN }}
package/.prettierrc.js DELETED
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- semi: true,
3
- trailingComma: 'all',
4
- singleQuote: true,
5
- printWidth: 120,
6
- tabWidth: 2,
7
- };
@@ -1,12 +0,0 @@
1
- // __mocks__/chalk.js
2
- module.exports = new Proxy(
3
- {},
4
- {
5
- get: function (target, property) {
6
- return property === 'default' ? this : (text) => text;
7
- },
8
- green: function (text) {
9
- return text;
10
- },
11
- },
12
- );
@@ -1,6 +0,0 @@
1
- // This is a basic mock that can be expanded based on your needs.
2
- // It mocks the main function of log-update to just log to console or do nothing.
3
- module.exports = {
4
- // Mock the main function to just log the text or do nothing
5
- default: function () {},
6
- };
package/eslint.config.mjs DELETED
@@ -1,10 +0,0 @@
1
- // @ts-check
2
-
3
- import eslint from '@eslint/js';
4
- import tseslint from 'typescript-eslint';
5
- import eslintConfigPrettier from "eslint-config-prettier";
6
-
7
- export default tseslint.config(
8
- eslint.configs.recommended,
9
- ...tseslint.configs.recommended,
10
- eslintConfigPrettier);
@@ -1,5 +0,0 @@
1
- # Examples
2
-
3
- This folder contains a few examples of how to use ApexDocs for different use cases, and with different tools.
4
-
5
- Go into each example folder to get an overview of how it works, and how you can configure it for your own project.
@@ -1,17 +0,0 @@
1
- # Docsify Example
2
-
3
- This project contains an example on how to generate documentation to be rendered with [Docsify](https://docsify.js.org).
4
-
5
- ## Getting Started
6
-
7
- * Follow the Docsify getting started instructions [here](https://docsify.js.org/#/quickstart).
8
-
9
- ## Configuration
10
-
11
- Take a look at the `apexdocs.config.ts` file to see how the configuration is set up.
12
-
13
- Pay special attention to the following:
14
-
15
- * `linkingStrategy` -> This must be set to "none" for Docsify to correctly render the links.
16
-
17
- * `transformReferenceGuide` -> Overrides the name of the `index` file to `README` so that Docsify can correctly render the home page.
@@ -1,13 +0,0 @@
1
- import { defineMarkdownConfig } from '../../src';
2
-
3
- export default defineMarkdownConfig({
4
- sourceDir: 'classes',
5
- targetDir: 'docs',
6
- scope: ['public', 'global'],
7
- linkingStrategy: 'none',
8
- transformReferenceGuide: () => {
9
- return {
10
- outputDocPath: 'README.md',
11
- };
12
- },
13
- });
@@ -1,57 +0,0 @@
1
- /**
2
- * @description This is a class description.
3
- * @see SomeDto
4
- * @see SampleInterface
5
- * @mermaid
6
- * ```mermaid
7
- * sequenceDiagram
8
- * participant dotcom
9
- * participant iframe
10
- * participant viewscreen
11
- * dotcom->>iframe: loads html w/ iframe url
12
- * iframe->>viewscreen: request template
13
- * viewscreen->>iframe: html & javascript
14
- * iframe->>dotcom: iframe ready
15
- * dotcom->>iframe: set mermaid data on iframe
16
- * iframe->>iframe: render mermaid
17
- * ```
18
- */
19
- public class ASampleClass {
20
- /**
21
- * @description Some description
22
- * @param surveyType2 my value
23
- * @return whatever
24
- */
25
- public static Map<String, Object> getActiveSurveySettings(String surveyType2) {
26
- System.debug('Map based example');
27
- }
28
-
29
- public static List< String > someMethod() {
30
- System.debug('Some method.');
31
- }
32
-
33
- /**
34
- * @description Executes commands based on the passed in argument.
35
- */
36
- public static String sampleMethod(List<String> argument) {
37
- System.debug('Execute');
38
- return '';
39
- }
40
-
41
- /**
42
- * @description Calls the method.
43
- * This methods allows you to call it.
44
- */
45
- public static void call() {
46
- }
47
-
48
- // /**
49
- // * @description This is a String property.
50
- // */
51
- // String MyProp { get; set; }
52
- //
53
- // /**
54
- // * @description This is a Decimal property.
55
- // */
56
- // Decimal AnotherProp { get; private set; }
57
- }
@@ -1,19 +0,0 @@
1
- public with sharing class CodeControl {
2
-
3
- // @start-group Picklist constant for Code_Control__mdt.Logging__c
4
- public static final String LOGGING_CONTROL_NONE = 'None';
5
- public static final String LOGGING_CONTROL_DEBUG = 'Debug';
6
- public static final String LOGGING_CONTROL_ERROR = 'Error';
7
- // @end-group
8
-
9
- // @start-group Picklist constants for Code_Control__mdt.Enabled__c
10
- public static final String TRIGGER_CONTROL_ENABLED = 'Yes';
11
- public static final String TRIGGER_CONTROL_DISABLED = 'No';
12
- public static final String FEATURE_CONTROL_ENABLED = 'Yes';
13
- public static final String FEATURE_CONTROL_DISABLED = 'No';
14
- // @end-group
15
-
16
- /* Special MDT values */
17
- public static final String WILDCARD_SOURCE = 'CodeControl_Default';
18
- public static final String SYSTEM_WIDE_SOURCE = 'CodeControl_Override';
19
- }
@@ -1,95 +0,0 @@
1
- /**
2
- * @description This is a class description.
3
- * @group Sample Classes
4
- * @see SampleInterface
5
- */
6
- @NamespaceAccessible
7
- public with sharing class SampleClass {
8
- /**
9
- * @description Constructs a SampleClass without any arguments.
10
- * @example
11
- * ```apex
12
- * SampleClass sampleInstance = new SampleClass();
13
- * ```
14
- */
15
- @NamespaceAccessible
16
- public SampleClass() {
17
- System.debug('Constructor');
18
- }
19
-
20
- /**
21
- * @description Constructs a SampleClass with an argument.
22
- * @param argument Some argument
23
- */
24
- public SampleClass(String argument) {
25
- System.debug('Constructor');
26
- }
27
-
28
- /**
29
- * @description Executes commands based on the passed in argument.
30
- * @example
31
- * ```apex
32
- * String result = SampleClass.testMethod();
33
- * System.debug(result);
34
- * ```
35
- */
36
- @NamespaceAccessible
37
- public static String someTestMethod(String argument) {
38
- System.debug('Execute');
39
- return '';
40
- }
41
-
42
-
43
- /**
44
- * @description Calls the method.
45
- * This methods allows you to call it.
46
- */
47
- public static void call() {
48
- }
49
-
50
- /**
51
- * @description This is a String property.
52
- */
53
- public String MyProp { get; set; }
54
-
55
- /**
56
- * @description This is a Decimal property.
57
- */
58
- public Decimal AnotherProp { get; private set; }
59
-
60
- /**
61
- * @description Inner class belonging to SampleClass.
62
- */
63
- public class InnerClass {
64
- /**
65
- * @description Description of the inner property.
66
- */
67
- public String InnerProp {get; set;}
68
-
69
- /**
70
- * @description Executes from the inner class.
71
- */
72
- public void innerMethod() {
73
- System.debug('Executing inner method.');
74
- }
75
- }
76
-
77
- /**
78
- * @description Inner class belonging to SampleClass.
79
- */
80
- public class AnotherInnerClass {
81
- /**
82
- * @description Description of the inner property.
83
- */
84
- public String InnerProp {
85
- get; set;
86
- }
87
-
88
- /**
89
- * @description Executes from the inner class.
90
- */
91
- public void innerMethod() {
92
- System.debug('Executing inner method.');
93
- }
94
- }
95
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * @description This is an interface description.
3
- * @group Sample Interfaces
4
- * @see SampleClass
5
- */
6
- public interface SampleInterface {
7
- /**
8
- * @description Executes the command.
9
- */
10
- void execute();
11
-
12
- /**
13
- * @description Returns a value based on the executed command.
14
- * @return Empty value
15
- */
16
- String getValue();
17
- }
@@ -1,122 +0,0 @@
1
- /**
2
- * @description Some description
3
- * @see ASampleClass
4
- */
5
- public with sharing class SomeDto {
6
- /**
7
- * @description Used in cartItem.html
8
- */
9
- public class CartItemDto {
10
- public CartItemDto(String id, String description, Decimal quantity, Decimal price, String currencyCode, String productImage, Boolean isDiscounted, Decimal adjustedAmount, String discountReason) {
11
- this.Id = id;
12
- this.Description = description;
13
- this.Quantity = quantity;
14
- this.Price = price.setScale(2);
15
- this.CurrencyCode = currencyCode;
16
- this.ProductImage = productImage;
17
- this.IsDiscounted = isDiscounted;
18
- this.AdjustedPrice = adjustedAmount.setScale(2);
19
- this.DiscountReason = discountReason;
20
- }
21
-
22
- /**
23
- * @description Id Unique identifier for this object.
24
- */
25
- @AuraEnabled
26
- public String Id { get; set; }
27
-
28
- /**
29
- * @description Description The description to display for this item.
30
- */
31
- @AuraEnabled
32
- public String Description { get; set; }
33
-
34
- /**
35
- * @description Quantity Amount of this item currently in the cart.
36
- */
37
- @AuraEnabled
38
- public Decimal Quantity { get; set; }
39
-
40
- /**
41
- * @description Price Calculated price for this item.
42
- */
43
- @AuraEnabled
44
- public Decimal Price { get; set; }
45
-
46
- /**
47
- * @description The currency code for this item.
48
- */
49
- @AuraEnabled
50
- public String CurrencyCode { get; set; }
51
-
52
- /**
53
- * @description ProductImage Main display image to display for this item.
54
- */
55
- @AuraEnabled
56
- public String ProductImage { get; set; }
57
-
58
- /**
59
- * @description IsDiscounted Whether the item has been discounted or not.
60
- */
61
- @AuraEnabled
62
- public Boolean IsDiscounted { get; set; }
63
-
64
- /**
65
- * @description AdjustedPrice If the item has been discounted, this contains the adjusted (lower) price.
66
- */
67
- @AuraEnabled
68
- public Decimal AdjustedPrice { get; set; }
69
-
70
- /**
71
- * @description DiscountReason If the item has been discounted, this contains a human-readable reason for the discount.
72
- */
73
- @AuraEnabled
74
- public String DiscountReason { get; set; }
75
- }
76
-
77
- @AuraEnabled
78
- public List<CartItemDto> Items { get; set; }
79
-
80
- @AuraEnabled
81
- public Decimal SubTotal { get; set; }
82
-
83
- @AuraEnabled
84
- public Decimal Total { get; set; }
85
-
86
- @AuraEnabled
87
- public Decimal Discounts { get; set; }
88
-
89
- /**
90
- * @description Constructs a CartDto
91
- * @param proForma The pro forma
92
- */
93
- public CartDto(nams.Order proForma) {
94
- this.Items = new List<CartDto.CartItemDto>();
95
- this.SubTotal = proForma.getSubTotal().getValue().setScale(2);
96
- this.Total = proForma.getGrandTotal().getValue().setScale(2);
97
- this.Discounts = proForma.getTotalDiscounts().getValue().setScale(2);
98
-
99
- for (OrderLine line : proForma.getLines()) {
100
- String imageUrl;
101
- if (!line.getProduct().getImages().isEmpty()) {
102
- imageUrl = line.getProduct().getImages()[0].getImageUrl();
103
- }
104
- Boolean isDiscounted = line.getTotalDiscounts() != Money.zero();
105
- String discountReason;
106
- if (isDiscounted) {
107
- discountReason = line.getAdjustments()[0].getDescription();
108
- }
109
- this.Items.add(new CartItemDto(
110
- line.getId(),
111
- line.getProduct().getName(),
112
- line.getQuantity(),
113
- line.getSubTotal().getValue(),
114
- line.getUnitPrice().getCurrency(),
115
- imageUrl,
116
- isDiscounted,
117
- line.getGrandTotal().getValue(),
118
- discountReason
119
- ));
120
- }
121
- }
122
- }
File without changes
@@ -1,25 +0,0 @@
1
- # Apex Reference Guide
2
-
3
- ## Miscellaneous
4
-
5
- ### [ASampleClass](miscellaneous/ASampleClass.md)
6
-
7
- This is a class description.
8
-
9
- ### [CodeControl](miscellaneous/CodeControl.md)
10
-
11
- ### [SomeDto](miscellaneous/SomeDto.md)
12
-
13
- Some description
14
-
15
- ## Sample Classes
16
-
17
- ### [SampleClass](sample-classes/SampleClass.md)
18
-
19
- This is a class description.
20
-
21
- ## Sample Interfaces
22
-
23
- ### [SampleInterface](sample-interfaces/SampleInterface.md)
24
-
25
- This is an interface description.
@@ -1 +0,0 @@
1
- theme: jekyll-theme-cayman
@@ -1,22 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <title>Document</title>
6
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
7
- <meta name="description" content="Description">
8
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
9
- <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
10
- </head>
11
- <body>
12
- <div id="app"></div>
13
- <script>
14
- window.$docsify = {
15
- name: '',
16
- repo: ''
17
- }
18
- </script>
19
- <!-- Docsify v4 -->
20
- <script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
21
- </body>
22
- </html>
@@ -1,88 +0,0 @@
1
- # ASampleClass Class
2
-
3
- This is a class description.
4
-
5
- **Mermaid**
6
-
7
- ```mermaid
8
- sequenceDiagram
9
- participant dotcom
10
- participant iframe
11
- participant viewscreen
12
- dotcom->>iframe: loads html w/ iframe url
13
- iframe->>viewscreen: request template
14
- viewscreen->>iframe: html & javascript
15
- iframe->>dotcom: iframe ready
16
- dotcom->>iframe: set mermaid data on iframe
17
- iframe->>iframe: render mermaid
18
- ```
19
-
20
- **See** [SomeDto](miscellaneous/SomeDto.md)
21
-
22
- **See** [SampleInterface](sample-interfaces/SampleInterface.md)
23
-
24
- ## Methods
25
- ### `getActiveSurveySettings(surveyType2)`
26
-
27
- Some description
28
-
29
- #### Signature
30
- ```apex
31
- public static Map<String,Object> getActiveSurveySettings(String surveyType2)
32
- ```
33
-
34
- #### Parameters
35
- | Name | Type | Description |
36
- |------|------|-------------|
37
- | surveyType2 | String | my value |
38
-
39
- #### Return Type
40
- **Map&lt;String,Object&gt;**
41
-
42
- whatever
43
-
44
- ---
45
-
46
- ### `someMethod()`
47
-
48
- #### Signature
49
- ```apex
50
- public static List<String> someMethod()
51
- ```
52
-
53
- #### Return Type
54
- **List&lt;String&gt;**
55
-
56
- ---
57
-
58
- ### `sampleMethod(argument)`
59
-
60
- Executes commands based on the passed in argument.
61
-
62
- #### Signature
63
- ```apex
64
- public static String sampleMethod(List<String> argument)
65
- ```
66
-
67
- #### Parameters
68
- | Name | Type | Description |
69
- |------|------|-------------|
70
- | argument | List&lt;String&gt; | |
71
-
72
- #### Return Type
73
- **String**
74
-
75
- ---
76
-
77
- ### `call()`
78
-
79
- Calls the method.
80
- This methods allows you to call it.
81
-
82
- #### Signature
83
- ```apex
84
- public static void call()
85
- ```
86
-
87
- #### Return Type
88
- **void**