@cparra/apexdocs 3.11.0 → 3.12.1
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 +3 -1
- package/dist/cli/generate.js +10 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/{logger-C1Ezw_pW.js → logger-dCI_xpGU.js} +45 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -124,6 +124,8 @@ apexdocs changelog --previousVersionDir force-app-previous --currentVersionDir f
|
|
|
124
124
|
| `--linkingStrategy` | N/A | The strategy to use when linking to other classes. Possible values are `relative`, `no-link`, and `none` | `relative` | No |
|
|
125
125
|
| `--customObjectsGroupName` | N/A | The name under which custom objects will be grouped in the Reference Guide | `Custom Objects` | No |
|
|
126
126
|
| `--triggersGroupName` | N/A | The name under which triggers will be grouped in the Reference Guide | `Triggers` | No |
|
|
127
|
+
| `--includeFieldSecurityMetadata` | N/A | Whether to include the compliance category and security classification for fields in the generated files. | `false` | No |
|
|
128
|
+
| `--includeInlineHelpTextMetadata` | N/A | Whether to include the inline help text for fields in the generated files. | `false` | No |
|
|
127
129
|
|
|
128
130
|
##### Linking Strategy
|
|
129
131
|
|
|
@@ -386,7 +388,7 @@ Example: Injecting a copyright notice
|
|
|
386
388
|
//...
|
|
387
389
|
macros: {
|
|
388
390
|
copyright: () => {
|
|
389
|
-
return
|
|
391
|
+
return `@copyright Copyright (c) ${new Date().getFullYear()} My Name`;
|
|
390
392
|
}
|
|
391
393
|
}
|
|
392
394
|
//...
|
package/dist/cli/generate.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var logger$1 = require('../logger-
|
|
4
|
+
var logger$1 = require('../logger-dCI_xpGU.js');
|
|
5
5
|
var module$1 = require('module');
|
|
6
6
|
var cosmiconfig = require('cosmiconfig');
|
|
7
7
|
var E = require('fp-ts/Either');
|
|
@@ -117,6 +117,15 @@ const markdownOptions = {
|
|
|
117
117
|
type: "string",
|
|
118
118
|
describe: "The title of the reference guide.",
|
|
119
119
|
default: logger$1.markdownDefaults.referenceGuideTitle
|
|
120
|
+
},
|
|
121
|
+
includeFieldSecurityMetadata: {
|
|
122
|
+
type: "boolean",
|
|
123
|
+
describe: "Whether to include the compliance category and security classification for fields in the generated files.",
|
|
124
|
+
default: logger$1.markdownDefaults.includeFieldSecurityMetadata
|
|
125
|
+
},
|
|
126
|
+
includeInlineHelpTextMetadata: {
|
|
127
|
+
type: "boolean",
|
|
128
|
+
describe: "Whether to include the inline help text for fields in the generated files."
|
|
120
129
|
}
|
|
121
130
|
};
|
|
122
131
|
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,8 @@ type CliConfigurableMarkdownConfig = {
|
|
|
32
32
|
includeMetadata: boolean;
|
|
33
33
|
linkingStrategy: LinkingStrategy;
|
|
34
34
|
referenceGuideTitle: string;
|
|
35
|
+
includeFieldSecurityMetadata: boolean;
|
|
36
|
+
includeInlineHelpTextMetadata: boolean;
|
|
35
37
|
};
|
|
36
38
|
|
|
37
39
|
type UserDefinedMarkdownConfig = {
|
package/dist/index.js
CHANGED
|
@@ -714,6 +714,9 @@ function fieldMetadataToRenderable(field, config, headingLevel) {
|
|
|
714
714
|
apiName: getApiName(field.name, config),
|
|
715
715
|
fieldType: field.type,
|
|
716
716
|
required: field.required,
|
|
717
|
+
complianceGroup: renderComplianceGroup(field.complianceGroup, config),
|
|
718
|
+
securityClassification: renderComplianceGroup(field.securityClassification, config),
|
|
719
|
+
inlineHelpText: renderInlineHelpText(field.inlineHelpText, config),
|
|
717
720
|
pickListValues: field.pickListValues ? {
|
|
718
721
|
headingLevel: headingLevel + 1,
|
|
719
722
|
heading: "Possible values are",
|
|
@@ -742,6 +745,20 @@ function getApiName(currentName, config) {
|
|
|
742
745
|
}
|
|
743
746
|
return currentName;
|
|
744
747
|
}
|
|
748
|
+
function renderComplianceGroup(complianceGroup, config) {
|
|
749
|
+
if (config.includeFieldSecurityMetadata) {
|
|
750
|
+
return complianceGroup;
|
|
751
|
+
} else {
|
|
752
|
+
return null;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
function renderInlineHelpText(inlineHelpText, config) {
|
|
756
|
+
if (config.includeInlineHelpTextMetadata) {
|
|
757
|
+
return inlineHelpText;
|
|
758
|
+
} else {
|
|
759
|
+
return null;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
745
762
|
|
|
746
763
|
const generateLink = (strategy) => {
|
|
747
764
|
switch (strategy) {
|
|
@@ -1527,7 +1544,9 @@ const markdownDefaults = __spreadProps$i(__spreadValues$i({}, markdownAndChangel
|
|
|
1527
1544
|
sortAlphabetically: false,
|
|
1528
1545
|
linkingStrategy: "relative",
|
|
1529
1546
|
referenceGuideTitle: "Reference Guide",
|
|
1530
|
-
excludeTags: []
|
|
1547
|
+
excludeTags: [],
|
|
1548
|
+
includeFieldSecurityMetadata: false,
|
|
1549
|
+
includeInlineHelpTextMetadata: false
|
|
1531
1550
|
});
|
|
1532
1551
|
const openApiDefaults = __spreadProps$i(__spreadValues$i({}, commonDefaults), {
|
|
1533
1552
|
fileName: "openapi",
|
|
@@ -1566,6 +1585,21 @@ const customObjectTemplate = `
|
|
|
1566
1585
|
{{{renderContent description}}}
|
|
1567
1586
|
{{/if}}
|
|
1568
1587
|
|
|
1588
|
+
{{#if inlineHelpText}}
|
|
1589
|
+
**Inline Help Text**
|
|
1590
|
+
{{inlineHelpText}}
|
|
1591
|
+
{{/if}}
|
|
1592
|
+
|
|
1593
|
+
{{#if complianceGroup}}
|
|
1594
|
+
**Compliance Group**
|
|
1595
|
+
{{complianceGroup}}
|
|
1596
|
+
{{/if}}
|
|
1597
|
+
|
|
1598
|
+
{{#if securityClassification}}
|
|
1599
|
+
**Security Classification**
|
|
1600
|
+
{{securityClassification}}
|
|
1601
|
+
{{/if}}
|
|
1602
|
+
|
|
1569
1603
|
**API Name**
|
|
1570
1604
|
|
|
1571
1605
|
\`{{{apiName}}}\`
|
|
@@ -2162,6 +2196,9 @@ function convertInlineFieldsToCustomFieldMetadata(inlineField, parentName) {
|
|
|
2162
2196
|
const label = inlineField.label ? inlineField.label : name;
|
|
2163
2197
|
const type = inlineField.type ? inlineField.type : null;
|
|
2164
2198
|
const required = inlineField.required ? inlineField.required : false;
|
|
2199
|
+
const securityClassification = inlineField.securityClassification ? inlineField.securityClassification : null;
|
|
2200
|
+
const complianceGroup = inlineField.complianceGroup ? inlineField.complianceGroup : null;
|
|
2201
|
+
const inlineHelpText = inlineField.inlineHelpText ? inlineField.inlineHelpText : null;
|
|
2165
2202
|
return {
|
|
2166
2203
|
type_name: "customfield",
|
|
2167
2204
|
description,
|
|
@@ -2170,6 +2207,9 @@ function convertInlineFieldsToCustomFieldMetadata(inlineField, parentName) {
|
|
|
2170
2207
|
parentName,
|
|
2171
2208
|
type,
|
|
2172
2209
|
required,
|
|
2210
|
+
securityClassification,
|
|
2211
|
+
complianceGroup,
|
|
2212
|
+
inlineHelpText,
|
|
2173
2213
|
pickListValues: getPickListValues(inlineField)
|
|
2174
2214
|
};
|
|
2175
2215
|
}
|
|
@@ -2241,7 +2281,10 @@ function toCustomFieldMetadata(parserResult) {
|
|
|
2241
2281
|
const customField = (parserResult == null ? void 0 : parserResult.CustomField) != null && typeof parserResult.CustomField === "object" ? parserResult.CustomField : {};
|
|
2242
2282
|
const defaultValues = {
|
|
2243
2283
|
description: null,
|
|
2244
|
-
required: false
|
|
2284
|
+
required: false,
|
|
2285
|
+
securityClassification: null,
|
|
2286
|
+
complianceGroup: null,
|
|
2287
|
+
inlineHelpText: null
|
|
2245
2288
|
};
|
|
2246
2289
|
return __spreadProps$c(__spreadValues$c(__spreadValues$c({}, defaultValues), customField), {
|
|
2247
2290
|
type_name: "customfield",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cparra/apexdocs",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.1",
|
|
4
4
|
"description": "Library with CLI capabilities to generate documentation for Salesforce Apex classes.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"apex",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"ts-jest": "^29.2.0",
|
|
81
81
|
"typescript": "^5.7.3",
|
|
82
82
|
"typescript-eslint": "^7.16.0",
|
|
83
|
-
"wireit": "^0.14.
|
|
83
|
+
"wireit": "^0.14.12"
|
|
84
84
|
},
|
|
85
85
|
"husky": {
|
|
86
86
|
"hooks": {
|