@cparra/apexdocs 2.6.0-beta.2 → 2.6.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/docs/Main/SampleClass.md +2 -4
- package/docs/README.md +9 -4
- package/lib/model/markdown-file.d.ts +1 -0
- package/lib/model/markdown-file.js +8 -8
- package/lib/model/markdown-file.js.map +1 -1
- package/lib/model/markdown-home-file.js +3 -1
- package/lib/model/markdown-home-file.js.map +1 -1
- package/package.json +3 -3
- package/src/model/markdown-file.ts +9 -9
- package/src/model/markdown-home-file.ts +4 -1
- package/docs/core-utils/ClassWithDescriptionBlock.md +0 -36
- package/examples/force-app/main/default/classes/ClassWithDescriptionBlock.cls +0 -31
package/docs/Main/SampleClass.md
CHANGED
|
@@ -43,8 +43,7 @@ Constructs a SampleClass without any arguments. This relates to [SampleInterface
|
|
|
43
43
|
**See** [SampleInterface](/Sample-Interfaces/SampleInterface.md)
|
|
44
44
|
|
|
45
45
|
###### Example
|
|
46
|
-
```
|
|
47
|
-
apex
|
|
46
|
+
```apex
|
|
48
47
|
// Example
|
|
49
48
|
SampleClass sampleInstance = new SampleClass();
|
|
50
49
|
```
|
|
@@ -120,8 +119,7 @@ String
|
|
|
120
119
|
Empty string
|
|
121
120
|
|
|
122
121
|
#### Example
|
|
123
|
-
```
|
|
124
|
-
apex
|
|
122
|
+
```apex
|
|
125
123
|
String result = SampleClass.testMethod();
|
|
126
124
|
System.debug(result);
|
|
127
125
|
```
|
package/docs/README.md
CHANGED
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
### [ClassWithDescriptionBlock](/core-utils/ClassWithDescriptionBlock.md)
|
|
5
5
|
|
|
6
6
|
Simple Trigger Framework, integrated with [CodeControl](CodeControl).
|
|
7
|
+
|
|
7
8
|
To use TriggerService for a given trigger,
|
|
8
9
|
1. Build a trigger handler class that extends [TriggerHelperBase](TriggerHelperBase), implementing any trigger stages (e.g., beforeInsert, afterUpdate, etc)
|
|
9
|
-
needed by your trigger. Here is a List<String>.
|
|
10
|
-
2.
|
|
10
|
+
needed by your trigger. Here is a List<String>.
|
|
11
|
+
2. …
|
|
12
|
+
|
|
11
13
|
## Main
|
|
12
14
|
|
|
13
15
|
### [GroupedClass](/Main/GroupedClass.md)
|
|
@@ -15,15 +17,17 @@ needed by your trigger. Here is a List<String>.
|
|
|
15
17
|
Uses a block style apex doc
|
|
16
18
|
|
|
17
19
|
|
|
20
|
+
|
|
18
21
|
### [SampleClass](/Main/SampleClass.md)
|
|
19
22
|
|
|
20
23
|
This is a class description. This class relates to [SampleInterface](/Sample-Interfaces/SampleInterface.md)
|
|
21
24
|
But this [ClassThatDoesNotExist](ClassThatDoesNotExist) does not exist.
|
|
22
25
|
You can also link using this syntax [SampleInterface](/Sample-Interfaces/SampleInterface.md)
|
|
23
26
|
|
|
24
|
-
## Miscellaneous
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
## Misc Group
|
|
29
|
+
|
|
30
|
+
### [SampleClassWithoutModifier](/Misc-Group/SampleClassWithoutModifier.md)
|
|
27
31
|
|
|
28
32
|
## Sample Interfaces
|
|
29
33
|
|
|
@@ -31,3 +35,4 @@ This is a class description. This class relates to [SampleInterface](/Sample-Int
|
|
|
31
35
|
|
|
32
36
|
This is an interface description.
|
|
33
37
|
|
|
38
|
+
|
|
@@ -18,15 +18,10 @@ class MarkdownFile extends file_1.File {
|
|
|
18
18
|
this.addBlankLine();
|
|
19
19
|
}
|
|
20
20
|
addText(text, encodeHtml = true) {
|
|
21
|
-
|
|
22
|
-
text = MarkdownFile.replaceInlineEmails(text);
|
|
23
|
-
super.addText(text, encodeHtml);
|
|
21
|
+
super.addText(this._replaceInlineReferences(text), encodeHtml);
|
|
24
22
|
}
|
|
25
23
|
startCodeBlock() {
|
|
26
|
-
this.addText('```');
|
|
27
|
-
const sourceLanguage = 'apex';
|
|
28
|
-
this._contents += sourceLanguage;
|
|
29
|
-
this.addBlankLine();
|
|
24
|
+
this.addText('```apex');
|
|
30
25
|
}
|
|
31
26
|
endCodeBlock() {
|
|
32
27
|
this.addText('```');
|
|
@@ -52,7 +47,7 @@ class MarkdownFile extends file_1.File {
|
|
|
52
47
|
addTableRow(...columns) {
|
|
53
48
|
this._contents += '|';
|
|
54
49
|
columns.forEach((column) => {
|
|
55
|
-
this._contents += column + '|';
|
|
50
|
+
this._contents += this._replaceInlineReferences(column) + '|';
|
|
56
51
|
});
|
|
57
52
|
this.addBlankLine();
|
|
58
53
|
}
|
|
@@ -99,6 +94,11 @@ class MarkdownFile extends file_1.File {
|
|
|
99
94
|
}
|
|
100
95
|
return text;
|
|
101
96
|
}
|
|
97
|
+
_replaceInlineReferences(text) {
|
|
98
|
+
text = MarkdownFile.replaceInlineLinks(text);
|
|
99
|
+
text = MarkdownFile.replaceInlineEmails(text);
|
|
100
|
+
return text;
|
|
101
|
+
}
|
|
102
102
|
}
|
|
103
103
|
exports.MarkdownFile = MarkdownFile;
|
|
104
104
|
//# sourceMappingURL=markdown-file.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-file.js","sourceRoot":"","sources":["../../src/model/markdown-file.ts"],"names":[],"mappings":";;;AAAA,iCAA8B;AAC9B,kGAAyF;AAEzF,MAAa,YAAa,SAAQ,WAAI;IACpC,aAAa;QACX,OAAO,KAAK,CAAC;IACf,CAAC;IAED,QAAQ,CAAC,IAAY,EAAE,KAAK,GAAG,CAAC;QAC9B,IAAI,KAAK,GAAG,EAAE,CAAC;QACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;YAC9B,KAAK,IAAI,GAAG,CAAC;SACd;QAED,KAAK,IAAI,GAAG,CAAC;QACb,KAAK,IAAI,IAAI,CAAC;QACd,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC;QACxB,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAEM,OAAO,CAAC,IAAY,EAAE,UAAU,GAAG,IAAI;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AI,CAAC;IACd,CAAC;CACF;AAjHD,oCAiHC"}
|
|
@@ -4,6 +4,7 @@ exports.MarkdownHomeFile = void 0;
|
|
|
4
4
|
const class_file_generatorHelper_1 = require("../transpiler/markdown/class-file-generatorHelper");
|
|
5
5
|
const markdown_file_1 = require("./markdown-file");
|
|
6
6
|
const truncate_1 = require("../util/truncate");
|
|
7
|
+
const settings_1 = require("../settings");
|
|
7
8
|
class MarkdownHomeFile extends markdown_file_1.MarkdownFile {
|
|
8
9
|
constructor(fileName, types, headerContent) {
|
|
9
10
|
super(fileName, '');
|
|
@@ -32,6 +33,7 @@ class MarkdownHomeFile extends markdown_file_1.MarkdownFile {
|
|
|
32
33
|
if ((_a = typeMirror.docComment) === null || _a === void 0 ? void 0 : _a.descriptionLines) {
|
|
33
34
|
const description = typeMirror.docComment.descriptionLines.reduce((previous, current) => previous + current + '\n', '');
|
|
34
35
|
this.addText(truncate_1.truncate(description, 300));
|
|
36
|
+
this.addBlankLine();
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
39
|
group(classes) {
|
|
@@ -45,7 +47,7 @@ class MarkdownHomeFile extends markdown_file_1.MarkdownFile {
|
|
|
45
47
|
}
|
|
46
48
|
getClassGroup(classModel) {
|
|
47
49
|
var _a, _b, _c;
|
|
48
|
-
return ((_c = (_b = (_a = classModel.docComment) === null || _a === void 0 ? void 0 : _a.annotations.find((annotation) => annotation.name === 'group')) === null || _b === void 0 ? void 0 : _b.body) !== null && _c !== void 0 ? _c :
|
|
50
|
+
return ((_c = (_b = (_a = classModel.docComment) === null || _a === void 0 ? void 0 : _a.annotations.find((annotation) => annotation.name === 'group')) === null || _b === void 0 ? void 0 : _b.body) !== null && _c !== void 0 ? _c : settings_1.Settings.getInstance().getDefaultGroupName());
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
53
|
exports.MarkdownHomeFile = MarkdownHomeFile;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-home-file.js","sourceRoot":"","sources":["../../src/model/markdown-home-file.ts"],"names":[],"mappings":";;;AACA,kGAAyF;AACzF,mDAA+C;AAC/C,+CAA4C;
|
|
1
|
+
{"version":3,"file":"markdown-home-file.js","sourceRoot":"","sources":["../../src/model/markdown-home-file.ts"],"names":[],"mappings":";;;AACA,kGAAyF;AACzF,mDAA+C;AAC/C,+CAA4C;AAC5C,0CAAuC;AAEvC,MAAa,gBAAiB,SAAQ,4BAAY;IAChD,YAAmB,QAAgB,EAAS,KAAa,EAAE,aAAsB;QAC/E,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QADH,aAAQ,GAAR,QAAQ,CAAQ;QAAS,UAAK,GAAL,KAAK,CAAQ;QAEvD,IAAI,aAAa,EAAE;YACjB,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;SAC7B;QACD,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACzB,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAEO,cAAc,CAAC,KAAa;QAClC,MAAM,cAAc,GAAwB,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC9D,cAAc,CAAC,OAAO,CAAC,CAAC,KAAa,EAAE,GAAW,EAAE,EAAE;YACpD,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YACtB,KAAK,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;gBAC3B,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;YAChC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,YAAY,CAAC,UAAgB;;QACnC,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,QAAQ,CAAC,oCAAwB,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;QACnE,IAAI,CAAC,YAAY,EAAE,CAAC;QAEpB,UAAI,UAAU,CAAC,UAAU,0CAAE,gBAAgB,EAAE;YAC3C,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC,gBAAgB,CAAC,MAAM,CAC/D,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,CAAC,QAAQ,GAAG,OAAO,GAAG,IAAI,EAChD,EAAE,CACH,CAAC;YACF,IAAI,CAAC,OAAO,CAAC,mBAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC;YACzC,IAAI,CAAC,YAAY,EAAE,CAAC;SACrB;IACH,CAAC;IAEO,KAAK,CAAC,OAAe;QAC3B,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,YAAY,EAAE,EAAE;YAC7C,MAAM,GAAG,GAAG,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;YAC7C,MAAM,KAAK,GAAW,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;YAC5C,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YACzB,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YACvB,OAAO,MAAM,CAAC;QAChB,CAAC,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;IAChB,CAAC;IAEO,aAAa,CAAC,UAAgB;;QACpC,OAAO,mBACL,UAAU,CAAC,UAAU,0CAAE,WAAW,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,KAAK,OAAO,2CAAG,IAAI,mCAC1F,mBAAQ,CAAC,WAAW,EAAE,CAAC,mBAAmB,EAAE,CAC7C,CAAC;IACJ,CAAC;CACF;AAnDD,4CAmDC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cparra/apexdocs",
|
|
3
|
-
"version": "2.6.0
|
|
3
|
+
"version": "2.6.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 -g docsify --defaultGroupName
|
|
27
|
+
"execute:example": "node lib/cli/generate.js -s examples/force-app -t docs --scope global public private -g docsify --defaultGroupName \"Misc Group\"",
|
|
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
|
},
|
|
30
30
|
"author": "Cesar Parra",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
]
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@cparra/apex-reflection": "1.6.
|
|
67
|
+
"@cparra/apex-reflection": "1.6.4",
|
|
68
68
|
"chalk": "^4.1.2",
|
|
69
69
|
"fast-xml-parser": "^4.0.1",
|
|
70
70
|
"log-update": "4.0.0",
|
|
@@ -19,17 +19,11 @@ export class MarkdownFile extends File {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
public addText(text: string, encodeHtml = true) {
|
|
22
|
-
|
|
23
|
-
text = MarkdownFile.replaceInlineEmails(text);
|
|
24
|
-
|
|
25
|
-
super.addText(text, encodeHtml);
|
|
22
|
+
super.addText(this._replaceInlineReferences(text), encodeHtml);
|
|
26
23
|
}
|
|
27
24
|
|
|
28
25
|
startCodeBlock() {
|
|
29
|
-
this.addText('```');
|
|
30
|
-
const sourceLanguage = 'apex';
|
|
31
|
-
this._contents += sourceLanguage;
|
|
32
|
-
this.addBlankLine();
|
|
26
|
+
this.addText('```apex');
|
|
33
27
|
}
|
|
34
28
|
|
|
35
29
|
endCodeBlock() {
|
|
@@ -59,7 +53,7 @@ export class MarkdownFile extends File {
|
|
|
59
53
|
addTableRow(...columns: string[]) {
|
|
60
54
|
this._contents += '|';
|
|
61
55
|
columns.forEach((column) => {
|
|
62
|
-
this._contents += column + '|';
|
|
56
|
+
this._contents += this._replaceInlineReferences(column) + '|';
|
|
63
57
|
});
|
|
64
58
|
this.addBlankLine();
|
|
65
59
|
}
|
|
@@ -114,4 +108,10 @@ export class MarkdownFile extends File {
|
|
|
114
108
|
}
|
|
115
109
|
return text;
|
|
116
110
|
}
|
|
111
|
+
|
|
112
|
+
private _replaceInlineReferences(text: string): string {
|
|
113
|
+
text = MarkdownFile.replaceInlineLinks(text);
|
|
114
|
+
text = MarkdownFile.replaceInlineEmails(text);
|
|
115
|
+
return text;
|
|
116
|
+
}
|
|
117
117
|
}
|
|
@@ -2,6 +2,7 @@ import { Type } from '@cparra/apex-reflection';
|
|
|
2
2
|
import ClassFileGeneratorHelper from '../transpiler/markdown/class-file-generatorHelper';
|
|
3
3
|
import { MarkdownFile } from './markdown-file';
|
|
4
4
|
import { truncate } from '../util/truncate';
|
|
5
|
+
import { Settings } from '../settings';
|
|
5
6
|
|
|
6
7
|
export class MarkdownHomeFile extends MarkdownFile {
|
|
7
8
|
constructor(public fileName: string, public types: Type[], headerContent?: string) {
|
|
@@ -34,6 +35,7 @@ export class MarkdownHomeFile extends MarkdownFile {
|
|
|
34
35
|
'',
|
|
35
36
|
);
|
|
36
37
|
this.addText(truncate(description, 300));
|
|
38
|
+
this.addBlankLine();
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
41
|
|
|
@@ -49,7 +51,8 @@ export class MarkdownHomeFile extends MarkdownFile {
|
|
|
49
51
|
|
|
50
52
|
private getClassGroup(classModel: Type): string {
|
|
51
53
|
return (
|
|
52
|
-
classModel.docComment?.annotations.find((annotation) => annotation.name === 'group')?.body ??
|
|
54
|
+
classModel.docComment?.annotations.find((annotation) => annotation.name === 'group')?.body ??
|
|
55
|
+
Settings.getInstance().getDefaultGroupName()
|
|
53
56
|
);
|
|
54
57
|
}
|
|
55
58
|
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# ClassWithDescriptionBlock
|
|
2
|
-
|
|
3
|
-
Simple Trigger Framework, integrated with [CodeControl](CodeControl).
|
|
4
|
-
To use TriggerService for a given trigger,
|
|
5
|
-
1. Build a trigger handler class that extends [TriggerHelperBase](TriggerHelperBase), implementing any trigger stages (e.g., beforeInsert, afterUpdate, etc)
|
|
6
|
-
needed by your trigger. Here is a List<String>.
|
|
7
|
-
2. In the trigger, call `TriggerService.run()`, passing a new instance of your handler.
|
|
8
|
-
```
|
|
9
|
-
// TriggerHandler
|
|
10
|
-
public class AccountHandler extends TriggerHelperBase {
|
|
11
|
-
public override void afterInsert(List<SObject> newList) {
|
|
12
|
-
// ... do trigger things
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
// Trigger
|
|
16
|
-
trigger AccountTrigger on Account (after insert) {
|
|
17
|
-
TriggerService.run(new AccountHandler());
|
|
18
|
-
}
|
|
19
|
-
```
|
|
20
|
-
Something else `<but>` outside.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
**Class** TriggerService
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
**TestClass** TriggerService_Test
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
**Group** core-utils
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
**Author** Jason Clark
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
**Date** 1/15/22
|
|
36
|
-
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**********************************************************
|
|
2
|
-
@class TriggerService
|
|
3
|
-
@testClass TriggerService_Test
|
|
4
|
-
@group core-utils
|
|
5
|
-
@description Simple Trigger Framework, integrated with <<CodeControl>>.
|
|
6
|
-
|
|
7
|
-
To use TriggerService for a given trigger,
|
|
8
|
-
1. Build a trigger handler class that extends <<TriggerHelperBase>>, implementing any trigger stages (e.g., beforeInsert, afterUpdate, etc)
|
|
9
|
-
needed by your trigger. Here is a List<String>.
|
|
10
|
-
2. In the trigger, call `TriggerService.run()`, passing a new instance of your handler.
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
// TriggerHandler
|
|
14
|
-
public class AccountHandler extends TriggerHelperBase {
|
|
15
|
-
public override void afterInsert(List<SObject> newList) {
|
|
16
|
-
// ... do trigger things
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// Trigger
|
|
21
|
-
trigger AccountTrigger on Account (after insert) {
|
|
22
|
-
TriggerService.run(new AccountHandler());
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Something else `<but>` outside.
|
|
27
|
-
|
|
28
|
-
@author Jason Clark
|
|
29
|
-
@date 1/15/22
|
|
30
|
-
***********************************************************/
|
|
31
|
-
public class ClassWithDescriptionBlock {}
|