@cparra/apexdocs 2.22.0 → 2.23.0-beta.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.
- package/README.md +52 -16
- package/apexdocs.config.ts +3 -1
- package/docs/types/Classes/nspc.ChildClass.md +97 -94
- package/docs/types/Main/nspc.SampleClass.md +189 -189
- package/examples/force-app/main/default/classes/ChildClass.cls +1 -0
- package/lib/cli/generate.js +7 -1
- package/lib/cli/generate.js.map +1 -1
- package/lib/model/markdown-generation-util/field-declaration-util.js +1 -9
- package/lib/model/markdown-generation-util/field-declaration-util.js.map +1 -1
- package/lib/model/markdown-type-file.js +1 -9
- package/lib/model/markdown-type-file.js.map +1 -1
- package/lib/service/walkers/class-walker.js +6 -6
- package/lib/service/walkers/class-walker.js.map +1 -1
- package/lib/service/walkers/enum-walker.js.map +1 -1
- package/lib/service/walkers/interface-walker.js +1 -1
- package/lib/service/walkers/interface-walker.js.map +1 -1
- package/lib/service/walkers/walker.d.ts +3 -0
- package/lib/service/walkers/walker.js +7 -0
- package/lib/service/walkers/walker.js.map +1 -1
- package/lib/settings.d.ts +11 -0
- package/lib/settings.js +10 -0
- package/lib/settings.js.map +1 -1
- package/lib/transpiler/markdown/class-file-generatorHelper.js +2 -2
- package/lib/transpiler/markdown/class-file-generatorHelper.js.map +1 -1
- package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.d.ts +2 -1
- package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js +26 -3
- package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/generate.ts +6 -0
- package/src/model/markdown-generation-util/field-declaration-util.ts +3 -9
- package/src/model/markdown-type-file.ts +4 -10
- package/src/service/walkers/class-walker.ts +6 -7
- package/src/service/walkers/enum-walker.ts +0 -1
- package/src/service/walkers/interface-walker.ts +1 -1
- package/src/service/walkers/walker.ts +8 -1
- package/src/settings.ts +21 -0
- package/src/transpiler/markdown/class-file-generatorHelper.ts +2 -2
- package/src/transpiler/markdown/jekyll/jekyll-docsProcessor.ts +26 -3
- package/ROADMAP.md +0 -16
|
@@ -1,189 +1,189 @@
|
|
|
1
|
-
# virtual nspc.SampleClass
|
|
2
|
-
|
|
3
|
-
`NAMESPACEACCESSIBLE`
|
|
4
|
-
|
|
5
|
-
This is a class description. This class relates to [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
6
|
-
But this [ClassThatDoesNotExist](ClassThatDoesNotExist) does not exist.
|
|
7
|
-
You can also link using this syntax [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
**Group** Main
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
**CustomAnnotation** A Custom annotation
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
**Author** Cesar Parra
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
**See** [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
20
|
-
|
|
21
|
-
## Constructors
|
|
22
|
-
### My Super Group
|
|
23
|
-
##### `public SampleClass()`
|
|
24
|
-
|
|
25
|
-
`NAMESPACEACCESSIBLE`
|
|
26
|
-
|
|
27
|
-
Constructs a SampleClass without any arguments. This relates to [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
28
|
-
|
|
29
|
-
###### Throws
|
|
30
|
-
|
|
31
|
-
|Exception|Description|
|
|
32
|
-
|---|---|
|
|
33
|
-
|`ExcName`|some exception|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
**CustomAnnotation** A Custom method annotation
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
**See** [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
40
|
-
|
|
41
|
-
###### Example
|
|
42
|
-
```apex
|
|
43
|
-
// Example
|
|
44
|
-
SampleClass sampleInstance = new SampleClass();
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
### Other
|
|
50
|
-
##### `public SampleClass(String argument1, String argument2)`
|
|
51
|
-
|
|
52
|
-
Constructs a SampleClass with an argument.
|
|
53
|
-
|
|
54
|
-
###### Parameters
|
|
55
|
-
|
|
56
|
-
|Param|Description|
|
|
57
|
-
|---|---|
|
|
58
|
-
|`argument1`|Argument1 definition|
|
|
59
|
-
|`argument2`|Argument2 definition|
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
## Fields
|
|
63
|
-
### Common Constants
|
|
64
|
-
|
|
65
|
-
* `public
|
|
66
|
-
* `public
|
|
67
|
-
* `public listOfStrings` → `List<String>`
|
|
68
|
-
---
|
|
69
|
-
### 'General' Constants
|
|
70
|
-
|
|
71
|
-
* `public
|
|
72
|
-
* `public
|
|
73
|
-
---
|
|
74
|
-
### Other
|
|
75
|
-
|
|
76
|
-
* `
|
|
77
|
-
---
|
|
78
|
-
### Other
|
|
79
|
-
|
|
80
|
-
* `
|
|
81
|
-
---
|
|
82
|
-
## Properties
|
|
83
|
-
|
|
84
|
-
### `public AnotherProp` → `Decimal`
|
|
85
|
-
|
|
86
|
-
`AURAENABLED`
|
|
87
|
-
|
|
88
|
-
This is a Decimal property.
|
|
89
|
-
|
|
90
|
-
### `public MyProp` → `String`
|
|
91
|
-
|
|
92
|
-
`AURAENABLED`
|
|
93
|
-
`DEPRECATED`
|
|
94
|
-
|
|
95
|
-
This is a String property.
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
## Methods
|
|
99
|
-
### A method group
|
|
100
|
-
##### `public static String
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
######
|
|
114
|
-
|
|
115
|
-
|
|
|
116
|
-
|---|---|
|
|
117
|
-
|`
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
##### `public static Map<Id,List<String>> yetAnotherSampleMethod(String arg1)`
|
|
134
|
-
---
|
|
135
|
-
### Other
|
|
136
|
-
##### `public static void call()`
|
|
137
|
-
|
|
138
|
-
Calls the method. This methods allows you to call it.
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
## Enums
|
|
142
|
-
### InnerEnum
|
|
143
|
-
|
|
144
|
-
`NAMESPACEACCESSIBLE`
|
|
145
|
-
|
|
146
|
-
This is a namespace accessible enum
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
## Classes
|
|
151
|
-
### AnotherInnerClass
|
|
152
|
-
|
|
153
|
-
Inner class belonging to SampleClass.
|
|
154
|
-
|
|
155
|
-
#### Properties
|
|
156
|
-
|
|
157
|
-
##### `public InnerProp` → `String`
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
Description of the inner property.
|
|
161
|
-
|
|
162
|
-
---
|
|
163
|
-
#### Methods
|
|
164
|
-
##### `public void innerMethod()`
|
|
165
|
-
|
|
166
|
-
Executes from the inner class.
|
|
167
|
-
|
|
168
|
-
---
|
|
169
|
-
|
|
170
|
-
### InnerClass
|
|
171
|
-
|
|
172
|
-
Inner class belonging to SampleClass.
|
|
173
|
-
|
|
174
|
-
#### Properties
|
|
175
|
-
|
|
176
|
-
##### `public InnerProp` → `String`
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
Description of the inner property.
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
#### Methods
|
|
183
|
-
##### `public void innerMethod()`
|
|
184
|
-
|
|
185
|
-
Executes from the inner class.
|
|
186
|
-
|
|
187
|
-
---
|
|
188
|
-
|
|
189
|
-
---
|
|
1
|
+
# virtual nspc.SampleClass
|
|
2
|
+
|
|
3
|
+
`NAMESPACEACCESSIBLE`
|
|
4
|
+
|
|
5
|
+
This is a class description. This class relates to [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
6
|
+
But this [ClassThatDoesNotExist](ClassThatDoesNotExist) does not exist.
|
|
7
|
+
You can also link using this syntax [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
**Group** Main
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
**CustomAnnotation** A Custom annotation
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
**Author** Cesar Parra
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
**See** [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
20
|
+
|
|
21
|
+
## Constructors
|
|
22
|
+
### My Super Group
|
|
23
|
+
##### `public SampleClass()`
|
|
24
|
+
|
|
25
|
+
`NAMESPACEACCESSIBLE`
|
|
26
|
+
|
|
27
|
+
Constructs a SampleClass without any arguments. This relates to [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
28
|
+
|
|
29
|
+
###### Throws
|
|
30
|
+
|
|
31
|
+
|Exception|Description|
|
|
32
|
+
|---|---|
|
|
33
|
+
|`ExcName`|some exception|
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
**CustomAnnotation** A Custom method annotation
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
**See** [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
40
|
+
|
|
41
|
+
###### Example
|
|
42
|
+
```apex
|
|
43
|
+
// Example
|
|
44
|
+
SampleClass sampleInstance = new SampleClass();
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
### Other
|
|
50
|
+
##### `public SampleClass(String argument1, String argument2)`
|
|
51
|
+
|
|
52
|
+
Constructs a SampleClass with an argument.
|
|
53
|
+
|
|
54
|
+
###### Parameters
|
|
55
|
+
|
|
56
|
+
|Param|Description|
|
|
57
|
+
|---|---|
|
|
58
|
+
|`argument1`|Argument1 definition|
|
|
59
|
+
|`argument2`|Argument2 definition|
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
## Fields
|
|
63
|
+
### Common Constants
|
|
64
|
+
|
|
65
|
+
* `public A_CONSTANT` → `String` [`NAMESPACEACCESSIBLE` ] - This is a constant.
|
|
66
|
+
* `public ANOTHER_CONSTANT` → `String`
|
|
67
|
+
* `public listOfStrings` → `List<String>`
|
|
68
|
+
---
|
|
69
|
+
### 'General' Constants
|
|
70
|
+
|
|
71
|
+
* `public GENERAL_A_CONSTANT` → `String` [`NAMESPACEACCESSIBLE` ] - This is a constant.
|
|
72
|
+
* `public GENERAL_ANOTHER_CONSTANT` → `String`
|
|
73
|
+
---
|
|
74
|
+
### Other
|
|
75
|
+
|
|
76
|
+
* `private somePrivateStuff` → `String`
|
|
77
|
+
---
|
|
78
|
+
### Other variables
|
|
79
|
+
|
|
80
|
+
* `public someVariable` → `String`
|
|
81
|
+
---
|
|
82
|
+
## Properties
|
|
83
|
+
|
|
84
|
+
### `public AnotherProp` → `Decimal`
|
|
85
|
+
|
|
86
|
+
`AURAENABLED`
|
|
87
|
+
|
|
88
|
+
This is a Decimal property.
|
|
89
|
+
|
|
90
|
+
### `public MyProp` → `String`
|
|
91
|
+
|
|
92
|
+
`AURAENABLED`
|
|
93
|
+
`DEPRECATED`
|
|
94
|
+
|
|
95
|
+
This is a String property.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
## Methods
|
|
99
|
+
### A method group
|
|
100
|
+
##### `public static String anotherSampleMethod(String arg1)`
|
|
101
|
+
|
|
102
|
+
Something here
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
**Arg1** The arg1 description
|
|
106
|
+
|
|
107
|
+
##### `public static String sampleMethod(String argument1, String argument2)`
|
|
108
|
+
|
|
109
|
+
`NAMESPACEACCESSIBLE`
|
|
110
|
+
|
|
111
|
+
Executes commands based on the passed in argument.
|
|
112
|
+
|
|
113
|
+
###### Parameters
|
|
114
|
+
|
|
115
|
+
|Param|Description|
|
|
116
|
+
|---|---|
|
|
117
|
+
|`argument1`|Argument1 to debug|
|
|
118
|
+
|`argument2`|Argument2 to debug|
|
|
119
|
+
|
|
120
|
+
###### Returns
|
|
121
|
+
|
|
122
|
+
|Type|Description|
|
|
123
|
+
|---|---|
|
|
124
|
+
|`String`|Empty string|
|
|
125
|
+
|
|
126
|
+
###### Example
|
|
127
|
+
```apex
|
|
128
|
+
String result = SampleClass.testMethod();
|
|
129
|
+
System.debug(result);
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
##### `public static Map<Id,List<String>> yetAnotherSampleMethod(String arg1)`
|
|
134
|
+
---
|
|
135
|
+
### Other
|
|
136
|
+
##### `public static void call()`
|
|
137
|
+
|
|
138
|
+
Calls the method. This methods allows you to call it.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
## Enums
|
|
142
|
+
### InnerEnum
|
|
143
|
+
|
|
144
|
+
`NAMESPACEACCESSIBLE`
|
|
145
|
+
|
|
146
|
+
This is a namespace accessible enum
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
## Classes
|
|
151
|
+
### AnotherInnerClass
|
|
152
|
+
|
|
153
|
+
Inner class belonging to SampleClass.
|
|
154
|
+
|
|
155
|
+
#### Properties
|
|
156
|
+
|
|
157
|
+
##### `public InnerProp` → `String`
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
Description of the inner property.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
#### Methods
|
|
164
|
+
##### `public void innerMethod()`
|
|
165
|
+
|
|
166
|
+
Executes from the inner class.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
### InnerClass
|
|
171
|
+
|
|
172
|
+
Inner class belonging to SampleClass.
|
|
173
|
+
|
|
174
|
+
#### Properties
|
|
175
|
+
|
|
176
|
+
##### `public InnerProp` → `String`
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
Description of the inner property.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
#### Methods
|
|
183
|
+
##### `public void innerMethod()`
|
|
184
|
+
|
|
185
|
+
Executes from the inner class.
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
---
|
package/lib/cli/generate.js
CHANGED
|
@@ -7,7 +7,7 @@ const Apexdocs_1 = require("../application/Apexdocs");
|
|
|
7
7
|
const cosmiconfig_1 = require("cosmiconfig");
|
|
8
8
|
const result = (0, cosmiconfig_1.cosmiconfig)('apexdocs').search();
|
|
9
9
|
result.then((config) => {
|
|
10
|
-
var _a, _b;
|
|
10
|
+
var _a, _b, _c;
|
|
11
11
|
let argv = yargs.options({
|
|
12
12
|
sourceDir: {
|
|
13
13
|
type: 'string',
|
|
@@ -81,6 +81,10 @@ result.then((config) => {
|
|
|
81
81
|
describe: 'If using "openapi" as the target generator, this allows you to specify the name of the output file.',
|
|
82
82
|
default: 'openapi',
|
|
83
83
|
},
|
|
84
|
+
sortMembersAlphabetically: {
|
|
85
|
+
type: 'boolean',
|
|
86
|
+
describe: 'Whether to sort members alphabetically.',
|
|
87
|
+
},
|
|
84
88
|
includeMetadata: {
|
|
85
89
|
type: 'boolean',
|
|
86
90
|
describe: "Whether to include the file's meta.xml information: Whether it is active and and the API version",
|
|
@@ -107,10 +111,12 @@ result.then((config) => {
|
|
|
107
111
|
title: argv.title,
|
|
108
112
|
namespace: argv.namespace,
|
|
109
113
|
openApiFileName: argv.openApiFileName,
|
|
114
|
+
sortMembersAlphabetically: argv.sortMembersAlphabetically,
|
|
110
115
|
includeMetadata: argv.includeMetadata,
|
|
111
116
|
rootDir: argv.documentationRootDir,
|
|
112
117
|
onAfterProcess: (_a = config === null || config === void 0 ? void 0 : config.config) === null || _a === void 0 ? void 0 : _a.onAfterProcess,
|
|
113
118
|
onBeforeFileWrite: (_b = config === null || config === void 0 ? void 0 : config.config) === null || _b === void 0 ? void 0 : _b.onBeforeFileWrite,
|
|
119
|
+
frontMatterHeader: (_c = config === null || config === void 0 ? void 0 : config.config) === null || _c === void 0 ? void 0 : _c.frontMatterHeader,
|
|
114
120
|
});
|
|
115
121
|
try {
|
|
116
122
|
Apexdocs_1.Apexdocs.generate();
|
package/lib/cli/generate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/cli/generate.ts"],"names":[],"mappings":";;;AACA,+BAA+B;AAE/B,0CAAuC;AACvC,sDAAmD;AAEnD,6CAA0C;AAE1C,MAAM,MAAM,GAAG,IAAA,yBAAW,EAAC,UAAU,CAAC,CAAC,MAAM,EAAE,CAAC;AAChD,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;;IACrB,IAAI,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC;QACvB,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,GAAG;YACV,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,+DAA+D;SAC1E;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,SAAS;YAClB,QAAQ,EAAE,kEAAkE;SAC7E;QACD,SAAS,EAAE;YACT,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,kFAAkF;SAC7F;QACD,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,CAAC,QAAQ,CAAC;YACnB,QAAQ,EACN,sHAAsH;gBACtH,4HAA4H;gBAC5H,0IAA0I;SAC7I;QACD,eAAe,EAAE;YACf,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,CAAC,QAAQ,EA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,MAAM,CAAE,MAAM,0CAAE,iBAAiB;QACpD,iBAAiB,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,0CAAE,iBAAiB;KACrD,CAAC,CAAC;IAEH,IAAI;QACF,mBAAQ,CAAC,QAAQ,EAAE,CAAC;KACrB;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -3,15 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.declareField = void 0;
|
|
4
4
|
function declareField(markdownFile, fields, startingHeadingLevel, grouped = false) {
|
|
5
5
|
markdownFile.addBlankLine();
|
|
6
|
-
fields
|
|
7
|
-
.sort((propA, propB) => {
|
|
8
|
-
if (propA.name < propB.name)
|
|
9
|
-
return -1;
|
|
10
|
-
if (propA.name > propB.name)
|
|
11
|
-
return 1;
|
|
12
|
-
return 0;
|
|
13
|
-
})
|
|
14
|
-
.forEach((propertyModel) => {
|
|
6
|
+
fields.forEach((propertyModel) => {
|
|
15
7
|
addFieldSection(markdownFile, propertyModel, startingHeadingLevel, grouped);
|
|
16
8
|
});
|
|
17
9
|
markdownFile.addHorizontalRule();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-declaration-util.js","sourceRoot":"","sources":["../../../src/model/markdown-generation-util/field-declaration-util.ts"],"names":[],"mappings":";;;AAGA,SAAgB,YAAY,CAC1B,YAA0B,EAC1B,MAAsE,EACtE,oBAA4B,EAC5B,OAAO,GAAG,KAAK;IAEf,YAAY,CAAC,YAAY,EAAE,CAAC;IAC5B,MAAM
|
|
1
|
+
{"version":3,"file":"field-declaration-util.js","sourceRoot":"","sources":["../../../src/model/markdown-generation-util/field-declaration-util.ts"],"names":[],"mappings":";;;AAGA,SAAgB,YAAY,CAC1B,YAA0B,EAC1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YAClB,WAAW,IAAI,IAAI,CAAC;SACrB;QACD,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;YAC7C,WAAW,IAAI,KAAK,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC;QACzD,CAAC,CAAC,CAAC;QACH,IAAI,cAAc,EAAE;YAClB,WAAW,IAAI,GAAG,CAAC;SACpB;QAED,gDAAgD;QAChD,IAAI,WAAW,GAAG,EAAE,CAAC;QACrB,IAAI,MAAA,WAAW,CAAC,UAAU,0CAAE,WAAW,EAAE;YACvC,WAAW,GAAG,MAAM,MAAA,WAAW,CAAC,UAAU,0CAAE,WAAW,EAAE,CAAC;SAC3D;QAED,IAAI,YAAY,GAAG,KAAK,WAAW,CAAC,eAAe,IAAI,WAAW,CAAC,IAAI,UAAU,WAAW,CAAC,aAAa,CAAC,cAAc,IAAI,CAAC;QAC9H,IAAI,WAAW,CAAC,SAAS,EAAE;YACzB,YAAY,IAAI,eAAe,CAAC;SACjC;QACD,YAAY,IAAI,GAAG,WAAW,IAAI,WAAW,EAAE,CAAC;QAEhD,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QACvC,YAAY,CAAC,YAAY,EAAE,CAAC;KAC7B;AACH,CAAC"}
|
|
@@ -66,15 +66,7 @@ class MarkdownTypeFile extends markdown_file_1.MarkdownFile {
|
|
|
66
66
|
}
|
|
67
67
|
addInnerTypes(title, types, addSeparator = true) {
|
|
68
68
|
this.addTitle(title, this.headingLevel + 1);
|
|
69
|
-
types
|
|
70
|
-
.sort((typeA, typeB) => {
|
|
71
|
-
if (typeA.name < typeB.name)
|
|
72
|
-
return -1;
|
|
73
|
-
if (typeA.name > typeB.name)
|
|
74
|
-
return 1;
|
|
75
|
-
return 0;
|
|
76
|
-
})
|
|
77
|
-
.forEach((currentType) => {
|
|
69
|
+
types.forEach((currentType) => {
|
|
78
70
|
const innerFile = new MarkdownTypeFile(currentType, this.headingLevel + 2, undefined, true);
|
|
79
71
|
this.addText(innerFile._contents);
|
|
80
72
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-type-file.js","sourceRoot":"","sources":["../../src/model/markdown-type-file.ts"],"names":[],"mappings":";;;AAQA,sEAAkE;AAElE,mDAA+C;AAC/C,yEAAsF;AACtF,kGAAyF;AAEzF,0CAAuC;AAWvC,MAAa,gBAAiB,SAAQ,4BAAY;IAChD,YAAoB,IAAU,EAAU,eAAuB,CAAC,EAAE,aAAsB,EAAU,UAAU,KAAK;QAC/G,KAAK,CACH,GAAG,mBAAQ,CAAC,WAAW,EAAE,CAAC,kBAAkB,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,EAC5D,oCAAwB,CAAC,iBAAiB,CAAC,IAAI,CAAC,CACjD,CAAC;QAJgB,SAAI,GAAJ,IAAI,CAAM;QAAU,iBAAY,GAAZ,YAAY,CAAY;QAAkC,YAAO,GAAP,OAAO,CAAQ;QAK/G,IAAI,aAAa,EAAE;YACjB,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;SAC7B;QACD,MAAM,MAAM,GAAG,8BAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAEM,iBAAiB,CAAC,UAAgB;QACvC,IAAI,YAAY,CAAC;QACjB,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,YAAY,GAAG,UAAU,CAAC,IAAI,CAAC;SAChC;aAAM;YACL,qEAAqE;YACrE,mCAAmC;YACnC,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,aAAa,EAAE;gBACxD,YAAY,GAAG,GAAG,UAAU,CAAC,aAAa,IAAI,mBAAQ,CAAC,WAAW,EAAE,CAAC,kBAAkB,EAAE,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;aAC/G;iBAAM;gBACL,YAAY,GAAG,GAAG,mBAAQ,CA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G,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QAC1C,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC5C,IAAI,gBAAgB,EAAE;YACpB,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;SAChC;IACH,CAAC;IAEO,QAAQ;QACd,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;IAC5C,CAAC;IAEO,KAAK,CAAC,IAAkB;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,MAAgB,EAAE,IAAI,EAAE,EAAE;;YAC5C,MAAM,SAAS,GAAW,MAAA,IAAI,CAAC,KAAK,mCAAI,OAAO,CAAC;YAChD,MAAM,KAAK,GAAiB,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;YACpD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjB,MAAM,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;YAC1B,OAAO,MAAM,CAAC;QAChB,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC;CACF;AA3ID,4CA2IC"}
|
|
@@ -10,22 +10,22 @@ class ClassWalker extends walker_1.Walker {
|
|
|
10
10
|
listener.onConstructorDeclaration(this.type.name, classMirror.constructors);
|
|
11
11
|
}
|
|
12
12
|
if (classMirror.fields.length) {
|
|
13
|
-
listener.onFieldsDeclaration(classMirror.fields);
|
|
13
|
+
listener.onFieldsDeclaration(this.sortType(classMirror.fields));
|
|
14
14
|
}
|
|
15
15
|
if (classMirror.properties.length) {
|
|
16
|
-
listener.onPropertiesDeclaration(classMirror.properties);
|
|
16
|
+
listener.onPropertiesDeclaration(this.sortType(classMirror.properties));
|
|
17
17
|
}
|
|
18
18
|
if (classMirror.methods.length) {
|
|
19
|
-
listener.onMethodsDeclaration(classMirror.methods);
|
|
19
|
+
listener.onMethodsDeclaration(this.sortType(classMirror.methods));
|
|
20
20
|
}
|
|
21
21
|
if (classMirror.enums.length) {
|
|
22
|
-
listener.onInnerEnumsDeclaration(classMirror.enums);
|
|
22
|
+
listener.onInnerEnumsDeclaration(this.sortType(classMirror.enums));
|
|
23
23
|
}
|
|
24
24
|
if (classMirror.classes.length) {
|
|
25
|
-
listener.onInnerClassesDeclaration(classMirror.classes);
|
|
25
|
+
listener.onInnerClassesDeclaration(this.sortType(classMirror.classes));
|
|
26
26
|
}
|
|
27
27
|
if (classMirror.interfaces.length) {
|
|
28
|
-
listener.onInnerInterfacesDeclaration(classMirror.interfaces);
|
|
28
|
+
listener.onInnerInterfacesDeclaration(this.sortType(classMirror.interfaces));
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class-walker.js","sourceRoot":"","sources":["../../../src/service/walkers/class-walker.ts"],"names":[],"mappings":";;;AAAA,qCAAkD;AAGlD,MAAa,WAAY,SAAQ,eAAM;IACrC,IAAI,CAAC,QAAwB;QAC3B,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtC,MAAM,WAAW,GAAG,IAAI,CAAC,IAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"class-walker.js","sourceRoot":"","sources":["../../../src/service/walkers/class-walker.ts"],"names":[],"mappings":";;;AAAA,qCAAkD;AAGlD,MAAa,WAAY,SAAQ,eAAM;IACrC,IAAI,CAAC,QAAwB;QAC3B,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtC,MAAM,WAAW,GAAG,IAAI,CAAC,IAAmB,CAAC;QAC7C,IAAI,WAAW,CAAC,YAAY,CAAC,MAAM,EAAE;YACnC,QAAQ,CAAC,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;SAC7E;QACD,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE;YAC7B,QAAQ,CAAC,mBAAmB,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;SACjE;QACD,IAAI,WAAW,CAAC,UAAU,CAAC,MAAM,EAAE;YACjC,QAAQ,CAAC,uBAAuB,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;SACzE;QACD,IAAI,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE;YAC9B,QAAQ,CAAC,oBAAoB,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;SACnE;QACD,IAAI,WAAW,CAAC,KAAK,CAAC,MAAM,EAAE;YAC5B,QAAQ,CAAC,uBAAuB,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;SACpE;QACD,IAAI,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE;YAC9B,QAAQ,CAAC,yBAAyB,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;SACxE;QACD,IAAI,WAAW,CAAC,UAAU,CAAC,MAAM,EAAE;YACjC,QAAQ,CAAC,4BAA4B,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;SAC9E;IACH,CAAC;CACF;AA1BD,kCA0BC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum-walker.js","sourceRoot":"","sources":["../../../src/service/walkers/enum-walker.ts"],"names":[],"mappings":";;;AAAA,qCAAkD;
|
|
1
|
+
{"version":3,"file":"enum-walker.js","sourceRoot":"","sources":["../../../src/service/walkers/enum-walker.ts"],"names":[],"mappings":";;;AAAA,qCAAkD;AAElD,MAAa,UAAW,SAAQ,eAAM;IACpC,IAAI,CAAC,QAAwB;QAC3B,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;CACF;AAJD,gCAIC"}
|
|
@@ -7,7 +7,7 @@ class InterfaceWalker extends walker_1.Walker {
|
|
|
7
7
|
listener.onTypeDeclaration(this.type);
|
|
8
8
|
const interfaceMirror = this.type;
|
|
9
9
|
if (interfaceMirror.methods.length) {
|
|
10
|
-
listener.onMethodsDeclaration(interfaceMirror.methods);
|
|
10
|
+
listener.onMethodsDeclaration(this.sortType(interfaceMirror.methods));
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface-walker.js","sourceRoot":"","sources":["../../../src/service/walkers/interface-walker.ts"],"names":[],"mappings":";;;AAAA,qCAAkD;AAGlD,MAAa,eAAgB,SAAQ,eAAM;IACzC,IAAI,CAAC,QAAwB;QAC3B,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtC,MAAM,eAAe,GAAG,IAAI,CAAC,IAAuB,CAAC;QACrD,IAAI,eAAe,CAAC,OAAO,CAAC,MAAM,EAAE;YAClC,QAAQ,CAAC,oBAAoB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"interface-walker.js","sourceRoot":"","sources":["../../../src/service/walkers/interface-walker.ts"],"names":[],"mappings":";;;AAAA,qCAAkD;AAGlD,MAAa,eAAgB,SAAQ,eAAM;IACzC,IAAI,CAAC,QAAwB;QAC3B,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtC,MAAM,eAAe,GAAG,IAAI,CAAC,IAAuB,CAAC;QACrD,IAAI,eAAe,CAAC,OAAO,CAAC,MAAM,EAAE;YAClC,QAAQ,CAAC,oBAAoB,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;SACvE;IACH,CAAC;CACF;AARD,0CAQC"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Walker = void 0;
|
|
4
|
+
const settings_1 = require("../../settings");
|
|
4
5
|
class Walker {
|
|
5
6
|
constructor(type) {
|
|
6
7
|
this.type = type;
|
|
7
8
|
}
|
|
9
|
+
sortType(types) {
|
|
10
|
+
if (settings_1.Settings.getInstance().sortMembersAlphabetically()) {
|
|
11
|
+
return types.sort((a, b) => a.name.localeCompare(b.name));
|
|
12
|
+
}
|
|
13
|
+
return types;
|
|
14
|
+
}
|
|
8
15
|
}
|
|
9
16
|
exports.Walker = Walker;
|
|
10
17
|
//# sourceMappingURL=walker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walker.js","sourceRoot":"","sources":["../../../src/service/walkers/walker.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"walker.js","sourceRoot":"","sources":["../../../src/service/walkers/walker.ts"],"names":[],"mappings":";;;AAUA,6CAA0C;AAoB1C,MAAsB,MAAM;IAC1B,YAAmB,IAAU;QAAV,SAAI,GAAJ,IAAI,CAAM;IAAG,CAAC;IAIvB,QAAQ,CAA6B,KAAU;QACvD,IAAI,mBAAQ,CAAC,WAAW,EAAE,CAAC,yBAAyB,EAAE,EAAE;YACtD,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;SAC3D;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAXD,wBAWC"}
|
package/lib/settings.d.ts
CHANGED
|
@@ -9,6 +9,13 @@ export type OutputDir = {
|
|
|
9
9
|
baseDir: string;
|
|
10
10
|
fileDir: string;
|
|
11
11
|
};
|
|
12
|
+
export type TargetType = {
|
|
13
|
+
name: string;
|
|
14
|
+
typeName: 'class' | 'interface' | 'enum';
|
|
15
|
+
accessModifier: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
group?: string;
|
|
18
|
+
};
|
|
12
19
|
export interface SettingsConfig {
|
|
13
20
|
sourceDirectory: string;
|
|
14
21
|
recursive: boolean;
|
|
@@ -24,8 +31,10 @@ export interface SettingsConfig {
|
|
|
24
31
|
openApiFileName: string;
|
|
25
32
|
includeMetadata: boolean;
|
|
26
33
|
rootDir?: string;
|
|
34
|
+
sortMembersAlphabetically?: boolean;
|
|
27
35
|
onAfterProcess?: (files: TargetFile[]) => void;
|
|
28
36
|
onBeforeFileWrite?: (file: TargetFile) => TargetFile;
|
|
37
|
+
frontMatterHeader?: (file: TargetType) => string[];
|
|
29
38
|
}
|
|
30
39
|
export declare class Settings {
|
|
31
40
|
config: SettingsConfig;
|
|
@@ -47,7 +56,9 @@ export declare class Settings {
|
|
|
47
56
|
getNamespacePrefix(): string;
|
|
48
57
|
openApiFileName(): string;
|
|
49
58
|
includeMetadata(): boolean;
|
|
59
|
+
sortMembersAlphabetically(): boolean;
|
|
50
60
|
getRootDir(): string | undefined;
|
|
51
61
|
onAfterProcess(files: TargetFile[]): void;
|
|
52
62
|
onBeforeFileWrite(file: TargetFile): TargetFile;
|
|
63
|
+
frontMatterHeader(file: TargetType): string[];
|
|
53
64
|
}
|
package/lib/settings.js
CHANGED
|
@@ -60,6 +60,10 @@ class Settings {
|
|
|
60
60
|
includeMetadata() {
|
|
61
61
|
return this.config.includeMetadata;
|
|
62
62
|
}
|
|
63
|
+
sortMembersAlphabetically() {
|
|
64
|
+
var _a;
|
|
65
|
+
return (_a = this.config.sortMembersAlphabetically) !== null && _a !== void 0 ? _a : false;
|
|
66
|
+
}
|
|
63
67
|
getRootDir() {
|
|
64
68
|
return this.config.rootDir;
|
|
65
69
|
}
|
|
@@ -74,6 +78,12 @@ class Settings {
|
|
|
74
78
|
}
|
|
75
79
|
return file;
|
|
76
80
|
}
|
|
81
|
+
frontMatterHeader(file) {
|
|
82
|
+
if (this.config.frontMatterHeader) {
|
|
83
|
+
return this.config.frontMatterHeader(file);
|
|
84
|
+
}
|
|
85
|
+
return [];
|
|
86
|
+
}
|
|
77
87
|
}
|
|
78
88
|
exports.Settings = Settings;
|
|
79
89
|
//# sourceMappingURL=settings.js.map
|