@salesforce/plugin-command-reference 3.1.107 → 3.1.109

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.
Files changed (46) hide show
  1. package/README.md +7 -4
  2. package/lib/commands/commandreference/generate.d.ts +1 -0
  3. package/lib/commands/commandreference/generate.js +10 -3
  4. package/lib/commands/commandreference/generate.js.map +1 -1
  5. package/lib/ditamap/command-helpers.d.ts +25 -0
  6. package/lib/ditamap/command-helpers.js +59 -0
  7. package/lib/ditamap/command-helpers.js.map +1 -0
  8. package/lib/ditamap/command.d.ts +1 -14
  9. package/lib/ditamap/command.js +2 -44
  10. package/lib/ditamap/command.js.map +1 -1
  11. package/lib/docs.d.ts +3 -1
  12. package/lib/docs.js +29 -27
  13. package/lib/docs.js.map +1 -1
  14. package/lib/generator-factory.d.ts +46 -0
  15. package/lib/generator-factory.js +89 -0
  16. package/lib/generator-factory.js.map +1 -0
  17. package/lib/markdown/cli-reference.d.ts +10 -0
  18. package/lib/markdown/cli-reference.js +50 -0
  19. package/lib/markdown/cli-reference.js.map +1 -0
  20. package/lib/markdown/command.d.ts +17 -0
  21. package/lib/markdown/command.js +257 -0
  22. package/lib/markdown/command.js.map +1 -0
  23. package/lib/markdown/index.d.ts +7 -0
  24. package/lib/markdown/index.js +23 -0
  25. package/lib/markdown/index.js.map +1 -0
  26. package/lib/markdown/markdown-base.d.ts +10 -0
  27. package/lib/markdown/markdown-base.js +39 -0
  28. package/lib/markdown/markdown-base.js.map +1 -0
  29. package/lib/markdown/root-index.d.ts +6 -0
  30. package/lib/markdown/root-index.js +37 -0
  31. package/lib/markdown/root-index.js.map +1 -0
  32. package/lib/markdown/toc.d.ts +8 -0
  33. package/lib/markdown/toc.js +68 -0
  34. package/lib/markdown/toc.js.map +1 -0
  35. package/lib/markdown/topic-commands.d.ts +8 -0
  36. package/lib/markdown/topic-commands.js +40 -0
  37. package/lib/markdown/topic-commands.js.map +1 -0
  38. package/lib/markdown/topic-index.d.ts +9 -0
  39. package/lib/markdown/topic-index.js +80 -0
  40. package/lib/markdown/topic-index.js.map +1 -0
  41. package/lib/utils.d.ts +1 -1
  42. package/messages/main.md +5 -1
  43. package/npm-shrinkwrap.json +33 -33
  44. package/oclif.lock +13 -41
  45. package/oclif.manifest.json +14 -2
  46. package/package.json +15 -2
