@cparra/apexdocs 2.14.0 → 2.15.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 +16 -15
- package/docs/README.md +1 -84
- package/docs/types/Classes/nspc.AnotherInterface.md +7 -0
- package/docs/{Misc-Group → types/Classes}/nspc.ChildClass.md +9 -3
- package/docs/{Main → types/Main}/nspc.GroupedClass.md +1 -1
- package/docs/{Main → types/Main}/nspc.SampleClass.md +5 -5
- package/docs/{Misc-Group → types/Misc-Group}/nspc.InterfaceWithInheritance.md +2 -2
- package/docs/{Misc-Group → types/Misc-Group}/nspc.ParentClass.md +1 -1
- package/docs/types/README.md +91 -0
- package/examples/force-app/main/default/classes/AnotherInterface.cls +4 -0
- package/examples/force-app/main/default/classes/ChildClass.cls +4 -0
- package/lib/cli/generate.js +5 -0
- package/lib/cli/generate.js.map +1 -1
- package/lib/settings.d.ts +2 -0
- package/lib/settings.js +3 -0
- package/lib/settings.js.map +1 -1
- package/lib/transpiler/markdown/class-file-generatorHelper.js +3 -1
- package/lib/transpiler/markdown/class-file-generatorHelper.js.map +1 -1
- package/package.json +2 -2
- package/src/cli/generate.ts +6 -0
- package/src/settings.ts +5 -0
- package/src/transpiler/markdown/class-file-generatorHelper.ts +2 -1
- package/docs/Misc-Group/nspc.AnotherInterface.md +0 -1
- /package/docs/{Misc-Group → types/Misc-Group}/nspc.GrandparentClass.md +0 -0
- /package/docs/{Misc-Group → types/Misc-Group}/nspc.MemberGrouping.md +0 -0
- /package/docs/{Misc-Group → types/Misc-Group}/nspc.Reference1.md +0 -0
- /package/docs/{Misc-Group → types/Misc-Group}/nspc.Reference2.md +0 -0
- /package/docs/{Misc-Group → types/Misc-Group}/nspc.Reference3.md +0 -0
- /package/docs/{Misc-Group → types/Misc-Group}/nspc.Reference4.md +0 -0
- /package/docs/{Misc-Group → types/Misc-Group}/nspc.Reference5.md +0 -0
- /package/docs/{Misc-Group → types/Misc-Group}/nspc.Reference6.md +0 -0
- /package/docs/{Misc-Group → types/Misc-Group}/nspc.Reference7.md +0 -0
- /package/docs/{Misc-Group → types/Misc-Group}/nspc.SampleClassWithoutModifier.md +0 -0
- /package/docs/{Misc-Group → types/Misc-Group}/nspc.SampleRestResource.md +0 -0
- /package/docs/{Misc-Group → types/Misc-Group}/nspc.SampleRestResourceWithInnerClass.md +0 -0
- /package/docs/{Misc-Group → types/Misc-Group}/nspc.SampleRestResourceWithoutApexDocs.md +0 -0
- /package/docs/{Sample-Interfaces → types/Sample-Interfaces}/nspc.SampleInterface.md +0 -0
package/README.md
CHANGED
|
@@ -118,21 +118,22 @@ apexdocs-generate
|
|
|
118
118
|
|
|
119
119
|
The CLI supports the following parameters:
|
|
120
120
|
|
|
121
|
-
| Parameter
|
|
122
|
-
|
|
123
|
-
| --sourceDir
|
|
124
|
-
| --targetDir
|
|
125
|
-
| --recursive
|
|
126
|
-
| --scope
|
|
127
|
-
| --targetGenerator
|
|
128
|
-
| --indexOnly
|
|
129
|
-
| --defaultGroupName
|
|
130
|
-
| --sanitizeHtml
|
|
131
|
-
| --openApiTitle
|
|
132
|
-
| --title
|
|
133
|
-
| --namespace
|
|
134
|
-
| --openApiFileName
|
|
135
|
-
| --includeMetadata
|
|
121
|
+
| Parameter | Alias | Description | Default | Required |
|
|
122
|
+
|------------------------|-------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|----------|
|
|
123
|
+
| --sourceDir | -s | The directory location which contains your apex .cls classes. | N/A | Yes |
|
|
124
|
+
| --targetDir | -t | The directory location where documentation will be generated to. | `docs` | No |
|
|
125
|
+
| --recursive | -r | Whether .cls classes will be searched for recursively in the directory provided. | `true` | No |
|
|
126
|
+
| --scope | -p | A list of scopes to document. Values should be separated by a space, e.g --scope public private. Note that this setting is ignored if generating an OpenApi REST specification since that looks for classes annotated with @RestResource. | `global` | No |
|
|
127
|
+
| --targetGenerator | -g | Define the static file generator for which the documents will be created. Currently supports: `jekyll`, `docsify`, `plain-markdown`, and `openapi`. | `jekyll` | No |
|
|
128
|
+
| --indexOnly | N/A | Defines whether only the index file should be generated. | `false` | No |
|
|
129
|
+
| --defaultGroupName | N/A | Defines the `@group` name to be used when a file does not specify it. | `Miscellaneous` | No |
|
|
130
|
+
| --sanitizeHtml | N/A | When on, any special character within your ApexDocs is converted into its HTML code representation. This is specially useful when generic objects are described within the docs, e.g. "List< Foo>", "Map<Foo, Bar>" because otherwise the content within < and > would be treated as HTML tags and not shown in the output. Content in @example blocks are never sanitized. | `Apex REST Api` | No |
|
|
131
|
+
| --openApiTitle | N/A | If using "openapi" as the target generator, this allows you to specify the OpenApi title value. | true | No |
|
|
132
|
+
| --title | N/A | Allows you to specify the home page main title. If using "openapi" this acts as an alias to the openApiTitle parameter | `Classes` | No |
|
|
133
|
+
| --namespace | N/A | The package namespace, if any. If this value is provided the namespace will be added as a prefix to all of the parsed files. If generating an OpenApi definition, it will be added to the file's Server Url. | N/A | No |
|
|
134
|
+
| --openApiFileName | N/A | If using "openapi" as the target generator, this allows you to specify the name of the output file. | `openapi` | No |
|
|
135
|
+
| --includeMetadata | N/A | Whether to include the file's meta.xml information: Whether it is active and and the API version | false | No |
|
|
136
|
+
| --documentationRootDir | N/A | The root directory where the documentation will be generated. This is useful when you want to generate the documentation in a subdirectory of your project. | N/A | No |
|
|
136
137
|
|
|
137
138
|
### Importing to your project
|
|
138
139
|
|
package/docs/README.md
CHANGED
|
@@ -1,84 +1 @@
|
|
|
1
|
-
|
|
2
|
-
## Misc Group
|
|
3
|
-
|
|
4
|
-
### [nspc.AnotherInterface](/Misc-Group/nspc.AnotherInterface.md)
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
### [nspc.ChildClass](/Misc-Group/nspc.ChildClass.md)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
### [nspc.GrandparentClass](/Misc-Group/nspc.GrandparentClass.md)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
### [nspc.InterfaceWithInheritance](/Misc-Group/nspc.InterfaceWithInheritance.md)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
### [nspc.MemberGrouping](/Misc-Group/nspc.MemberGrouping.md)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
### [nspc.ParentClass](/Misc-Group/nspc.ParentClass.md)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
### [nspc.Reference1](/Misc-Group/nspc.Reference1.md)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### [nspc.Reference2](/Misc-Group/nspc.Reference2.md)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
### [nspc.Reference3](/Misc-Group/nspc.Reference3.md)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
### [nspc.Reference4](/Misc-Group/nspc.Reference4.md)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
### [nspc.Reference5](/Misc-Group/nspc.Reference5.md)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
### [nspc.Reference6](/Misc-Group/nspc.Reference6.md)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
### [nspc.Reference7](/Misc-Group/nspc.Reference7.md)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
### [nspc.SampleClassWithoutModifier](/Misc-Group/nspc.SampleClassWithoutModifier.md)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
### [nspc.SampleRestResource](/Misc-Group/nspc.SampleRestResource.md)
|
|
47
|
-
|
|
48
|
-
Account related operations
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
### [nspc.SampleRestResourceWithInnerClass](/Misc-Group/nspc.SampleRestResourceWithInnerClass.md)
|
|
53
|
-
|
|
54
|
-
Contact related operations
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
### [nspc.SampleRestResourceWithoutApexDocs](/Misc-Group/nspc.SampleRestResourceWithoutApexDocs.md)
|
|
59
|
-
|
|
60
|
-
Order related operations
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
## Main
|
|
64
|
-
|
|
65
|
-
### [nspc.GroupedClass](/Main/nspc.GroupedClass.md)
|
|
66
|
-
|
|
67
|
-
Uses a block style apex doc
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
### [nspc.SampleClass](/Main/nspc.SampleClass.md)
|
|
72
|
-
|
|
73
|
-
This is a class description. This class relates to [nspc.SampleInterface](/Sample-Interfaces/nspc.SampleInterface.md)
|
|
74
|
-
But this [ClassThatDoesNotExist](ClassThatDoesNotExist) does not exist.
|
|
75
|
-
You can also link using this syntax [nspc.SampleInterface](/Sample-Interfaces/nspc.SampleInterface.md)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
## Sample Interfaces
|
|
79
|
-
|
|
80
|
-
### [nspc.SampleInterface](/Sample-Interfaces/nspc.SampleInterface.md)
|
|
81
|
-
|
|
82
|
-
This is an interface description.
|
|
83
|
-
|
|
84
|
-
|
|
1
|
+
Go to [docs](/types/README.md) for more information.
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
# nspc.ChildClass
|
|
2
2
|
|
|
3
|
+
Some desc
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
**Inheritance**
|
|
4
7
|
|
|
5
|
-
[nspc.GrandparentClass](/Misc-Group/nspc.GrandparentClass.md)
|
|
8
|
+
[nspc.GrandparentClass](types/Misc-Group/nspc.GrandparentClass.md)
|
|
6
9
|
>
|
|
7
|
-
[nspc.ParentClass](/Misc-Group/nspc.ParentClass.md)
|
|
10
|
+
[nspc.ParentClass](types/Misc-Group/nspc.ParentClass.md)
|
|
8
11
|
>
|
|
9
12
|
ChildClass
|
|
10
13
|
|
|
11
14
|
|
|
12
15
|
**Implemented types**
|
|
13
16
|
|
|
14
|
-
[nspc.SampleInterface](/Sample-Interfaces/nspc.SampleInterface.md)
|
|
17
|
+
[nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
**Group** Classes
|
|
15
21
|
|
|
16
22
|
## Fields
|
|
17
23
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
`NAMESPACEACCESSIBLE`
|
|
4
4
|
|
|
5
|
-
This is a class description. This class relates to [nspc.SampleInterface](/Sample-Interfaces/nspc.SampleInterface.md)
|
|
5
|
+
This is a class description. This class relates to [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
6
6
|
But this [ClassThatDoesNotExist](ClassThatDoesNotExist) does not exist.
|
|
7
|
-
You can also link using this syntax [nspc.SampleInterface](/Sample-Interfaces/nspc.SampleInterface.md)
|
|
7
|
+
You can also link using this syntax [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
**Group** Main
|
|
@@ -16,7 +16,7 @@ This is a class description. This class relates to [nspc.SampleInterface](/Sampl
|
|
|
16
16
|
**Author** Cesar Parra
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
**See** [nspc.SampleInterface](/Sample-Interfaces/nspc.SampleInterface.md)
|
|
19
|
+
**See** [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
20
20
|
|
|
21
21
|
## Constructors
|
|
22
22
|
### My Super Group
|
|
@@ -24,7 +24,7 @@ This is a class description. This class relates to [nspc.SampleInterface](/Sampl
|
|
|
24
24
|
|
|
25
25
|
`NAMESPACEACCESSIBLE`
|
|
26
26
|
|
|
27
|
-
Constructs a SampleClass without any arguments. This relates to [nspc.SampleInterface](/Sample-Interfaces/nspc.SampleInterface.md)
|
|
27
|
+
Constructs a SampleClass without any arguments. This relates to [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
28
28
|
|
|
29
29
|
###### Throws
|
|
30
30
|
|
|
@@ -36,7 +36,7 @@ Constructs a SampleClass without any arguments. This relates to [nspc.SampleInte
|
|
|
36
36
|
**CustomAnnotation** A Custom method annotation
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
**See** [nspc.SampleInterface](/Sample-Interfaces/nspc.SampleInterface.md)
|
|
39
|
+
**See** [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
40
40
|
|
|
41
41
|
###### Example
|
|
42
42
|
```apex
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
**Extended types**
|
|
4
4
|
|
|
5
|
-
[nspc.SampleInterface](/Sample-Interfaces/nspc.SampleInterface.md)
|
|
5
|
+
[nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
6
6
|
,
|
|
7
|
-
[nspc.AnotherInterface](/
|
|
7
|
+
[nspc.AnotherInterface](types/Classes/nspc.AnotherInterface.md)
|
|
8
8
|
## Methods
|
|
9
9
|
### `execute()`
|
|
10
10
|
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Sample Documentation
|
|
2
|
+
## Classes
|
|
3
|
+
|
|
4
|
+
### [nspc.AnotherInterface](types/Classes/nspc.AnotherInterface.md)
|
|
5
|
+
|
|
6
|
+
Some desc
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### [nspc.ChildClass](types/Classes/nspc.ChildClass.md)
|
|
11
|
+
|
|
12
|
+
Some desc
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## Misc Group
|
|
16
|
+
|
|
17
|
+
### [nspc.GrandparentClass](types/Misc-Group/nspc.GrandparentClass.md)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### [nspc.InterfaceWithInheritance](types/Misc-Group/nspc.InterfaceWithInheritance.md)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### [nspc.MemberGrouping](types/Misc-Group/nspc.MemberGrouping.md)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### [nspc.ParentClass](types/Misc-Group/nspc.ParentClass.md)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### [nspc.Reference1](types/Misc-Group/nspc.Reference1.md)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### [nspc.Reference2](types/Misc-Group/nspc.Reference2.md)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### [nspc.Reference3](types/Misc-Group/nspc.Reference3.md)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### [nspc.Reference4](types/Misc-Group/nspc.Reference4.md)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### [nspc.Reference5](types/Misc-Group/nspc.Reference5.md)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### [nspc.Reference6](types/Misc-Group/nspc.Reference6.md)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### [nspc.Reference7](types/Misc-Group/nspc.Reference7.md)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### [nspc.SampleClassWithoutModifier](types/Misc-Group/nspc.SampleClassWithoutModifier.md)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### [nspc.SampleRestResource](types/Misc-Group/nspc.SampleRestResource.md)
|
|
54
|
+
|
|
55
|
+
Account related operations
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### [nspc.SampleRestResourceWithInnerClass](types/Misc-Group/nspc.SampleRestResourceWithInnerClass.md)
|
|
60
|
+
|
|
61
|
+
Contact related operations
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### [nspc.SampleRestResourceWithoutApexDocs](types/Misc-Group/nspc.SampleRestResourceWithoutApexDocs.md)
|
|
66
|
+
|
|
67
|
+
Order related operations
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## Main
|
|
71
|
+
|
|
72
|
+
### [nspc.GroupedClass](types/Main/nspc.GroupedClass.md)
|
|
73
|
+
|
|
74
|
+
Uses a block style apex doc
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### [nspc.SampleClass](types/Main/nspc.SampleClass.md)
|
|
79
|
+
|
|
80
|
+
This is a class description. This class relates to [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
81
|
+
But this [ClassThatDoesNotExist](ClassThatDoesNotExist) does not exist.
|
|
82
|
+
You can also link using this syntax [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
## Sample Interfaces
|
|
86
|
+
|
|
87
|
+
### [nspc.SampleInterface](types/Sample-Interfaces/nspc.SampleInterface.md)
|
|
88
|
+
|
|
89
|
+
This is an interface description.
|
|
90
|
+
|
|
91
|
+
|
package/lib/cli/generate.js
CHANGED
|
@@ -82,6 +82,10 @@ const argv = yargs.options({
|
|
|
82
82
|
describe: "Whether to include the file's meta.xml information: Whether it is active and and the API version",
|
|
83
83
|
default: false,
|
|
84
84
|
},
|
|
85
|
+
documentationRootDir: {
|
|
86
|
+
type: 'string',
|
|
87
|
+
describe: 'Allows you to specify the root documentation directory where the files are being generated. This can be helpful when embedding the generated docs into an existing site so that the links are generated correctly.',
|
|
88
|
+
},
|
|
85
89
|
}).argv;
|
|
86
90
|
settings_1.Settings.build({
|
|
87
91
|
sourceDirectory: argv.sourceDir,
|
|
@@ -97,6 +101,7 @@ settings_1.Settings.build({
|
|
|
97
101
|
namespace: argv.namespace,
|
|
98
102
|
openApiFileName: argv.openApiFileName,
|
|
99
103
|
includeMetadata: argv.includeMetadata,
|
|
104
|
+
rootDir: argv.documentationRootDir,
|
|
100
105
|
});
|
|
101
106
|
try {
|
|
102
107
|
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;AAGnD,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC;IACzB,SAAS,EAAE;QACT,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,GAAG;QACV,YAAY,EAAE,I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EAAE,kGAAkG;QAC5G,OAAO,EAAE,KAAK;KACf;IACD,oBAAoB,EAAE;QACpB,IAAI,EAAE,QAAQ;QACd,QAAQ,EACN,oNAAoN;KACvN;CACF,CAAC,CAAC,IAAI,CAAC;AAER,mBAAQ,CAAC,KAAK,CAAC;IACb,eAAe,EAAE,IAAI,CAAC,SAAS;IAC/B,SAAS,EAAE,IAAI,CAAC,SAAS;IACzB,KAAK,EAAE,IAAI,CAAC,KAAK;IACjB,SAAS,EAAE,IAAI,CAAC,SAAS;IACzB,eAAe,EAAE,IAAI,CAAC,eAAmC;IACzD,SAAS,EAAE,IAAI,CAAC,SAAS;IACzB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;IACvC,YAAY,EAAE,IAAI,CAAC,YAAY;IAC/B,YAAY,EAAE,IAAI,CAAC,YAAY;IAC/B,KAAK,EAAE,IAAI,CAAC,KAAK;IACjB,SAAS,EAAE,IAAI,CAAC,SAAS;IACzB,eAAe,EAAE,IAAI,CAAC,eAAe;IACrC,eAAe,EAAE,IAAI,CAAC,eAAe;IACrC,OAAO,EAAE,IAAI,CAAC,oBAAoB;CACnC,CAAC,CAAC;AAEH,IAAI;IACF,mBAAQ,CAAC,QAAQ,EAAE,CAAC;CACrB;AAAC,OAAO,KAAK,EAAE;IACd,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CACjB"}
|
package/lib/settings.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface SettingsConfig {
|
|
|
13
13
|
namespace?: string;
|
|
14
14
|
openApiFileName: string;
|
|
15
15
|
includeMetadata: boolean;
|
|
16
|
+
rootDir?: string;
|
|
16
17
|
}
|
|
17
18
|
export declare class Settings {
|
|
18
19
|
config: SettingsConfig;
|
|
@@ -34,4 +35,5 @@ export declare class Settings {
|
|
|
34
35
|
getNamespacePrefix(): string;
|
|
35
36
|
openApiFileName(): string;
|
|
36
37
|
includeMetadata(): boolean;
|
|
38
|
+
getRootDir(): string | undefined;
|
|
37
39
|
}
|
package/lib/settings.js
CHANGED
package/lib/settings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":";;;AAmBA,MAAa,QAAQ;IAGnB,YAA2B,MAAsB;QAAtB,WAAM,GAAN,MAAM,CAAgB;IAAG,CAAC;IAE9C,MAAM,CAAC,KAAK,CAAC,MAAsB;QACxC,QAAQ,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IAEM,MAAM,CAAC,WAAW;QACvB,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACtB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;SACtD;QACD,OAAO,QAAQ,CAAC,QAAQ,CAAC;IAC3B,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;IACrC,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IAC3B,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;IACrC,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IAC/B,CAAC;IAED,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;IAClC,CAAC;IAEM,mBAAmB;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;IACtC,CAAC;IAEM,eAAe;;QACpB,OAAO,MAAA,IAAI,CAAC,MAAM,CAAC,YAAY,mCAAI,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IACvD,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IAC3B,CAAC;IAEM,YAAY;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IAC/B,CAAC;IAEM,kBAAkB;QACvB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;YAC1B,OAAO,EAAE,CAAC;SACX;QACD,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC;IACrC,CAAC;IAEM,eAAe;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;IACrC,CAAC;IAEM,eAAe;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;IACrC,CAAC;IAEM,UAAU;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;IAC7B,CAAC;CACF;AA9ED,4BA8EC"}
|
|
@@ -9,7 +9,9 @@ class ClassFileGeneratorHelper {
|
|
|
9
9
|
return this.getClassGroup(classModel).replace(/ /g, '-').replace('.', '');
|
|
10
10
|
}
|
|
11
11
|
static getFileLink(classModel) {
|
|
12
|
-
|
|
12
|
+
var _a;
|
|
13
|
+
const documentationRoot = (_a = settings_1.Settings.getInstance().getRootDir()) !== null && _a !== void 0 ? _a : '';
|
|
14
|
+
const directoryRoot = `${documentationRoot}${this.getDirectoryRoot(classModel)}`;
|
|
13
15
|
const fullClassName = `${settings_1.Settings.getInstance().getNamespacePrefix()}${classModel.name}`;
|
|
14
16
|
return `[${fullClassName}](${directoryRoot}${fullClassName}.md)`;
|
|
15
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"class-file-generatorHelper.js","sourceRoot":"","sources":["../../../src/transpiler/markdown/class-file-generatorHelper.ts"],"names":[],"mappings":";;AACA,mEAA+D;AAC/D,6CAA0C;AAC1C,+CAAwC;AACxC,wCAAmD;AAEnD,MAAqB,wBAAwB;IACpC,MAAM,CAAC,iBAAiB,CAAC,UAAgB;QAC9C,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAC5E,CAAC;IAEM,MAAM,CAAC,WAAW,CAAC,UAAgB
|
|
1
|
+
{"version":3,"file":"class-file-generatorHelper.js","sourceRoot":"","sources":["../../../src/transpiler/markdown/class-file-generatorHelper.ts"],"names":[],"mappings":";;AACA,mEAA+D;AAC/D,6CAA0C;AAC1C,+CAAwC;AACxC,wCAAmD;AAEnD,MAAqB,wBAAwB;IACpC,MAAM,CAAC,iBAAiB,CAAC,UAAgB;QAC9C,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAC5E,CAAC;IAEM,MAAM,CAAC,WAAW,CAAC,UAAgB;;QACxC,MAAM,iBAAiB,GAAG,MAAA,mBAAQ,CAAC,WAAW,EAAE,CAAC,UAAU,EAAE,mCAAI,EAAE,CAAC;QACpE,MAAM,aAAa,GAAG,GAAG,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,EAAE,CAAC;QACjF,MAAM,aAAa,GAAG,GAAG,mBAAQ,CAAC,WAAW,EAAE,CAAC,kBAAkB,EAAE,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;QACzF,OAAO,IAAI,aAAa,KAAK,aAAa,GAAG,aAAa,MAAM,CAAC;IACnE,CAAC;IAEM,MAAM,CAAC,qBAAqB,CAAC,QAAgB;QAClD,MAAM,IAAI,GAAG,kCAAe,CAAC,WAAW,EAAE,CAAC,mBA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BAAQ,CAAC,WAAW,EAAE,CAAC,mBAAmB,EAAE,CAAC;IAC/E,CAAC;CACF;AAnDD,2CAmDC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cparra/apexdocs",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
4
4
|
"description": "Library with CLI capabilities to generate documentation for Salesforce Apex classes.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"apex",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"postversion": "git push && git push --tags",
|
|
25
25
|
"docs:init": "docsify init docs",
|
|
26
26
|
"docs:serve": "docsify serve docs",
|
|
27
|
-
"execute:example": "node lib/cli/generate.js -s examples/force-app -t docs --scope global public private protected -g docsify --defaultGroupName \"Misc Group\" --namespace nspc --title \"Sample Documentation\"",
|
|
27
|
+
"execute:example": "node lib/cli/generate.js -s examples/force-app -t docs/types --scope global public private protected -g docsify --defaultGroupName \"Misc Group\" --namespace nspc --title \"Sample Documentation\" --documentationRootDir types",
|
|
28
28
|
"execute:example:index:only": "node lib/cli/generate.js -s examples/force-app -t docs --scope global public private -g docsify --indexOnly",
|
|
29
29
|
"execute:example:openapi": "node lib/cli/generate.js -s examples/force-app -t docs -g openapi --openApiTitle \"Sample REST Api\" --namespace nspc --openApiFileName restapi"
|
|
30
30
|
},
|
package/src/cli/generate.ts
CHANGED
|
@@ -87,6 +87,11 @@ const argv = yargs.options({
|
|
|
87
87
|
describe: "Whether to include the file's meta.xml information: Whether it is active and and the API version",
|
|
88
88
|
default: false,
|
|
89
89
|
},
|
|
90
|
+
documentationRootDir: {
|
|
91
|
+
type: 'string',
|
|
92
|
+
describe:
|
|
93
|
+
'Allows you to specify the root documentation directory where the files are being generated. This can be helpful when embedding the generated docs into an existing site so that the links are generated correctly.',
|
|
94
|
+
},
|
|
90
95
|
}).argv;
|
|
91
96
|
|
|
92
97
|
Settings.build({
|
|
@@ -103,6 +108,7 @@ Settings.build({
|
|
|
103
108
|
namespace: argv.namespace,
|
|
104
109
|
openApiFileName: argv.openApiFileName,
|
|
105
110
|
includeMetadata: argv.includeMetadata,
|
|
111
|
+
rootDir: argv.documentationRootDir,
|
|
106
112
|
});
|
|
107
113
|
|
|
108
114
|
try {
|
package/src/settings.ts
CHANGED
|
@@ -14,6 +14,7 @@ export interface SettingsConfig {
|
|
|
14
14
|
namespace?: string;
|
|
15
15
|
openApiFileName: string;
|
|
16
16
|
includeMetadata: boolean;
|
|
17
|
+
rootDir?: string;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export class Settings {
|
|
@@ -90,4 +91,8 @@ export class Settings {
|
|
|
90
91
|
public includeMetadata(): boolean {
|
|
91
92
|
return this.config.includeMetadata;
|
|
92
93
|
}
|
|
94
|
+
|
|
95
|
+
public getRootDir(): string | undefined {
|
|
96
|
+
return this.config.rootDir;
|
|
97
|
+
}
|
|
93
98
|
}
|
|
@@ -10,7 +10,8 @@ export default class ClassFileGeneratorHelper {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
public static getFileLink(classModel: Type) {
|
|
13
|
-
const
|
|
13
|
+
const documentationRoot = Settings.getInstance().getRootDir() ?? '';
|
|
14
|
+
const directoryRoot = `${documentationRoot}${this.getDirectoryRoot(classModel)}`;
|
|
14
15
|
const fullClassName = `${Settings.getInstance().getNamespacePrefix()}${classModel.name}`;
|
|
15
16
|
return `[${fullClassName}](${directoryRoot}${fullClassName}.md)`;
|
|
16
17
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# nspc.AnotherInterface
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|