@cparra/apexdocs 3.0.0-beta.1 → 3.0.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 (125) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +246 -650
  3. package/dist/cli/generate.js +74 -3095
  4. package/dist/defaults-BcE8DTat.js +13 -0
  5. package/dist/defaults-D07y_bq4.js +40 -0
  6. package/dist/defaults-gPzwP66p.js +14 -0
  7. package/dist/index.d.ts +49 -19
  8. package/dist/index.js +90 -2
  9. package/dist/logger-BEbUIfqN.js +3282 -0
  10. package/dist/logger-BGuf1PnL.js +3281 -0
  11. package/dist/logger-CWBRF2za.js +3284 -0
  12. package/dist/logger-CdBmDEN1.js +3283 -0
  13. package/dist/logger-Ce4QqPFR.js +3278 -0
  14. package/dist/logger-CyEVYaAC.js +3284 -0
  15. package/dist/logger-D7a83ycP.js +3277 -0
  16. package/dist/logger-DGaHeBKk.js +3279 -0
  17. package/dist/logger-Dqhl_lO_.js +3278 -0
  18. package/dist/logger-aySSWi0G.js +3280 -0
  19. package/dist/logger-qLCcAtiy.js +3284 -0
  20. package/examples/README.md +5 -0
  21. package/examples/docsify/README.md +17 -0
  22. package/examples/docsify/apexdocs.config.ts +13 -0
  23. package/examples/docsify/classes/ASampleClass.cls +57 -0
  24. package/examples/docsify/classes/CodeControl.cls +19 -0
  25. package/examples/docsify/classes/SampleClass.cls +95 -0
  26. package/examples/docsify/classes/SampleInterface.cls +17 -0
  27. package/examples/docsify/classes/SomeDto.cls +122 -0
  28. package/examples/docsify/docs/.nojekyll +0 -0
  29. package/examples/docsify/docs/README.md +25 -0
  30. package/examples/docsify/docs/_config.yml +1 -0
  31. package/examples/docsify/docs/index.html +22 -0
  32. package/examples/docsify/docs/miscellaneous/ASampleClass.md +88 -0
  33. package/examples/docsify/docs/miscellaneous/CodeControl.md +107 -0
  34. package/examples/docsify/docs/miscellaneous/SomeDto.md +244 -0
  35. package/examples/docsify/docs/sample-classes/SampleClass.md +171 -0
  36. package/examples/docsify/docs/sample-interfaces/SampleInterface.md +36 -0
  37. package/examples/docsify/package-lock.json +2459 -0
  38. package/examples/docsify/package.json +14 -0
  39. package/examples/imported/.forceignore +12 -0
  40. package/examples/imported/README.md +6 -0
  41. package/examples/imported/config/project-scratch-def.json +5 -0
  42. package/examples/imported/docs/index.md +109 -0
  43. package/examples/imported/docs/miscellaneous/BaseClass.md +13 -0
  44. package/examples/imported/docs/miscellaneous/MultiInheritanceClass.md +69 -0
  45. package/examples/imported/docs/miscellaneous/ParentInterface.md +12 -0
  46. package/examples/imported/docs/miscellaneous/ReferencedEnum.md +5 -0
  47. package/examples/imported/docs/miscellaneous/SampleException.md +21 -0
  48. package/examples/imported/docs/miscellaneous/SampleInterface.md +113 -0
  49. package/examples/imported/docs/miscellaneous/Url.md +308 -0
  50. package/examples/imported/docs/sample-enums/SampleEnum.md +33 -0
  51. package/examples/imported/docs/samplegroup/SampleClass.md +167 -0
  52. package/examples/imported/force-app/classes/BaseClass.cls +3 -0
  53. package/examples/imported/force-app/classes/MultiInheritanceClass.cls +1 -0
  54. package/examples/imported/force-app/classes/ParentInterface.cls +3 -0
  55. package/examples/imported/force-app/classes/ReferencedEnum.cls +3 -0
  56. package/examples/imported/force-app/classes/SampleInterface.cls +50 -0
  57. package/examples/imported/force-app/classes/Url.cls +196 -0
  58. package/examples/imported/package-lock.json +665 -0
  59. package/examples/imported/package.json +6 -0
  60. package/examples/imported/scripts/process-docs.mjs +16 -0
  61. package/examples/imported/sfdx-project.json +12 -0
  62. package/examples/markdown/README.md +7 -0
  63. package/examples/markdown/docs/miscellaneous/Url.md +10 -8
  64. package/examples/markdown/force-app/classes/Url.cls +3 -1
  65. package/examples/markdown-jsconfig/.forceignore +12 -0
  66. package/examples/markdown-jsconfig/README.md +9 -0
  67. package/examples/markdown-jsconfig/apexdocs.config.mjs +22 -0
  68. package/examples/markdown-jsconfig/config/project-scratch-def.json +5 -0
  69. package/examples/markdown-jsconfig/docs/index.md +12 -0
  70. package/examples/markdown-jsconfig/docs/miscellaneous/Url.md +315 -0
  71. package/examples/markdown-jsconfig/force-app/classes/Url.cls +196 -0
  72. package/examples/markdown-jsconfig/package-lock.json +665 -0
  73. package/examples/markdown-jsconfig/package.json +15 -0
  74. package/examples/markdown-jsconfig/sfdx-project.json +12 -0
  75. package/examples/open-api/README.md +5 -0
  76. package/examples/open-api/docs/openapi.json +2 -570
  77. package/examples/vitepress/README.md +25 -0
  78. package/examples/vitepress/apexdocs.config.ts +9 -2
  79. package/examples/vitepress/docs/index.md +11 -11
  80. package/examples/vitepress/docs/miscellaneous/BaseClass.md +1 -1
  81. package/examples/vitepress/docs/miscellaneous/MultiInheritanceClass.md +2 -2
  82. package/examples/vitepress/docs/miscellaneous/SampleException.md +1 -1
  83. package/examples/vitepress/docs/miscellaneous/SampleInterface.md +6 -6
  84. package/examples/vitepress/docs/miscellaneous/Url.md +3 -3
  85. package/examples/vitepress/docs/sample-enums/SampleEnum.md +3 -3
  86. package/examples/vitepress/docs/samplegroup/SampleClass.md +5 -5
  87. package/examples/vitepress/force-app/main/default/classes/feature-a/SampleClass.cls +73 -0
  88. package/examples/vitepress/force-app/main/default/classes/feature-a/SampleEnum.cls +30 -0
  89. package/examples/vitepress/force-app/main/default/classes/feature-a/SampleException.cls +17 -0
  90. package/package.json +3 -3
  91. package/src/application/Apexdocs.ts +16 -19
  92. package/src/application/__tests__/apex-file-reader.spec.ts +108 -67
  93. package/src/application/apex-file-reader.ts +1 -0
  94. package/src/application/generators/openapi.ts +17 -13
  95. package/src/cli/args.ts +12 -3
  96. package/src/cli/commands/markdown.ts +15 -12
  97. package/src/cli/commands/openapi.ts +5 -5
  98. package/src/cli/generate.ts +20 -4
  99. package/src/core/markdown/__test__/generating-class-docs.spec.ts +15 -386
  100. package/src/core/markdown/__test__/generating-docs.spec.ts +378 -0
  101. package/src/core/markdown/__test__/generating-enum-docs.spec.ts +4 -328
  102. package/src/core/markdown/__test__/generating-interface-docs.spec.ts +4 -296
  103. package/src/core/markdown/__test__/generating-reference-guide.spec.ts +17 -1
  104. package/src/core/markdown/__test__/test-helpers.ts +3 -1
  105. package/src/core/markdown/adapters/__tests__/interface-adapter.spec.ts +3 -1
  106. package/src/core/markdown/adapters/renderable-to-page-data.ts +6 -4
  107. package/src/core/markdown/generate-docs.ts +13 -15
  108. package/src/core/markdown/reflection/__test__/filter-scope.spec.ts +290 -0
  109. package/src/core/markdown/reflection/__test__/helpers.ts +18 -0
  110. package/src/core/markdown/reflection/__test__/remove-excluded-tags.spec.ts +200 -0
  111. package/src/core/markdown/reflection/remove-excluded-tags.ts +168 -0
  112. package/src/core/markdown/reflection/{sort-members.ts → sort-types-and-members.ts} +7 -5
  113. package/src/core/markdown/templates/reference-guide.ts +2 -2
  114. package/src/core/openapi/__tests__/open-api-docs-processor.spec.ts +6 -3
  115. package/src/core/openapi/open-api-docs-processor.ts +3 -3
  116. package/src/core/openapi/parser.ts +5 -2
  117. package/src/core/shared/types.d.ts +18 -18
  118. package/src/defaults.ts +15 -3
  119. package/src/index.ts +88 -14
  120. package/src/util/error-logger.ts +36 -36
  121. package/src/util/logger.ts +18 -11
  122. /package/examples/{vitepress/force-app/main/default → imported/force-app}/classes/SampleClass.cls +0 -0
  123. /package/examples/{vitepress/force-app/main/default → imported/force-app}/classes/SampleEnum.cls +0 -0
  124. /package/examples/{vitepress/force-app/main/default → imported/force-app}/classes/SampleException.cls +0 -0
  125. /package/examples/vitepress/force-app/main/default/classes/{SampleInterface.cls → feature-a/SampleInterface.cls} +0 -0