@@ -0,0 +1,68 @@
1
+ /*
2
+ * Copyright 2026, Salesforce, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { MarkdownBase } from './markdown-base.js';
17
+ const STATE_LABELS = {
18
+ beta: 'Beta',
19
+ preview: 'Developer Preview',
20
+ closedPilot: 'Closed Pilot',
21
+ openPilot: 'Open Pilot',
22
+ deprecated: 'Deprecated',
23
+ };
24
+ export class MarkdownToc extends MarkdownBase {
25
+ topicEntries;
26
+ constructor(topicEntries, outputDir) {
27
+ super('sfclireference-toc.yml', outputDir);
28
+ this.topicEntries = topicEntries;
29
+ }
30
+ static file() {
31
+ return 'sfclireference-toc.yml';
32
+ }
33
+ // eslint-disable-next-line class-methods-use-this
34
+ generate() {
35
+ const lines = [
36
+ '- title: Salesforce CLI Command Reference',
37
+ ' link: cli_reference.md',
38
+ '- title: Release Notes',
39
+ ' link: cli_reference_release_notes.md',
40
+ '- title: Deprecation Policy',
41
+ ' link: cli_reference_deprecation.md',
42
+ ];
43
+ const sorted = [...this.topicEntries].sort((a, b) => a.topic.localeCompare(b.topic));
44
+ for (const { topic, commandIds } of sorted) {
45
+ lines.push(`- title: ${topic} Commands`);
46
+ lines.push(` link: ${topic}/cli_reference_${topic}.md`);
47
+ lines.push(' topics:');
48
+ for (const { id, state, deprecated } of [...commandIds].sort((a, b) => a.id.localeCompare(b.id))) {
49
+ const commandWithUnderscores = id.replace(/:/g, '_');
50
+ const commandWithSpaces = id.replace(/:/g, ' ');
51
+ const stateLabel = deprecated
52
+ ? ' (Deprecated)'
53
+ : state && STATE_LABELS[state]
54
+ ? ` (${STATE_LABELS[state]})`
55
+ : '';
56
+ const isTopicLevelCommand = !id.includes(':');
57
+ const linkTarget = isTopicLevelCommand
58
+ ? `cli_reference_${commandWithUnderscores}_command.md`
59
+ : `cli_reference_${commandWithUnderscores}.md`;
60
+ lines.push(` - title: ${commandWithSpaces}${stateLabel}`);
61
+ lines.push(` link: ${topic}/${linkTarget}`);
62
+ }
63
+ }
64
+ lines.push('');
65
+ return Promise.resolve(lines.join('\n'));
66
+ }
67
+ }
68
+ //# sourceMappingURL=toc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toc.js","sourceRoot":"","sources":["../../src/markdown/toc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,YAAY,GAA2B;IAC3C,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,mBAAmB;IAC5B,WAAW,EAAE,cAAc;IAC3B,SAAS,EAAE,YAAY;IACvB,UAAU,EAAE,YAAY;CACzB,CAAC;AAEF,MAAM,OAAO,WAAY,SAAQ,YAAY;IAChB;IAA3B,YAA2B,YAA6B,EAAE,SAAiB;QACzE,KAAK,CAAC,wBAAwB,EAAE,SAAS,CAAC,CAAC;QADlB,iBAAY,GAAZ,YAAY,CAAiB;IAExD,CAAC;IAEM,MAAM,CAAU,IAAI;QACzB,OAAO,wBAAwB,CAAC;IAClC,CAAC;IAED,kDAAkD;IACxC,QAAQ;QAChB,MAAM,KAAK,GAAa;YACtB,2CAA2C;YAC3C,0BAA0B;YAC1B,wBAAwB;YACxB,wC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AAsB,aAAa;oBACtD,CAAC,CAAC,iBAAiB,sBAAsB,KAAK,CAAC;gBACjD,KAAK,CAAC,IAAI,CAAC,gBAAgB,iBAAiB,GAAG,UAAU,EAAE,CAAC,CAAC;gBAC7D,KAAK,CAAC,IAAI,CAAC,eAAe,KAAK,IAAI,UAAU,EAAE,CAAC,CAAC;YACnD,CAAC;QACH,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3C,CAAC;CACF"}
@@ -0,0 +1,8 @@
1
+ import { SfTopic } from '../utils.js';
2
+ import { MarkdownBase } from './markdown-base.js';
3
+ export declare class MarkdownTopicCommands extends MarkdownBase {
4
+ private topic;
5
+ private topicMeta;
6
+ constructor(topic: string, topicMeta: SfTopic, outputDir: string);
7
+ protected generate(): Promise<string>;
8
+ }
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Copyright 2026, Salesforce, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { join } from 'node:path';
17
+ import { MarkdownBase } from './markdown-base.js';
18
+ export class MarkdownTopicCommands extends MarkdownBase {
19
+ topic;
20
+ topicMeta;
21
+ constructor(topic, topicMeta, outputDir) {
22
+ const filename = MarkdownBase.file(`cli_reference_${topic}_commands`);
23
+ super(filename, outputDir);
24
+ this.topic = topic;
25
+ this.topicMeta = topicMeta;
26
+ this.destination = join(outputDir, topic, filename);
27
+ }
28
+ generate() {
29
+ const lines = [];
30
+ lines.push('');
31
+ lines.push(`# ${this.topic} Commands`);
32
+ lines.push('');
33
+ if (this.topicMeta.description) {
34
+ lines.push(this.topicMeta.description);
35
+ lines.push('');
36
+ }
37
+ return Promise.resolve(lines.join('\n'));
38
+ }
39
+ }
40
+ //# sourceMappingURL=topic-commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topic-commands.js","sourceRoot":"","sources":["../../src/markdown/topic-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,OAAO,qBAAsB,SAAQ,YAAY;IAC1B;IAAuB;IAAlD,YAA2B,KAAa,EAAU,SAAkB,EAAE,SAAiB;QACrF,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,iBAAiB,KAAK,WAAW,CAAC,CAAC;QACtE,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;QAFF,UAAK,GAAL,KAAK,CAAQ;QAAU,cAAS,GAAT,SAAS,CAAS;QAGlE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC;IAES,QAAQ;QAChB,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,WAAW,CAAC,CAAC;QACvC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,IAAI,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;YAC/B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;YACvC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;QACD,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3C,CAAC;CACF"}
@@ -0,0 +1,9 @@
1
+ import { CommandClass, SfTopic } from '../utils.js';
2
+ import { MarkdownBase } from './markdown-base.js';
3
+ export declare class MarkdownTopicIndex extends MarkdownBase {
4
+ private topic;
5
+ private commands;
6
+ private topicMeta;
7
+ constructor(topic: string, commands: CommandClass[], topicMeta: SfTopic, outputDir: string);
8
+ protected generate(): Promise<string>;
9
+ }
@@ -0,0 +1,80 @@
1
+ /*
2
+ * Copyright 2026, Salesforce, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { join } from 'node:path';
17
+ import { punctuate } from '../utils.js';
18
+ import { MarkdownBase } from './markdown-base.js';
19
+ function resolveStateLabel(command) {
20
+ const deprecated = Boolean(command.deprecated);
21
+ const state = command.state;
22
+ if (deprecated)
23
+ return 'Deprecated';
24
+ if (state === 'beta')
25
+ return 'Beta';
26
+ if (state === 'preview')
27
+ return 'Developer Preview';
28
+ if (state === 'closedPilot' || state === 'openPilot')
29
+ return 'Pilot';
30
+ return null;
31
+ }
32
+ export class MarkdownTopicIndex extends MarkdownBase {
33
+ topic;
34
+ commands;
35
+ topicMeta;
36
+ constructor(topic, commands, topicMeta, outputDir) {
37
+ const filename = MarkdownBase.file(`cli_reference_${topic}`);
38
+ super(filename, outputDir);
39
+ this.topic = topic;
40
+ this.commands = commands;
41
+ this.topicMeta = topicMeta;
42
+ this.destination = join(outputDir, topic, filename);
43
+ }
44
+ generate() {
45
+ const lines = [];
46
+ lines.push('<!-- prettier-ignore-start -->');
47
+ lines.push('');
48
+ lines.push(`# ${this.topic} Commands`);
49
+ lines.push('');
50
+ if (this.topicMeta.description) {
51
+ lines.push(this.topicMeta.description);
52
+ lines.push('');
53
+ }
54
+ const sortedCommands = [...this.commands].sort((a, b) => a.id.localeCompare(b.id));
55
+ for (const command of sortedCommands) {
56
+ const id = command.id;
57
+ const commandWithUnderscores = id.replace(/:/g, '_');
58
+ const commandWithSpaces = id.replace(/:/g, ' ');
59
+ const isTopicLevelCommand = !id.includes(':');
60
+ const linkTarget = isTopicLevelCommand
61
+ ? `cli_reference_${commandWithUnderscores}_command.md`
62
+ : `cli_reference_${commandWithUnderscores}.md`;
63
+ const stateLabel = resolveStateLabel(command);
64
+ const commandDisplay = stateLabel ? `${commandWithSpaces} (${stateLabel})` : commandWithSpaces;
65
+ const summary = punctuate(command.summary);
66
+ if (summary) {
67
+ lines.push(`- **[${commandDisplay}](./${linkTarget})**<br>`);
68
+ lines.push(` ${summary}`);
69
+ }
70
+ else {
71
+ lines.push(`- **[${commandDisplay}](./${linkTarget})**`);
72
+ }
73
+ }
74
+ lines.push('');
75
+ lines.push('<!-- prettier-ignore-end -->');
76
+ lines.push('');
77
+ return Promise.resolve(lines.join('\n'));
78
+ }
79
+ }
80
+ //# sourceMappingURL=topic-index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topic-index.js","sourceRoot":"","sources":["../../src/markdown/topic-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAgB,SAAS,EAAW,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,SAAS,iBAAiB,CAAC,OAAqB;IAC9C,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC/C,MAAM,KAAK,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;QAC3C,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3C,CAAC;CACF"}
package/lib/utils.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { EventEmitter } from 'node:events';
2
2
  import { Command, Interfaces } from '@oclif/core';
3
3
  import { AnyJson } from '@salesforce/ts-types';
4
- export type CommandClass = Pick<Command.Class, 'id' | 'hidden' | 'description' | 'plugin' | 'state' | 'examples' | 'summary' | 'flags' | 'pluginName'> & {
4
+ export type CommandClass = Pick<Command.Class, 'id' | 'hidden' | 'description' | 'plugin' | 'state' | 'examples' | 'summary' | 'flags' | 'pluginName' | 'aliases'> & {
5
5
  topic: string;
6
6
  subtopic: string;
7
7
  longDescription?: string;
package/messages/main.md CHANGED
@@ -28,7 +28,11 @@ fail the command if there are any warnings
28
28
 
29
29
  # flags.ditamap-suffix.summary
30
30
 
31
- unique suffix to append to generated ditamap
31
+ unique suffix to append to generated DITA files
32
+
33
+ # flags.output-format.summary
34
+
35
+ output format for generated documentation; 'dita' (default) generates DITA XML files, 'markdown' generates Markdown files
32
36
 
33
37
  # flags.config-path.summary
34
38
 
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-command-reference",
3
- "version": "3.1.107",
3
+ "version": "3.1.109",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@salesforce/plugin-command-reference",
9
- "version": "3.1.107",
9
+ "version": "3.1.109",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@oclif/core": "^4",
13
13
  "@salesforce/core": "^8.31.0",
14
14
  "@salesforce/kit": "^3.2.6",
15
- "@salesforce/sf-plugins-core": "^12.2.22",
15
+ "@salesforce/sf-plugins-core": "^12.2.24",
16
16
  "@salesforce/ts-types": "^2.0.11",
17
17
  "chalk": "^5.6.2",
18
18
  "debug": "^4.4.3",
@@ -4969,13 +4969,13 @@
4969
4969
  "license": "BSD-3-Clause"
4970
4970
  },
4971
4971
  "node_modules/@salesforce/sf-plugins-core": {
4972
- "version": "12.2.22",
4973
- "resolved": "https://registry.npmjs.org/@salesforce/sf-plugins-core/-/sf-plugins-core-12.2.22.tgz",
4974
- "integrity": "sha512-ApuAXxIwpbJ8i+QooQF8L7z4nz+yJNlkaktbUBxG7LF2KSLKhVgvZjv42Ok1gNPtDnQN9P/hyvVBwDkfSz+6hw==",
4972
+ "version": "12.2.24",
4973
+ "resolved": "https://registry.npmjs.org/@salesforce/sf-plugins-core/-/sf-plugins-core-12.2.24.tgz",
4974
+ "integrity": "sha512-+lc7QMRz19Uk9f3lJO442LrUMvrRrfX6+xe1w42PihWjjoXpF9fZfZ7zk7H2WDF56PTo5SMJMrb5PjneiIrH3Q==",
4975
4975
  "license": "Apache-2.0",
4976
4976
  "dependencies": {
4977
- "@inquirer/confirm": "^6.0.12",
4978
- "@inquirer/password": "^5.0.13",
4977
+ "@inquirer/confirm": "^6.1.1",
4978
+ "@inquirer/password": "^5.1.1",
4979
4979
  "@oclif/core": "^4.11.4",
4980
4980
  "@oclif/table": "^0.5.9",
4981
4981
  "@salesforce/core": "^8.31.0",
@@ -4990,25 +4990,25 @@
4990
4990
  }
4991
4991
  },
4992
4992
  "node_modules/@salesforce/sf-plugins-core/node_modules/@inquirer/ansi": {
4993
- "version": "2.0.5",
4994
- "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-2.0.5.tgz",
4995
- "integrity": "sha512-doc2sWgJpbFQ64UflSVd17ibMGDuxO1yKgOgLMwavzESnXjFWJqUeG8saYosqKpHp4kWiM5x1nXvEjbpx90gzw==",
4993
+ "version": "2.0.7",
4994
+ "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-2.0.7.tgz",
4995
+ "integrity": "sha512-3eTuUO1vH2cZm2ZKHeQxnOqlTi9EfZDGgIe3BL3I4u+rJHocr9Fz86M4fjYABPvFnQG/gGK551HqDiIcETwU6Q==",
4996
4996
  "license": "MIT",
4997
4997
  "engines": {
4998
- "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0"
4998
+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"
4999
4999
  }
5000
5000
  },
5001
5001
  "node_modules/@salesforce/sf-plugins-core/node_modules/@inquirer/confirm": {
5002
- "version": "6.0.12",
5003
- "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-6.0.12.tgz",
5004
- "integrity": "sha512-h9FgGun3QwVYNj5TWIZZ+slii73bMoBFjPfVIGtnFuL4t8gBiNDV9PcSfIzkuxvgquJKt9nr1QzszpBzTbH8Og==",
5002
+ "version": "6.1.1",
5003
+ "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-6.1.1.tgz",
5004
+ "integrity": "sha512-eb8DBZcz/2qHWQda4rk2JiQk5h9QV/cVHi1yjt0f69WFZMRFn0sJTye3EAP8icut8UDMjQPsaH5KbcOogefrFQ==",
5005
5005
  "license": "MIT",
5006
5006
  "dependencies": {
5007
- "@inquirer/core": "^11.1.9",
5008
- "@inquirer/type": "^4.0.5"
5007
+ "@inquirer/core": "^11.2.1",
5008
+ "@inquirer/type": "^4.0.7"
5009
5009
  },
5010
5010
  "engines": {
5011
- "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0"
5011
+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"
5012
5012
  },
5013
5013
  "peerDependencies": {
5014
5014
  "@types/node": ">=18"
@@ -5020,21 +5020,21 @@
5020
5020
  }
5021
5021
  },
5022
5022
  "node_modules/@salesforce/sf-plugins-core/node_modules/@inquirer/core": {
5023
- "version": "11.1.9",
5024
- "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-11.1.9.tgz",
5025
- "integrity": "sha512-BDE4fG22uYh1bGSifcj7JSx119TVYNViMhMu85usp4Fswrzh6M0DV3yld64jA98uOAa2GSQ4Bg4bZRm2d2cwSg==",
5023
+ "version": "11.2.1",
5024
+ "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-11.2.1.tgz",
5025
+ "integrity": "sha512-Qd6GJT1yVyrZZCfN8W2qKF5ApmqryXRhRKCuip8h01x2w/esJQ2XIYc6f9abMIHgKQdBfFTSOdbHRLAhuM09UA==",
5026
5026
  "license": "MIT",
5027
5027
  "dependencies": {
5028
- "@inquirer/ansi": "^2.0.5",
5029
- "@inquirer/figures": "^2.0.5",
5030
- "@inquirer/type": "^4.0.5",
5028
+ "@inquirer/ansi": "^2.0.7",
5029
+ "@inquirer/figures": "^2.0.7",
5030
+ "@inquirer/type": "^4.0.7",
5031
5031
  "cli-width": "^4.1.0",
5032
5032
  "fast-wrap-ansi": "^0.2.0",
5033
5033
  "mute-stream": "^3.0.0",
5034
5034
  "signal-exit": "^4.1.0"
5035
5035
  },
5036
5036
  "engines": {
5037
- "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0"
5037
+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"
5038
5038
  },
5039
5039
  "peerDependencies": {
5040
5040
  "@types/node": ">=18"
@@ -5046,21 +5046,21 @@
5046
5046
  }
5047
5047
  },
5048
5048
  "node_modules/@salesforce/sf-plugins-core/node_modules/@inquirer/figures": {
5049
- "version": "2.0.5",
5050
- "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-2.0.5.tgz",
5051
- "integrity": "sha512-NsSs4kzfm12lNetHwAn3GEuH317IzpwrMCbOuMIVytpjnJ90YYHNwdRgYGuKmVxwuIqSgqk3M5qqQt1cDk0tGQ==",
5049
+ "version": "2.0.7",
5050
+ "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-2.0.7.tgz",
5051
+ "integrity": "sha512-aJ8TBPOGB6f/2qziPfElISTCEd5XOYTFckA2SGjhNmiKzfK/u4ot3v0DUzGVdUnKjN10EqnnEPck36BkyfLnJw==",
5052
5052
  "license": "MIT",
5053
5053
  "engines": {
5054
- "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0"
5054
+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"
5055
5055
  }
5056
5056
  },
5057
5057
  "node_modules/@salesforce/sf-plugins-core/node_modules/@inquirer/type": {
5058
- "version": "4.0.5",
5059
- "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-4.0.5.tgz",
5060
- "integrity": "sha512-aetVUNeKNc/VriqXlw1NRSW0zhMBB0W4bNbWRJgzRl/3d0QNDQFfk0GO5SDdtjMZVg6o8ZKEiadd7SCCzoOn5Q==",
5058
+ "version": "4.0.7",
5059
+ "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-4.0.7.tgz",
5060
+ "integrity": "sha512-t28inv14nMQ1PhKpsJPY+kEs/c00qzeCOS2gTNRyTjG5d6qsVA2fItxW4hkvGZ5lvanGLdtCzVIx5dwdRpN1+g==",
5061
5061
  "license": "MIT",
5062
5062
  "engines": {
5063
- "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0"
5063
+ "node": ">=23.5.0 || ^22.13.0 || ^20.17.0"
5064
5064
  },
5065
5065
  "peerDependencies": {
5066
5066
  "@types/node": ">=18"
package/oclif.lock CHANGED
@@ -971,11 +971,6 @@
971
971
  resolved "https://registry.yarnpkg.com/@inquirer/ansi/-/ansi-1.0.2.tgz#674a4c4d81ad460695cb2a1fc69d78cd187f337e"
972
972
  integrity sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==
973
973
 
974
- "@inquirer/ansi@^2.0.5":
975
- version "2.0.5"
976
- resolved "https://registry.yarnpkg.com/@inquirer/ansi/-/ansi-2.0.5.tgz#7b7e121f6a0c40128711daf20325e6ff2cdff8b7"
977
- integrity sha512-doc2sWgJpbFQ64UflSVd17ibMGDuxO1yKgOgLMwavzESnXjFWJqUeG8saYosqKpHp4kWiM5x1nXvEjbpx90gzw==
978
-
979
974
  "@inquirer/ansi@^2.0.7":
980
975
  version "2.0.7"
981
976
  resolved "https://registry.yarnpkg.com/@inquirer/ansi/-/ansi-2.0.7.tgz#86de22810cac3ed406ec10f8d66016815b8226b4"
@@ -1019,13 +1014,13 @@
1019
1014
  "@inquirer/core" "^10.3.2"
1020
1015
  "@inquirer/type" "^3.0.10"
1021
1016
 
1022
- "@inquirer/confirm@^6.0.12":
1023
- version "6.0.12"
1024
- resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-6.0.12.tgz#7a317aec813214cec2f5339b9fa0926c20bf0dbe"
1025
- integrity sha512-h9FgGun3QwVYNj5TWIZZ+slii73bMoBFjPfVIGtnFuL4t8gBiNDV9PcSfIzkuxvgquJKt9nr1QzszpBzTbH8Og==
1017
+ "@inquirer/confirm@^6.1.1":
1018
+ version "6.1.1"
1019
+ resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-6.1.1.tgz#9c6a7d79c6132b2af57fdb75747f056204e55356"
1020
+ integrity sha512-eb8DBZcz/2qHWQda4rk2JiQk5h9QV/cVHi1yjt0f69WFZMRFn0sJTye3EAP8icut8UDMjQPsaH5KbcOogefrFQ==
1026
1021
  dependencies:
1027
- "@inquirer/core" "^11.1.9"
1028
- "@inquirer/type" "^4.0.5"
1022
+ "@inquirer/core" "^11.2.1"
1023
+ "@inquirer/type" "^4.0.7"
1029
1024
 
1030
1025
  "@inquirer/core@^10.3.2":
1031
1026
  version "10.3.2"
@@ -1041,19 +1036,6 @@
1041
1036
  wrap-ansi "^6.2.0"
1042
1037
  yoctocolors-cjs "^2.1.3"
1043
1038
 
1044
- "@inquirer/core@^11.1.9":
1045
- version "11.1.9"
1046
- resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-11.1.9.tgz#97f099f5217f50f168c12db00ac07f51ab550fbb"
1047
- integrity sha512-BDE4fG22uYh1bGSifcj7JSx119TVYNViMhMu85usp4Fswrzh6M0DV3yld64jA98uOAa2GSQ4Bg4bZRm2d2cwSg==
1048
- dependencies:
1049
- "@inquirer/ansi" "^2.0.5"
1050
- "@inquirer/figures" "^2.0.5"
1051
- "@inquirer/type" "^4.0.5"
1052
- cli-width "^4.1.0"
1053
- fast-wrap-ansi "^0.2.0"
1054
- mute-stream "^3.0.0"
1055
- signal-exit "^4.1.0"
1056
-
1057
1039
  "@inquirer/core@^11.2.1":
1058
1040
  version "11.2.1"
1059
1041
  resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-11.2.1.tgz#54ccd8f7d47852140b6066cbd77d63b2c2b168fd"
@@ -1122,11 +1104,6 @@
1122
1104
  resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-1.0.13.tgz#ad0afd62baab1c23175115a9b62f511b6a751e45"
1123
1105
  integrity sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw==
1124
1106
 
1125
- "@inquirer/figures@^2.0.5":
1126
- version "2.0.5"
1127
- resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-2.0.5.tgz#d12f4889ac6ea7731ebc52bd9c066ca51d8fdee7"
1128
- integrity sha512-NsSs4kzfm12lNetHwAn3GEuH317IzpwrMCbOuMIVytpjnJ90YYHNwdRgYGuKmVxwuIqSgqk3M5qqQt1cDk0tGQ==
1129
-
1130
1107
  "@inquirer/figures@^2.0.7":
1131
1108
  version "2.0.7"
1132
1109
  resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-2.0.7.tgz#f5cc5843732a81304d06a0db4b53cc7dbda15541"
@@ -1165,7 +1142,7 @@
1165
1142
  "@inquirer/core" "^10.3.2"
1166
1143
  "@inquirer/type" "^3.0.10"
1167
1144
 
1168
- "@inquirer/password@^5.0.13":
1145
+ "@inquirer/password@^5.1.1":
1169
1146
  version "5.1.1"
1170
1147
  resolved "https://registry.yarnpkg.com/@inquirer/password/-/password-5.1.1.tgz#f21efb614da9c905095262f51781fd2a721fceac"
1171
1148
  integrity sha512-3XBfF7DAsp5qeDsvN5Rd1HmbNokVvEQoUM0QLrRcybC9nX96w3Pbmu7qUsb3IT3J3jBvs2+mTXaKHOUsgHMLzg==
@@ -1243,11 +1220,6 @@
1243
1220
  resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-3.0.10.tgz#11ed564ec78432a200ea2601a212d24af8150d50"
1244
1221
  integrity sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==
1245
1222
 
1246
- "@inquirer/type@^4.0.5":
1247
- version "4.0.5"
1248
- resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-4.0.5.tgz#a02d90e5da8a36dce27ac8e7237a50c99a9003a3"
1249
- integrity sha512-aetVUNeKNc/VriqXlw1NRSW0zhMBB0W4bNbWRJgzRl/3d0QNDQFfk0GO5SDdtjMZVg6o8ZKEiadd7SCCzoOn5Q==
1250
-
1251
1223
  "@inquirer/type@^4.0.7":
1252
1224
  version "4.0.7"
1253
1225
  resolved "https://registry.yarnpkg.com/@inquirer/type/-/type-4.0.7.tgz#9c6f0d857fe6ad549a3a932343b64e76acb34b10"
@@ -1625,13 +1597,13 @@
1625
1597
  resolved "https://registry.yarnpkg.com/@salesforce/prettier-config/-/prettier-config-0.0.3.tgz#ba648d4886bb38adabe073dbea0b3a91b3753bb0"
1626
1598
  integrity sha512-hYOhoPTCSYMDYn+U1rlEk16PoBeAJPkrdg4/UtAzupM1mRRJOwEPMG1d7U8DxJFKuXW3DMEYWr2MwAIBDaHmFg==
1627
1599
 
1628
- "@salesforce/sf-plugins-core@^12", "@salesforce/sf-plugins-core@^12.2.17", "@salesforce/sf-plugins-core@^12.2.22", "@salesforce/sf-plugins-core@^12.2.6":
1629
- version "12.2.22"
1630
- resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-12.2.22.tgz#55e6be65e6289e454220065b3554871452da34af"
1631
- integrity sha512-ApuAXxIwpbJ8i+QooQF8L7z4nz+yJNlkaktbUBxG7LF2KSLKhVgvZjv42Ok1gNPtDnQN9P/hyvVBwDkfSz+6hw==
1600
+ "@salesforce/sf-plugins-core@^12", "@salesforce/sf-plugins-core@^12.2.17", "@salesforce/sf-plugins-core@^12.2.24", "@salesforce/sf-plugins-core@^12.2.6":
1601
+ version "12.2.24"
1602
+ resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-12.2.24.tgz#ead41c7e4b49a60bc72a52737a2eaacc686ec35c"
1603
+ integrity sha512-+lc7QMRz19Uk9f3lJO442LrUMvrRrfX6+xe1w42PihWjjoXpF9fZfZ7zk7H2WDF56PTo5SMJMrb5PjneiIrH3Q==
1632
1604
  dependencies:
1633
- "@inquirer/confirm" "^6.0.12"
1634
- "@inquirer/password" "^5.0.13"
1605
+ "@inquirer/confirm" "^6.1.1"
1606
+ "@inquirer/password" "^5.1.1"
1635
1607
  "@oclif/core" "^4.11.4"
1636
1608
  "@oclif/table" "^0.5.9"
1637
1609
  "@salesforce/core" "^8.31.0"
@@ -63,7 +63,7 @@
63
63
  "ditamap-suffix": {
64
64
  "char": "s",
65
65
  "name": "ditamap-suffix",
66
- "summary": "unique suffix to append to generated ditamap",
66
+ "summary": "unique suffix to append to generated DITA files",
67
67
  "default": "unified",
68
68
  "hasDynamicHelp": false,
69
69
  "multiple": false,
@@ -92,6 +92,18 @@
92
92
  "hasDynamicHelp": false,
93
93
  "multiple": false,
94
94
  "type": "option"
95
+ },
96
+ "output-format": {
97
+ "name": "output-format",
98
+ "summary": "output format for generated documentation; 'dita' (default) generates DITA XML files, 'markdown' generates Markdown files",
99
+ "default": "dita",
100
+ "hasDynamicHelp": false,
101
+ "multiple": false,
102
+ "options": [
103
+ "dita",
104
+ "markdown"
105
+ ],
106
+ "type": "option"
95
107
  }
96
108
  },
97
109
  "hasDynamicHelp": false,
@@ -169,5 +181,5 @@
169
181
  ]
170
182
  }
171
183
  },
172
- "version": "3.1.107"
184
+ "version": "3.1.109"
173
185
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-command-reference",
3
3
  "description": "Generate the Salesforce CLI command reference guide",
4
- "version": "3.1.107",
4
+ "version": "3.1.109",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/salesforcecli/plugin-command-reference/issues",
7
7
  "type": "module",
@@ -9,7 +9,7 @@
9
9
  "@oclif/core": "^4",
10
10
  "@salesforce/core": "^8.31.0",
11
11
  "@salesforce/kit": "^3.2.6",
12
- "@salesforce/sf-plugins-core": "^12.2.22",
12
+ "@salesforce/sf-plugins-core": "^12.2.24",
13
13
  "@salesforce/ts-types": "^2.0.11",
14
14
  "chalk": "^5.6.2",
15
15
  "debug": "^4.4.3",
@@ -196,6 +196,19 @@
196
196
  "messages/**/*.md"
197
197
  ],
198
198
  "output": []
199
+ },
200
+ "test:command-reference-markdown": {
201
+ "command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" commandreference generate --plugins auth --plugins user --output-format markdown --output-dir test/tmp-md",
202
+ "files": [
203
+ "src/**/*.ts",
204
+ "messages/**",
205
+ "package.json"
206
+ ],
207
+ "output": [
208
+ "test/tmp-md"
209
+ ],
210
+ "clean": "if-file-deleted",
211
+ "cache": false
199
212
  }
200
213
  }
201
214
  }