@cparra/apexdocs 3.12.0 → 3.12.2

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 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
 
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
 
4
- var logger$1 = require('../logger-DZpyHcLp.js');
5
- var module$1 = require('module');
4
+ var logger$1 = require('../logger-B8yR_O0h.js');
5
+ var require$$0 = require('yargs');
6
6
  var cosmiconfig = require('cosmiconfig');
7
7
  var E = require('fp-ts/Either');
8
8
  var cosmiconfigTypescriptLoader = require('cosmiconfig-typescript-loader');
@@ -24,32 +24,25 @@ require('minimatch');
24
24
  require('@salesforce/source-deploy-retrieve');
25
25
  require('chalk');
26
26
 
27
- var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
28
27
  function _interopNamespaceDefault(e) {
29
- var n = Object.create(null);
30
- if (e) {
31
- Object.keys(e).forEach(function (k) {
32
- if (k !== 'default') {
33
- var d = Object.getOwnPropertyDescriptor(e, k);
34
- Object.defineProperty(n, k, d.get ? d : {
35
- enumerable: true,
36
- get: function () { return e[k]; }
37
- });
38
- }
39
- });
40
- }
41
- n.default = e;
42
- return Object.freeze(n);
28
+ var n = Object.create(null);
29
+ if (e) {
30
+ Object.keys(e).forEach(function (k) {
31
+ if (k !== 'default') {
32
+ var d = Object.getOwnPropertyDescriptor(e, k);
33
+ Object.defineProperty(n, k, d.get ? d : {
34
+ enumerable: true,
35
+ get: function () { return e[k]; }
36
+ });
37
+ }
38
+ });
39
+ }
40
+ n.default = e;
41
+ return Object.freeze(n);
43
42
  }
44
43
 
45
44
  var E__namespace = /*#__PURE__*/_interopNamespaceDefault(E);
46
45
 
47
- var require$1 = (
48
- false
49
- ? /* @__PURE__ */ module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli/generate.js', document.baseURI).href)))
50
- : require
51
- );
52
-
53
46
  const markdownOptions = {
54
47
  sourceDir: {
55
48
  type: "string",
@@ -122,6 +115,10 @@ const markdownOptions = {
122
115
  type: "boolean",
123
116
  describe: "Whether to include the compliance category and security classification for fields in the generated files.",
124
117
  default: logger$1.markdownDefaults.includeFieldSecurityMetadata
118
+ },
119
+ includeInlineHelpTextMetadata: {
120
+ type: "boolean",
121
+ describe: "Whether to include the inline help text for fields in the generated files."
125
122
  }
126
123
  };
127
124
 
@@ -244,7 +241,7 @@ var __async$1 = (__this, __arguments, generator) => {
244
241
  step((generator = generator.apply(__this, __arguments)).next());
245
242
  });
246
243
  };