@@ -0,0 +1,244 @@
1
+ # SomeDto Class
2
+
3
+ Some description
4
+
5
+ **See** [ASampleClass](miscellaneous/ASampleClass.md)
6
+
7
+ ## Properties
8
+ ### `Items`
9
+
10
+ `AURAENABLED`
11
+
12
+ #### Signature
13
+ ```apex
14
+ public Items
15
+ ```
16
+
17
+ #### Type
18
+ List<CartItemDto>
19
+
20
+ ---
21
+
22
+ ### `SubTotal`
23
+
24
+ `AURAENABLED`
25
+
26
+ #### Signature
27
+ ```apex
28
+ public SubTotal
29
+ ```
30
+
31
+ #### Type
32
+ Decimal
33
+
34
+ ---
35
+
36
+ ### `Total`
37
+
38
+ `AURAENABLED`
39
+
40
+ #### Signature
41
+ ```apex
42
+ public Total
43
+ ```
44
+
45
+ #### Type
46
+ Decimal
47
+
48
+ ---
49
+
50
+ ### `Discounts`
51
+
52
+ `AURAENABLED`
53
+
54
+ #### Signature
55
+ ```apex
56
+ public Discounts
57
+ ```
58
+
59
+ #### Type
60
+ Decimal
61
+
62
+ ## Constructors
63
+ ### `SomeDto(proForma)`
64
+
65
+ Constructs a CartDto
66
+
67
+ #### Signature
68
+ ```apex
69
+ public SomeDto(nams.Order proForma)
70
+ ```
71
+
72
+ #### Parameters
73
+ | Name | Type | Description |
74
+ |------|------|-------------|
75
+ | proForma | nams.Order | The pro forma |
76
+
77
+ ## Classes
78
+ ### CartItemDto Class
79
+
80
+ Used in cartItem.html
81
+
82
+ #### Properties
83
+ ##### `Id`
84
+
85
+ `AURAENABLED`
86
+
87
+ Id Unique identifier for this object.
88
+
89
+ ###### Signature
90
+ ```apex
91
+ public Id
92
+ ```
93
+
94
+ ###### Type
95
+ String
96
+
97
+ ---
98
+
99
+ ##### `Description`
100
+
101
+ `AURAENABLED`
102
+
103
+ Description The description to display for this item.
104
+
105
+ ###### Signature
106
+ ```apex
107
+ public Description
108
+ ```
109
+
110
+ ###### Type
111
+ String
112
+
113
+ ---
114
+
115
+ ##### `Quantity`
116
+
117
+ `AURAENABLED`
118
+
119
+ Quantity Amount of this item currently in the cart.
120
+
121
+ ###### Signature
122
+ ```apex
123
+ public Quantity
124
+ ```
125
+
126
+ ###### Type
127
+ Decimal
128
+
129
+ ---
130
+
131
+ ##### `Price`
132
+
133
+ `AURAENABLED`
134
+
135
+ Price Calculated price for this item.
136
+
137
+ ###### Signature
138
+ ```apex
139
+ public Price
140
+ ```
141
+
142
+ ###### Type
143
+ Decimal
144
+
145
+ ---
146
+
147
+ ##### `CurrencyCode`
148
+
149
+ `AURAENABLED`
150
+
151
+ The currency code for this item.
152
+
153
+ ###### Signature
154
+ ```apex
155
+ public CurrencyCode
156
+ ```
157
+
158
+ ###### Type
159
+ String
160
+
161
+ ---
162
+
163
+ ##### `ProductImage`
164
+
165
+ `AURAENABLED`
166
+
167
+ ProductImage Main display image to display for this item.
168
+
169
+ ###### Signature
170
+ ```apex
171
+ public ProductImage
172
+ ```
173
+
174
+ ###### Type
175
+ String
176
+
177
+ ---
178
+
179
+ ##### `IsDiscounted`
180
+
181
+ `AURAENABLED`
182
+
183
+ IsDiscounted Whether the item has been discounted or not.
184
+
185
+ ###### Signature
186
+ ```apex
187
+ public IsDiscounted
188
+ ```
189
+
190
+ ###### Type
191
+ Boolean
192
+
193
+ ---
194
+
195
+ ##### `AdjustedPrice`
196
+
197
+ `AURAENABLED`
198
+
199
+ AdjustedPrice If the item has been discounted, this contains the adjusted (lower) price.
200
+
201
+ ###### Signature
202
+ ```apex
203
+ public AdjustedPrice
204
+ ```
205
+
206
+ ###### Type
207
+ Decimal
208
+
209
+ ---
210
+
211
+ ##### `DiscountReason`
212
+
213
+ `AURAENABLED`
214
+
215
+ DiscountReason If the item has been discounted, this contains a human-readable reason for the discount.
216
+
217
+ ###### Signature
218
+ ```apex
219
+ public DiscountReason
220
+ ```
221
+
222
+ ###### Type
223
+ String
224
+
225
+ #### Constructors
226
+ ##### `CartItemDto(id, description, quantity, price, currencyCode, productImage, isDiscounted, adjustedAmount, discountReason)`
227
+
228
+ ###### Signature
229
+ ```apex
230
+ public CartItemDto(String id, String description, Decimal quantity, Decimal price, String currencyCode, String productImage, Boolean isDiscounted, Decimal adjustedAmount, String discountReason)
231
+ ```
232
+
233
+ ###### Parameters
234
+ | Name | Type | Description |
235
+ |------|------|-------------|
236
+ | id | String | |
237
+ | description | String | |
238
+ | quantity | Decimal | |
239
+ | price | Decimal | |
240
+ | currencyCode | String | |
241
+ | productImage | String | |
242
+ | isDiscounted | Boolean | |
243
+ | adjustedAmount | Decimal | |
244
+ | discountReason | String | |
@@ -0,0 +1,171 @@
1
+ # SampleClass Class
2
+
3
+ `NAMESPACEACCESSIBLE`
4
+
5
+ This is a class description.
6
+
7
+ **Group** Sample Classes
8
+
9
+ **See** [SampleInterface](sample-interfaces/SampleInterface.md)
10
+
11
+ ## Properties
12
+ ### `MyProp`
13
+
14
+ This is a String property.
15
+
16
+ #### Signature
17
+ ```apex
18
+ public MyProp
19
+ ```
20
+
21
+ #### Type
22
+ String
23
+
24
+ ---
25
+
26
+ ### `AnotherProp`
27
+
28
+ This is a Decimal property.
29
+
30
+ #### Signature
31
+ ```apex
32
+ public AnotherProp
33
+ ```
34
+
35
+ #### Type
36
+ Decimal
37
+
38
+ ## Constructors
39
+ ### `SampleClass()`
40
+
41
+ `NAMESPACEACCESSIBLE`
42
+
43
+ Constructs a SampleClass without any arguments.
44
+
45
+ #### Signature
46
+ ```apex
47
+ public SampleClass()
48
+ ```
49
+
50
+ #### Example
51
+ ```apex
52
+ SampleClass sampleInstance = new SampleClass();
53
+ ```
54
+
55
+ ---
56
+
57
+ ### `SampleClass(argument)`
58
+
59
+ Constructs a SampleClass with an argument.
60
+
61
+ #### Signature
62
+ ```apex
63
+ public SampleClass(String argument)
64
+ ```
65
+
66
+ #### Parameters
67
+ | Name | Type | Description |
68
+ |------|------|-------------|
69
+ | argument | String | Some argument |
70
+
71
+ ## Methods
72
+ ### `someTestMethod(argument)`
73
+
74
+ `NAMESPACEACCESSIBLE`
75
+
76
+ Executes commands based on the passed in argument.
77
+
78
+ #### Signature
79
+ ```apex
80
+ public static String someTestMethod(String argument)
81
+ ```
82
+
83
+ #### Parameters
84
+ | Name | Type | Description |
85
+ |------|------|-------------|
86
+ | argument | String | |
87
+
88
+ #### Return Type
89
+ **String**
90
+
91
+ #### Example
92
+ ```apex
93
+ String result = SampleClass.testMethod();
94
+ System.debug(result);
95
+ ```
96
+
97
+ ---
98
+
99
+ ### `call()`
100
+
101
+ Calls the method.
102
+ This methods allows you to call it.
103
+
104
+ #### Signature
105
+ ```apex
106
+ public static void call()
107
+ ```
108
+
109
+ #### Return Type
110
+ **void**
111
+
112
+ ## Classes
113
+ ### InnerClass Class
114
+
115
+ Inner class belonging to SampleClass.
116
+
117
+ #### Properties
118
+ ##### `InnerProp`
119
+
120
+ Description of the inner property.
121
+
122
+ ###### Signature
123
+ ```apex
124
+ public InnerProp
125
+ ```
126
+
127
+ ###### Type
128
+ String
129
+
130
+ #### Methods
131
+ ##### `innerMethod()`
132
+
133
+ Executes from the inner class.
134
+
135
+ ###### Signature
136
+ ```apex
137
+ public void innerMethod()
138
+ ```
139
+
140
+ ###### Return Type
141
+ **void**
142
+
143
+ ### AnotherInnerClass Class
144
+
145
+ Inner class belonging to SampleClass.
146
+
147
+ #### Properties
148
+ ##### `InnerProp`
149
+
150
+ Description of the inner property.
151
+
152
+ ###### Signature
153
+ ```apex
154
+ public InnerProp
155
+ ```
156
+
157
+ ###### Type
158
+ String
159
+
160
+ #### Methods
161
+ ##### `innerMethod()`
162
+
163
+ Executes from the inner class.
164
+
165
+ ###### Signature
166
+ ```apex
167
+ public void innerMethod()
168
+ ```
169
+
170
+ ###### Return Type
171
+ **void**
@@ -0,0 +1,36 @@
1
+ # SampleInterface Interface
2
+
3
+ This is an interface description.
4
+
5
+ **Group** Sample Interfaces
6
+
7
+ **See** [SampleClass](sample-classes/SampleClass.md)
8
+
9
+ ## Methods
10
+ ### `execute()`
11
+
12
+ Executes the command.
13
+
14
+ #### Signature
15
+ ```apex
16
+ public void execute()
17
+ ```
18
+
19
+ #### Return Type
20
+ **void**
21
+
22
+ ---
23
+
24
+ ### `getValue()`
25
+
26
+ Returns a value based on the executed command.
27
+
28
+ #### Signature
29
+ ```apex
30
+ public String getValue()
31
+ ```
32
+
33
+ #### Return Type
34
+ **String**
35
+
36
+ Empty value