@cparra/apexdocs 3.11.0 → 3.12.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 +1 -1
- package/dist/cli/generate.js +6 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/{logger-C1Ezw_pW.js → logger-DZpyHcLp.js} +28 -2
- package/package.json +2 -2
package/README.md
CHANGED
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-DZpyHcLp.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,11 @@ 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
|
|
120
125
|
}
|
|
121
126
|
};
|
|
122
127
|
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -714,6 +714,8 @@ function fieldMetadataToRenderable(field, config, headingLevel) {
|
|
|
714
714
|
apiName: getApiName(field.name, config),
|
|
715
715
|
fieldType: field.type,
|
|
716
716
|
required: field.required,
|
|
717
|
+
complianceCategory: renderComplianceCategory(field.complianceCategory, config),
|
|
718
|
+
securityClassification: renderComplianceCategory(field.securityClassification, config),
|
|
717
719
|
pickListValues: field.pickListValues ? {
|
|
718
720
|
headingLevel: headingLevel + 1,
|
|
719
721
|
heading: "Possible values are",
|
|
@@ -742,6 +744,13 @@ function getApiName(currentName, config) {
|
|
|
742
744
|
}
|
|
743
745
|
return currentName;
|
|
744
746
|
}
|
|
747
|
+
function renderComplianceCategory(complianceCategory, config) {
|
|
748
|
+
if (config.includeFieldSecurityMetadata) {
|
|
749
|
+
return complianceCategory;
|
|
750
|
+
} else {
|
|
751
|
+
return null;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
745
754
|
|
|
746
755
|
const generateLink = (strategy) => {
|
|
747
756
|
switch (strategy) {
|
|
@@ -1527,7 +1536,8 @@ const markdownDefaults = __spreadProps$i(__spreadValues$i({}, markdownAndChangel
|
|
|
1527
1536
|
sortAlphabetically: false,
|
|
1528
1537
|
linkingStrategy: "relative",
|
|
1529
1538
|
referenceGuideTitle: "Reference Guide",
|
|
1530
|
-
excludeTags: []
|
|
1539
|
+
excludeTags: [],
|
|
1540
|
+
includeFieldSecurityMetadata: false
|
|
1531
1541
|
});
|
|
1532
1542
|
const openApiDefaults = __spreadProps$i(__spreadValues$i({}, commonDefaults), {
|
|
1533
1543
|
fileName: "openapi",
|
|
@@ -1566,6 +1576,16 @@ const customObjectTemplate = `
|
|
|
1566
1576
|
{{{renderContent description}}}
|
|
1567
1577
|
{{/if}}
|
|
1568
1578
|
|
|
1579
|
+
{{#if complianceCategory}}
|
|
1580
|
+
**Compliance Category**
|
|
1581
|
+
{{complianceCategory}}
|
|
1582
|
+
{{/if}}
|
|
1583
|
+
|
|
1584
|
+
{{#if securityClassification}}
|
|
1585
|
+
**Security Classification**
|
|
1586
|
+
{{securityClassification}}
|
|
1587
|
+
{{/if}}
|
|
1588
|
+
|
|
1569
1589
|
**API Name**
|
|
1570
1590
|
|
|
1571
1591
|
\`{{{apiName}}}\`
|
|
@@ -2162,6 +2182,8 @@ function convertInlineFieldsToCustomFieldMetadata(inlineField, parentName) {
|
|
|
2162
2182
|
const label = inlineField.label ? inlineField.label : name;
|
|
2163
2183
|
const type = inlineField.type ? inlineField.type : null;
|
|
2164
2184
|
const required = inlineField.required ? inlineField.required : false;
|
|
2185
|
+
const securityClassification = inlineField.securityClassification ? inlineField.securityClassification : null;
|
|
2186
|
+
const complianceCategory = inlineField.complianceCategory ? inlineField.complianceCategory : null;
|
|
2165
2187
|
return {
|
|
2166
2188
|
type_name: "customfield",
|
|
2167
2189
|
description,
|
|
@@ -2170,6 +2192,8 @@ function convertInlineFieldsToCustomFieldMetadata(inlineField, parentName) {
|
|
|
2170
2192
|
parentName,
|
|
2171
2193
|
type,
|
|
2172
2194
|
required,
|
|
2195
|
+
securityClassification,
|
|
2196
|
+
complianceCategory,
|
|
2173
2197
|
pickListValues: getPickListValues(inlineField)
|
|
2174
2198
|
};
|
|
2175
2199
|
}
|
|
@@ -2241,7 +2265,9 @@ function toCustomFieldMetadata(parserResult) {
|
|
|
2241
2265
|
const customField = (parserResult == null ? void 0 : parserResult.CustomField) != null && typeof parserResult.CustomField === "object" ? parserResult.CustomField : {};
|
|
2242
2266
|
const defaultValues = {
|
|
2243
2267
|
description: null,
|
|
2244
|
-
required: false
|
|
2268
|
+
required: false,
|
|
2269
|
+
securityClassification: null,
|
|
2270
|
+
complianceCategory: null
|
|
2245
2271
|
};
|
|
2246
2272
|
return __spreadProps$c(__spreadValues$c(__spreadValues$c({}, defaultValues), customField), {
|
|
2247
2273
|
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.0",
|
|
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": {
|