247
- const yargs = require$1("yargs");
244
+ const yargs = require$$0;
248
245
  const configOnlyMarkdownDefaults = {
249
246
  targetGenerator: "markdown",
250
247
  excludeTags: [],
@@ -424,8 +421,8 @@ function main() {
424
421
  logger.error(`\u274C An error occurred while processing the request: ${error}`);
425
422
  process.exit(1);
426
423
  }
427
- extractArgs().then((maybeConfigs) => __async(this, null, function* () {
428
- E__namespace.match(catchUnexpectedError, (configs) => __async(this, null, function* () {
424
+ extractArgs().then((maybeConfigs) => __async(null, null, function* () {
425
+ E__namespace.match(catchUnexpectedError, (configs) => __async(null, null, function* () {
429
426
  for (const config of configs) {
430
427
  yield logger$1.Apexdocs.generate(config, logger).then(parseResult);
431
428
  }
package/dist/index.d.ts CHANGED
@@ -33,6 +33,7 @@ type CliConfigurableMarkdownConfig = {
33
33
  linkingStrategy: LinkingStrategy;
34
34
  referenceGuideTitle: string;
35
35
  includeFieldSecurityMetadata: boolean;
36
+ includeInlineHelpTextMetadata: boolean;
36
37
  };
37
38
 
38
39
  type UserDefinedMarkdownConfig = {
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var logger = require('./logger-DZpyHcLp.js');
3
+ var logger = require('./logger-B8yR_O0h.js');
4
4
  var E = require('fp-ts/Either');
5
5
  require('fp-ts/function');
6
6
  require('fp-ts/TaskEither');
@@ -714,8 +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
- complianceCategory: renderComplianceCategory(field.complianceCategory, config),
718
- securityClassification: renderComplianceCategory(field.securityClassification, config),
717
+ complianceGroup: renderComplianceGroup(field.complianceGroup, config),
718
+ securityClassification: renderComplianceGroup(field.securityClassification, config),
719
+ inlineHelpText: renderInlineHelpText(field.inlineHelpText, config),
719
720
  pickListValues: field.pickListValues ? {
720
721
  headingLevel: headingLevel + 1,
721
722
  heading: "Possible values are",
@@ -744,9 +745,16 @@ function getApiName(currentName, config) {
744
745
  }
745
746
  return currentName;
746
747
  }
747
- function renderComplianceCategory(complianceCategory, config) {
748
+ function renderComplianceGroup(complianceGroup, config) {
748
749
  if (config.includeFieldSecurityMetadata) {
749
- return complianceCategory;
750
+ return complianceGroup;
751
+ } else {
752
+ return null;
753
+ }
754
+ }
755
+ function renderInlineHelpText(inlineHelpText, config) {
756
+ if (config.includeInlineHelpTextMetadata) {
757
+ return inlineHelpText;
750
758
  } else {
751
759
  return null;
752
760
  }
@@ -1537,7 +1545,8 @@ const markdownDefaults = __spreadProps$i(__spreadValues$i({}, markdownAndChangel
1537
1545
  linkingStrategy: "relative",
1538
1546
  referenceGuideTitle: "Reference Guide",
1539
1547
  excludeTags: [],
1540
- includeFieldSecurityMetadata: false
1548
+ includeFieldSecurityMetadata: false,
1549
+ includeInlineHelpTextMetadata: false
1541
1550
  });
1542
1551
  const openApiDefaults = __spreadProps$i(__spreadValues$i({}, commonDefaults), {
1543
1552
  fileName: "openapi",
@@ -1576,9 +1585,14 @@ const customObjectTemplate = `
1576
1585
  {{{renderContent description}}}
1577
1586
  {{/if}}
1578
1587
 
1579
- {{#if complianceCategory}}
1580
- **Compliance Category**
1581
- {{complianceCategory}}
1588
+ {{#if inlineHelpText}}
1589
+ **Inline Help Text**
1590
+ {{inlineHelpText}}
1591
+ {{/if}}
1592
+
1593
+ {{#if complianceGroup}}
1594
+ **Compliance Group**
1595
+ {{complianceGroup}}
1582
1596
  {{/if}}
1583
1597
 
1584
1598
  {{#if securityClassification}}
@@ -2183,7 +2197,8 @@ function convertInlineFieldsToCustomFieldMetadata(inlineField, parentName) {
2183
2197
  const type = inlineField.type ? inlineField.type : null;
2184
2198
  const required = inlineField.required ? inlineField.required : false;
2185
2199
  const securityClassification = inlineField.securityClassification ? inlineField.securityClassification : null;
2186
- const complianceCategory = inlineField.complianceCategory ? inlineField.complianceCategory : null;
2200
+ const complianceGroup = inlineField.complianceGroup ? inlineField.complianceGroup : null;
2201
+ const inlineHelpText = inlineField.inlineHelpText ? inlineField.inlineHelpText : null;
2187
2202
  return {
2188
2203
  type_name: "customfield",
2189
2204
  description,
@@ -2193,7 +2208,8 @@ function convertInlineFieldsToCustomFieldMetadata(inlineField, parentName) {
2193
2208
  type,
2194
2209
  required,
2195
2210
  securityClassification,
2196
- complianceCategory,
2211
+ complianceGroup,
2212
+ inlineHelpText,
2197
2213
  pickListValues: getPickListValues(inlineField)
2198
2214
  };
2199
2215
  }
@@ -2267,7 +2283,8 @@ function toCustomFieldMetadata(parserResult) {
2267
2283
  description: null,
2268
2284
  required: false,
2269
2285
  securityClassification: null,
2270
- complianceCategory: null
2286
+ complianceGroup: null,
2287
+ inlineHelpText: null
2271
2288
  };
2272
2289
  return __spreadProps$c(__spreadValues$c(__spreadValues$c({}, defaultValues), customField), {
2273
2290
  type_name: "customfield",
@@ -2702,8 +2719,8 @@ function transformDocumentationBundleHook(config) {
2702
2719
  (error) => new HookError(error)
2703
2720
  );
2704
2721
  }
2705
- const execTransformReferenceHook = (_0, ..._1) => __async$3(void 0, [_0, ..._1], function* (references, hook = passThroughHook) {
2706
- const hooked = references.map((reference) => __async$3(void 0, null, function* () {
2722
+ const execTransformReferenceHook = (_0, ..._1) => __async$3(null, [_0, ..._1], function* (references, hook = passThroughHook) {
2723
+ const hooked = references.map((reference) => __async$3(null, null, function* () {
2707
2724
  const hookedResult = yield hook(reference);
2708
2725
  return __spreadValues$8(__spreadValues$8({}, reference), hookedResult);
2709
2726
  }));
@@ -2713,24 +2730,24 @@ const execTransformReferenceHook = (_0, ..._1) => __async$3(void 0, [_0, ..._1],
2713
2730
  return acc;
2714
2731
  }, {});
2715
2732
  });
2716
- const documentationBundleHook = (bundle, config) => __async$3(void 0, null, function* () {
2733
+ const documentationBundleHook = (bundle, config) => __async$3(null, null, function* () {
2717
2734
  return {
2718
2735
  referenceGuide: yield transformReferenceGuide(bundle.referenceGuide, config.transformReferenceGuide),
2719
2736
  docs: yield transformDocs(bundle.docs, config.transformDocs, config.transformDocPage)
2720
2737
  };
2721
2738
  });
2722
- const transformReferenceGuide = (_0, ..._1) => __async$3(void 0, [_0, ..._1], function* (referenceGuide, hook = passThroughHook) {
2739
+ const transformReferenceGuide = (_0, ..._1) => __async$3(null, [_0, ..._1], function* (referenceGuide, hook = passThroughHook) {
2723
2740
  const result = yield hook(referenceGuide);
2724
2741
  if (isSkip(result)) {
2725
2742
  return result;
2726
2743
  }
2727
2744
  return __spreadValues$8(__spreadValues$8({}, referenceGuide), yield hook(referenceGuide));
2728
2745
  });
2729
- const transformDocs = (_0, ..._1) => __async$3(void 0, [_0, ..._1], function* (docs, transformDocsHook = passThroughHook, transformDocPageHook = passThroughHook) {
2746
+ const transformDocs = (_0, ..._1) => __async$3(null, [_0, ..._1], function* (docs, transformDocsHook = passThroughHook, transformDocPageHook = passThroughHook) {
2730
2747
  const transformed = yield transformDocsHook(docs);
2731
2748
  return Promise.all(transformed.map((doc) => transformDocPage(doc, transformDocPageHook)));
2732
2749
  });
2733
- const transformDocPage = (_0, ..._1) => __async$3(void 0, [_0, ..._1], function* (doc, hook = passThroughHook) {
2750
+ const transformDocPage = (_0, ..._1) => __async$3(null, [_0, ..._1], function* (doc, hook = passThroughHook) {
2734
2751
  return __spreadValues$8(__spreadValues$8({}, doc), yield hook(doc));
2735
2752
  });
2736
2753
  function postHookCompile$1(bundle) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cparra/apexdocs",
3
- "version": "3.12.0",
3
+ "version": "3.12.2",
4
4
  "description": "Library with CLI capabilities to generate documentation for Salesforce Apex classes.",
5
5
  "keywords": [
6
6
  "apex",
@@ -94,7 +94,7 @@
94
94
  },
95
95
  "dependencies": {
96
96
  "@cparra/apex-reflection": "2.19.0",
97
- "@salesforce/source-deploy-retrieve": "^12.8.1",
97
+ "@salesforce/source-deploy-retrieve": "^12.20.1",
98
98
  "@types/js-yaml": "^4.0.9",
99
99
  "@types/yargs": "^17.0.32",
100
100
  "chalk": "^4.1.2",