@salesforce/plugin-command-reference 2.4.5 → 3.0.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 +33 -17
- package/lib/commands/commandreference/generate.d.ts +14 -7
- package/lib/commands/commandreference/generate.js +105 -52
- package/lib/commands/commandreference/generate.js.map +1 -1
- package/lib/commands/jit/install.js +4 -7
- package/lib/commands/jit/install.js.map +1 -1
- package/lib/ditamap/base-ditamap.js +1 -0
- package/lib/ditamap/base-ditamap.js.map +1 -1
- package/lib/ditamap/cli-reference.js +1 -0
- package/lib/ditamap/cli-reference.js.map +1 -1
- package/lib/ditamap/command.d.ts +8 -5
- package/lib/ditamap/command.js +50 -53
- package/lib/ditamap/command.js.map +1 -1
- package/lib/ditamap/ditamap.d.ts +8 -8
- package/lib/ditamap/ditamap.js +10 -10
- package/lib/ditamap/ditamap.js.map +1 -1
- package/lib/ditamap/help-reference.js +1 -0
- package/lib/ditamap/help-reference.js.map +1 -1
- package/lib/ditamap/topic-commands.d.ts +2 -2
- package/lib/ditamap/topic-commands.js +1 -0
- package/lib/ditamap/topic-commands.js.map +1 -1
- package/lib/ditamap/topic-ditamap.js +1 -0
- package/lib/ditamap/topic-ditamap.js.map +1 -1
- package/lib/docs.d.ts +4 -5
- package/lib/docs.js +53 -65
- package/lib/docs.js.map +1 -1
- package/lib/utils.d.ts +81 -7
- package/lib/utils.js +4 -19
- package/lib/utils.js.map +1 -1
- package/messages/main.md +53 -0
- package/oclif.manifest.json +33 -13
- package/package.json +142 -42
- package/lib/ditamap/cli-reference-topic.d.ts +0 -5
- package/lib/ditamap/cli-reference-topic.js +0 -28
- package/lib/ditamap/cli-reference-topic.js.map +0 -1
- package/lib/ditamap/main-topic-intro.d.ts +0 -6
- package/lib/ditamap/main-topic-intro.js +0 -43
- package/lib/ditamap/main-topic-intro.js.map +0 -1
- package/messages/main.json +0 -9
- package/templates/cli_reference_topic.hbs +0 -25
- package/templates/main_topic_intro.hbs +0 -44
package/README.md
CHANGED
|
@@ -9,20 +9,21 @@ Generate the [Salesforce CLI command reference guide](https://developer.salesfor
|
|
|
9
9
|
|
|
10
10
|
First install the plugin.
|
|
11
11
|
|
|
12
|
-
```
|
|
13
|
-
$
|
|
12
|
+
```bash
|
|
13
|
+
$ sf plugins install @salesforce/plugin-command-reference
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Ensure any plugins are installed that you with to generate documentation for.
|
|
17
17
|
|
|
18
|
-
```
|
|
19
|
-
$
|
|
18
|
+
```bash
|
|
19
|
+
$ sf plugins:install salesforce@plugin-auth
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
Now we can generate the documentation for
|
|
22
|
+
Now we can generate the documentation for all core plug-ins.
|
|
23
23
|
|
|
24
|
-
```
|
|
25
|
-
|
|
24
|
+
```bash
|
|
25
|
+
# notice we can use the oclif shorthand for the plugin name. @salesforce/plugin-foo => foo
|
|
26
|
+
$ sf commandreference --plugins auth
|
|
26
27
|
```
|
|
27
28
|
|
|
28
29
|
**Note:** Warnings will occur for missing properties in plugins. Those have to be fixed in the plugin itself.
|
|
@@ -42,7 +43,7 @@ To add this to your plugin to catch warning at development time, add it as a dev
|
|
|
42
43
|
Then you can run this in your plugin's CI.
|
|
43
44
|
|
|
44
45
|
```sh-session
|
|
45
|
-
./bin/
|
|
46
|
+
./bin/dev commandreference --plugins <name-of-your-plugin> --error-on-warnings
|
|
46
47
|
```
|
|
47
48
|
|
|
48
49
|
## Local Development
|
|
@@ -50,23 +51,37 @@ Then you can run this in your plugin's CI.
|
|
|
50
51
|
If you need to make changes to this repository, the easiest thing to do is to link it to your Salesforce CLI. After you cloned this plugin, run the following from this plugin directory:
|
|
51
52
|
|
|
52
53
|
```sh-session
|
|
53
|
-
|
|
54
|
+
sf plugins link .
|
|
54
55
|
```
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
## Testing
|
|
57
58
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
How do you know if the output is correct, given your change?
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Install the current version of the plugin (use `@sf` until the plugin is publishing the sf version as main)
|
|
63
|
+
sf plugins install @salesforce/plugin-command-reference@sf
|
|
64
|
+
# installs all JIT plugins (if you intend to produce ditamaps for them)
|
|
65
|
+
sf jit install
|
|
66
|
+
# run using a relatively current version of plugins, saving the output as a "gold file"
|
|
67
|
+
sf commandreference generate --plugins login env deploy-retrieve settings functions info sobject limits schema custom-metadata data community signups user org packaging templates apex auth dev @salesforce/sfdx-plugin-lwc-test -d outputGold
|
|
64
68
|
```
|
|
65
69
|
|
|
70
|
+
While working on your branch
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
sf plugins link .
|
|
74
|
+
# run the same command from above, but with your new version of the plugin, writing to a new output file
|
|
75
|
+
sf commandreference generate --plugins login env deploy-retrieve settings functions info sobject limits schema custom-metadata data community signups user org packaging templates apex auth dev @salesforce/sfdx-plugin-lwc-test -d outputNew
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Now diff the output. Changes should be intentional!
|
|
79
|
+
|
|
66
80
|
## Commands
|
|
67
81
|
|
|
68
82
|
<!-- commands -->
|
|
69
|
-
|
|
83
|
+
|
|
84
|
+
- [`sf commandreference generate`](#sf-commandreference-generate)
|
|
70
85
|
|
|
71
86
|
## `sf commandreference generate`
|
|
72
87
|
|
|
@@ -91,4 +106,5 @@ GLOBAL FLAGS
|
|
|
91
106
|
DESCRIPTION
|
|
92
107
|
generate the command reference guide located
|
|
93
108
|
```
|
|
109
|
+
|
|
94
110
|
<!-- commandsstop -->
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
2
|
import { Interfaces } from '@oclif/core';
|
|
3
3
|
import { AnyJson } from '@salesforce/ts-types';
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
export type CommandReferenceGenerateResults = {
|
|
5
|
+
warnings: AnyJson[];
|
|
6
|
+
};
|
|
7
|
+
export default class CommandReferenceGenerate extends SfCommand<CommandReferenceGenerateResults> {
|
|
8
|
+
static readonly summary: string;
|
|
9
|
+
static readonly description: string;
|
|
10
|
+
static readonly examples: string[];
|
|
11
|
+
static readonly flags: {
|
|
12
|
+
'output-dir': Interfaces.OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
13
|
+
plugins: Interfaces.OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
14
|
all: Interfaces.BooleanFlag<boolean>;
|
|
10
15
|
'ditamap-suffix': Interfaces.OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
16
|
hidden: Interfaces.BooleanFlag<boolean>;
|
|
12
|
-
|
|
17
|
+
'error-on-warnings': Interfaces.BooleanFlag<boolean>;
|
|
18
|
+
'config-path': Interfaces.OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
13
19
|
};
|
|
14
|
-
|
|
20
|
+
private loadedConfig;
|
|
21
|
+
run(): Promise<CommandReferenceGenerateResults>;
|
|
15
22
|
private pluginMap;
|
|
16
23
|
private getPlugin;
|
|
17
24
|
private loadTopicMetadata;
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const os = require("os");
|
|
10
|
-
const
|
|
11
|
-
const fs_extra_1 = require("fs-extra");
|
|
10
|
+
const path_1 = require("path");
|
|
12
11
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
12
|
+
// eslint-disable-next-line sf-plugin/no-oclif-flags-command-import
|
|
13
13
|
const core_1 = require("@oclif/core");
|
|
14
14
|
const core_2 = require("@salesforce/core");
|
|
15
15
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
@@ -17,8 +17,6 @@ const chalk = require("chalk");
|
|
|
17
17
|
const ditamap_1 = require("../../ditamap/ditamap");
|
|
18
18
|
const docs_1 = require("../../docs");
|
|
19
19
|
const utils_1 = require("../../utils");
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
21
|
-
const uniqBy = require('lodash.uniqby');
|
|
22
20
|
// Initialize Messages with the current plugin directory
|
|
23
21
|
core_2.Messages.importMessagesDirectory(__dirname);
|
|
24
22
|
const messages = core_2.Messages.loadMessages('@salesforce/plugin-command-reference', 'main');
|
|
@@ -26,16 +24,10 @@ class CommandReferenceGenerate extends sf_plugins_core_1.SfCommand {
|
|
|
26
24
|
async run() {
|
|
27
25
|
const { flags } = await this.parse(CommandReferenceGenerate);
|
|
28
26
|
ditamap_1.Ditamap.suffix = flags['ditamap-suffix'];
|
|
27
|
+
this.loadedConfig = flags['config-path'] ? await core_1.Config.load((0, path_1.resolve)(flags['config-path'])) : this.config;
|
|
29
28
|
let pluginNames;
|
|
30
29
|
if (!flags.plugins && !flags.all) {
|
|
31
|
-
|
|
32
|
-
if (await (0, fs_extra_1.pathExists)(pJsonPath)) {
|
|
33
|
-
const packageJson = await (0, fs_extra_1.readJSON)(pJsonPath);
|
|
34
|
-
pluginNames = [(0, ts_types_1.getString)(packageJson, 'name')];
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
throw new core_2.SfError("No plugins provided. Provide the '--plugins' flag or cd into a directory that contains a valid oclif plugin.");
|
|
38
|
-
}
|
|
30
|
+
pluginNames = this.loadedConfig.plugins.map((p) => p.name);
|
|
39
31
|
}
|
|
40
32
|
else if (flags.all) {
|
|
41
33
|
const ignore = [
|
|
@@ -45,13 +37,16 @@ class CommandReferenceGenerate extends sf_plugins_core_1.SfCommand {
|
|
|
45
37
|
/@salesforce\/plugin-telemetry/,
|
|
46
38
|
/@salesforce\/plugin-command-reference/,
|
|
47
39
|
];
|
|
48
|
-
pluginNames = this.
|
|
40
|
+
pluginNames = this.loadedConfig.plugins.map((p) => p.name).filter((p) => !ignore.some((i) => i.test(p)));
|
|
49
41
|
}
|
|
50
42
|
else {
|
|
51
|
-
pluginNames = flags.plugins;
|
|
43
|
+
pluginNames = flags.plugins ?? [];
|
|
44
|
+
}
|
|
45
|
+
if (pluginNames.length === 0) {
|
|
46
|
+
throw new core_2.SfError("No plugins provided. Provide the '--plugins' flag or cd into a directory that contains a valid oclif plugin.");
|
|
52
47
|
}
|
|
53
48
|
const plugins = pluginNames
|
|
54
|
-
.map((
|
|
49
|
+
.map((name) => name.trim())
|
|
55
50
|
.map((name) => {
|
|
56
51
|
let pluginName = name;
|
|
57
52
|
let plugin = this.getPlugin(pluginName);
|
|
@@ -67,26 +62,32 @@ class CommandReferenceGenerate extends sf_plugins_core_1.SfCommand {
|
|
|
67
62
|
this.log(`Generating command reference for the following plugins:${plugins
|
|
68
63
|
.map((name) => `${os.EOL} - ${name}`)
|
|
69
64
|
.join(', ')}`);
|
|
70
|
-
ditamap_1.Ditamap.outputDir = flags
|
|
71
|
-
ditamap_1.Ditamap.cliVersion = this.
|
|
65
|
+
ditamap_1.Ditamap.outputDir = flags['output-dir'];
|
|
66
|
+
ditamap_1.Ditamap.cliVersion = this.loadedConfig.version.replace(/-[0-9a-zA-Z]+$/, '');
|
|
72
67
|
ditamap_1.Ditamap.plugins = this.pluginMap(plugins);
|
|
73
68
|
ditamap_1.Ditamap.pluginVersions = plugins.map((name) => {
|
|
74
69
|
const plugin = this.getPlugin(name);
|
|
75
|
-
const version = plugin
|
|
70
|
+
const version = plugin?.version;
|
|
76
71
|
if (!version)
|
|
77
72
|
throw new Error(`No version found for plugin ${name}`);
|
|
78
73
|
return { name, version };
|
|
79
74
|
});
|
|
80
|
-
const
|
|
75
|
+
const commands = await this.loadCommands(plugins);
|
|
76
|
+
const topicMetadata = this.loadTopicMetadata(commands);
|
|
77
|
+
const cliMeta = this.loadCliMeta();
|
|
78
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
79
|
+
// @ts-ignore
|
|
80
|
+
const docs = new docs_1.Docs(ditamap_1.Ditamap.outputDir, flags.hidden, topicMetadata, cliMeta);
|
|
81
81
|
utils_1.events.on('topic', ({ topic }) => {
|
|
82
82
|
this.log(chalk.green(`Generating topic '${topic}'`));
|
|
83
83
|
});
|
|
84
84
|
const warnings = [];
|
|
85
85
|
utils_1.events.on('warning', (msg) => {
|
|
86
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
86
87
|
process.stderr.write(chalk.yellow(`> ${msg}\n`));
|
|
87
88
|
warnings.push(msg);
|
|
88
89
|
});
|
|
89
|
-
await docs.build(
|
|
90
|
+
await docs.build(commands);
|
|
90
91
|
this.log(`\nWrote generated doc to ${ditamap_1.Ditamap.outputDir}`);
|
|
91
92
|
if (flags.erroronwarnings && warnings.length > 0) {
|
|
92
93
|
throw new core_2.SfError(`Found ${warnings.length} warnings.`);
|
|
@@ -96,7 +97,7 @@ class CommandReferenceGenerate extends sf_plugins_core_1.SfCommand {
|
|
|
96
97
|
pluginMap(plugins) {
|
|
97
98
|
const pluginToParentPlugin = {};
|
|
98
99
|
const resolveChildPlugins = (parentPlugin) => {
|
|
99
|
-
for (const childPlugin of parentPlugin.pjson.oclif.plugins
|
|
100
|
+
for (const childPlugin of parentPlugin.pjson.oclif.plugins ?? []) {
|
|
100
101
|
pluginToParentPlugin[childPlugin] = parentPlugin.name;
|
|
101
102
|
resolveChildPlugins((0, ts_types_1.ensure)(this.getPlugin(childPlugin)));
|
|
102
103
|
}
|
|
@@ -112,25 +113,50 @@ class CommandReferenceGenerate extends sf_plugins_core_1.SfCommand {
|
|
|
112
113
|
return pluginToParentPlugin;
|
|
113
114
|
}
|
|
114
115
|
getPlugin(pluginName) {
|
|
115
|
-
return this.
|
|
116
|
+
return this.loadedConfig.plugins.find((info) => info.name === pluginName);
|
|
116
117
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
const
|
|
120
|
-
|
|
118
|
+
// eslint-disable-next-line class-methods-use-this
|
|
119
|
+
loadTopicMetadata(commands) {
|
|
120
|
+
const finishedPlugins = new Set();
|
|
121
|
+
const output = new Map();
|
|
122
|
+
commands
|
|
123
|
+
.flatMap((commandClass) => {
|
|
121
124
|
// Only load topics for each plugin once
|
|
122
|
-
if (
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
plugins[commandClass.plugin.name] = true;
|
|
125
|
+
if (commandClass.pluginName && !finishedPlugins.has(commandClass.pluginName)) {
|
|
126
|
+
if (commandClass.plugin?.pjson.oclif.topics) {
|
|
127
|
+
finishedPlugins.add(commandClass.plugin.name);
|
|
128
|
+
return objectTopicsToMap(commandClass.plugin.pjson.oclif.topics);
|
|
127
129
|
}
|
|
128
130
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
+
return undefined;
|
|
132
|
+
})
|
|
133
|
+
.filter((x) => Boolean(x))
|
|
134
|
+
// we might have the same topic in different plugins, so we need to merge those to avoid Object.fromEntries "last wins" algo
|
|
135
|
+
.map((sfTopics) => {
|
|
136
|
+
sfTopics.forEach((topicInfo, topic) => {
|
|
137
|
+
const existing = output.get(topic);
|
|
138
|
+
if (existing) {
|
|
139
|
+
// merge the topic objects, merge the subtopic maps
|
|
140
|
+
output.set(topic, {
|
|
141
|
+
...existing,
|
|
142
|
+
...topicInfo,
|
|
143
|
+
// TODO: this might need to be recursive if keys collide at lower levels
|
|
144
|
+
subtopics: existing.subtopics || topicInfo.subtopics
|
|
145
|
+
? new Map([...(existing.subtopics ?? []), ...(topicInfo.subtopics ?? [])])
|
|
146
|
+
: undefined,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
output.set(topic, topicInfo);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
return output;
|
|
131
155
|
}
|
|
132
|
-
async loadCommands() {
|
|
133
|
-
const promises = this.
|
|
156
|
+
async loadCommands(plugins) {
|
|
157
|
+
const promises = this.loadedConfig.commands
|
|
158
|
+
.filter((cmd) => plugins.includes(cmd.pluginName ?? ''))
|
|
159
|
+
.map(async (cmd) => {
|
|
134
160
|
try {
|
|
135
161
|
let commandClass = await this.loadCommand(cmd);
|
|
136
162
|
let obj = Object.assign({}, cmd, commandClass, {
|
|
@@ -138,56 +164,83 @@ class CommandReferenceGenerate extends sf_plugins_core_1.SfCommand {
|
|
|
138
164
|
});
|
|
139
165
|
// Load all properties on all extending classes.
|
|
140
166
|
while (commandClass !== undefined) {
|
|
141
|
-
commandClass =
|
|
167
|
+
commandClass = Reflect.getPrototypeOf(commandClass) || undefined;
|
|
142
168
|
obj = Object.assign({}, commandClass, obj, {
|
|
143
|
-
flags: Object.assign({}, commandClass
|
|
169
|
+
flags: Object.assign({}, commandClass?.flags, obj.flags),
|
|
144
170
|
});
|
|
145
171
|
}
|
|
146
172
|
return obj;
|
|
147
173
|
}
|
|
148
174
|
catch (error) {
|
|
149
|
-
return
|
|
175
|
+
return cmd;
|
|
150
176
|
}
|
|
151
177
|
});
|
|
152
178
|
const commands = await Promise.all(promises);
|
|
153
|
-
return
|
|
179
|
+
return Array.from(commands
|
|
180
|
+
.reduce((acc, cmd) => {
|
|
181
|
+
acc.set(cmd.id, cmd);
|
|
182
|
+
return acc;
|
|
183
|
+
}, new Map())
|
|
184
|
+
.values());
|
|
154
185
|
}
|
|
186
|
+
// eslint-disable-next-line class-methods-use-this
|
|
155
187
|
async loadCommand(command) {
|
|
188
|
+
// eslint-disable-next-line @typescript-eslint/return-await
|
|
156
189
|
return command.load.constructor.name === 'AsyncFunction' ? await command.load() : command.load();
|
|
157
190
|
}
|
|
158
191
|
loadCliMeta() {
|
|
159
192
|
return {
|
|
160
|
-
binary: this.
|
|
161
|
-
topicSeparator: this.
|
|
162
|
-
state: this.
|
|
193
|
+
binary: this.loadedConfig.pjson.oclif.bin ?? 'sf',
|
|
194
|
+
topicSeparator: this.loadedConfig.pjson.oclif.topicSeparator,
|
|
195
|
+
state: this.loadedConfig.pjson.oclif.state,
|
|
163
196
|
};
|
|
164
197
|
}
|
|
165
198
|
}
|
|
166
199
|
exports.default = CommandReferenceGenerate;
|
|
200
|
+
CommandReferenceGenerate.summary = messages.getMessage('commandSummary');
|
|
167
201
|
CommandReferenceGenerate.description = messages.getMessage('commandDescription');
|
|
202
|
+
CommandReferenceGenerate.examples = messages.getMessages('examples');
|
|
168
203
|
CommandReferenceGenerate.flags = {
|
|
169
|
-
|
|
204
|
+
'output-dir': sf_plugins_core_1.Flags.string({
|
|
170
205
|
char: 'd',
|
|
171
|
-
|
|
206
|
+
summary: messages.getMessage('outputdirFlagSummary'),
|
|
207
|
+
aliases: ['outputdir'],
|
|
208
|
+
deprecateAliases: true,
|
|
172
209
|
default: './tmp/root',
|
|
173
210
|
}),
|
|
174
|
-
plugins:
|
|
211
|
+
plugins: sf_plugins_core_1.Flags.string({
|
|
175
212
|
char: 'p',
|
|
176
|
-
|
|
213
|
+
summary: messages.getMessage('pluginFlagSummary'),
|
|
177
214
|
multiple: true,
|
|
178
215
|
exclusive: ['all'],
|
|
179
216
|
}),
|
|
180
|
-
all:
|
|
217
|
+
all: sf_plugins_core_1.Flags.boolean({
|
|
181
218
|
char: 'a',
|
|
182
|
-
|
|
219
|
+
summary: messages.getMessage('allFlagSummary'),
|
|
183
220
|
exclusive: ['plugins'],
|
|
184
221
|
}),
|
|
185
|
-
'ditamap-suffix':
|
|
222
|
+
'ditamap-suffix': sf_plugins_core_1.Flags.string({
|
|
186
223
|
char: 's',
|
|
187
|
-
|
|
224
|
+
summary: messages.getMessage('ditamapSuffixFlagSummary'),
|
|
188
225
|
default: ditamap_1.Ditamap.SUFFIX,
|
|
189
226
|
}),
|
|
190
|
-
hidden:
|
|
191
|
-
|
|
227
|
+
hidden: sf_plugins_core_1.Flags.boolean({ summary: messages.getMessage('hiddenFlagSummary') }),
|
|
228
|
+
'error-on-warnings': sf_plugins_core_1.Flags.boolean({
|
|
229
|
+
summary: messages.getMessage('erroronwarningFlagSummary'),
|
|
230
|
+
aliases: ['erroronwarnings'],
|
|
231
|
+
deprecateAliases: true,
|
|
232
|
+
}),
|
|
233
|
+
'config-path': sf_plugins_core_1.Flags.directory({
|
|
234
|
+
summary: messages.getMessage('configPathFlagSummary'),
|
|
235
|
+
char: 'c',
|
|
236
|
+
}),
|
|
192
237
|
};
|
|
238
|
+
/** recursively convert the oclif style topics to the command reference topic SfTopicStructure */
|
|
239
|
+
const objectTopicsToMap = (pjsonTopics) => new Map(Object.entries(pjsonTopics ?? {}).map(([topic, topicInfo]) => {
|
|
240
|
+
if (topicInfo.subtopics) {
|
|
241
|
+
// TODO
|
|
242
|
+
return [topic, { ...topicInfo, name: topic, subtopics: objectTopicsToMap(topicInfo.subtopics) }];
|
|
243
|
+
}
|
|
244
|
+
return [topic, { ...topicInfo, name: topic, subtopics: undefined }];
|
|
245
|
+
}));
|
|
193
246
|
//# sourceMappingURL=generate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/commands/commandreference/generate.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,yBAAyB;AACzB
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/commands/commandreference/generate.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,yBAAyB;AACzB,+BAA+B;AAC/B,iEAA+D;AAC/D,mEAAmE;AACnE,sCAA0D;AAC1D,2CAAqD;AACrD,mDAAuD;AACvD,+BAAgC;AAEhC,mDAAgD;AAChD,qCAAkC;AAClC,uCAA+E;AAE/E,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,sCAAsC,EAAE,MAAM,CAAC,CAAC;AAMvF,MAAqB,wBAAyB,SAAQ,2BAA0C;IA2CvF,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IA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AAS,EAAE,CAAC,CAAC;AACtE,CAAC,CAAC,CACH,CAAC"}
|
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
2
|
/*
|
|
4
3
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
5
4
|
* All rights reserved.
|
|
6
5
|
* Licensed under the BSD 3-Clause license.
|
|
7
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
8
7
|
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
10
10
|
const core_1 = require("@salesforce/core");
|
|
11
11
|
const chalk = require("chalk");
|
|
12
12
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
13
|
-
const messages = core_1.Messages.
|
|
14
|
-
'summary',
|
|
15
|
-
'examples',
|
|
16
|
-
'flags.dry-run.summary',
|
|
17
|
-
]);
|
|
13
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-command-reference', 'jit.install');
|
|
18
14
|
class JitInstall extends sf_plugins_core_1.SfCommand {
|
|
19
15
|
async run() {
|
|
20
16
|
const { flags } = await this.parse(JitInstall);
|
|
21
17
|
this.styledHeader(`Install all JIT Plugins${flags['dry-run'] ? ' (dry-run)' : ''}`);
|
|
22
|
-
for (const [plugin, version] of Object.entries(this.config.pjson.oclif.jitPlugins)) {
|
|
18
|
+
for (const [plugin, version] of Object.entries(this.config.pjson.oclif.jitPlugins ?? {})) {
|
|
23
19
|
this.log(`• ${plugin} ${chalk.dim(version)}`);
|
|
24
20
|
if (flags['dry-run'])
|
|
25
21
|
continue;
|
|
26
22
|
try {
|
|
23
|
+
// eslint-disable-next-line no-await-in-loop
|
|
27
24
|
await this.config.runCommand('plugins:install', [`${plugin}@${version}`]);
|
|
28
25
|
}
|
|
29
26
|
catch {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../src/commands/jit/install.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../src/commands/jit/install.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,iEAA+D;AAC/D,2CAA4C;AAC5C,+BAA+B;AAE/B,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,sCAAsC,EAAE,aAAa,CAAC,CAAC;AAE9F,MAAqB,UAAW,SAAQ,2BAAe;IAW9C,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAE/C,IAAI,CAAC,YAAY,CAAC,0BAA0B,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACpF,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,EAAE;YACxF,IAAI,CAAC,GAAG,CAAC,KAAK,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAC9C,IAAI,KAAK,CAAC,SAAS,CAAC;gBAAE,SAAS;YAC/B,IAAI;gBACF,4CAA4C;gBAC5C,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,GAAG,MAAM,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC;aAC3E;YAAC,MAAM;gBACN,IAAI,CAAC,GAAG,CAAC,qBAAqB,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;aAChE;SACF;IACH,CAAC;;AAzBH,6BA0BC;AAzBwB,kBAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACzC,mBAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AAE5C,gBAAK,GAAG;IAC7B,SAAS,EAAE,uBAAK,CAAC,OAAO,CAAC;QACvB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC;KACtD,CAAC;CACH,CAAC"}
|
|
@@ -15,6 +15,7 @@ class BaseDitamap extends ditamap_1.Ditamap {
|
|
|
15
15
|
namespaceDitamapFiles: topics.sort().map((topic) => ditamap_1.Ditamap.file(`${topic}/cli_reference_${topic}`, 'ditamap')),
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
+
// eslint-disable-next-line class-methods-use-this
|
|
18
19
|
getTemplateFileName() {
|
|
19
20
|
return 'base_ditamap.hbs';
|
|
20
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-ditamap.js","sourceRoot":"","sources":["../../src/ditamap/base-ditamap.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,uCAAoC;AAEpC,MAAa,WAAY,SAAQ,iBAAO;IACtC,YAAmB,MAAgB;QACjC,sCAAsC;QACtC,KAAK,CAAC,iBAAO,CAAC,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,EAAE;YAC9C,qBAAqB,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,iBAAO,CAAC,IAAI,CAAC,GAAG,KAAK,kBAAkB,KAAK,EAAE,EAAE,SAAS,CAAC,CAAC;SAChH,CAAC,CAAC;IACL,CAAC;
|
|
1
|
+
{"version":3,"file":"base-ditamap.js","sourceRoot":"","sources":["../../src/ditamap/base-ditamap.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,uCAAoC;AAEpC,MAAa,WAAY,SAAQ,iBAAO;IACtC,YAAmB,MAAgB;QACjC,sCAAsC;QACtC,KAAK,CAAC,iBAAO,CAAC,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,EAAE;YAC9C,qBAAqB,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,iBAAO,CAAC,IAAI,CAAC,GAAG,KAAK,kBAAkB,KAAK,EAAE,EAAE,SAAS,CAAC,CAAC;SAChH,CAAC,CAAC;IACL,CAAC;IAED,kDAAkD;IAC3C,mBAAmB;QACxB,OAAO,kBAAkB,CAAC;IAC5B,CAAC;CACF;AAZD,kCAYC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-reference.js","sourceRoot":"","sources":["../../src/ditamap/cli-reference.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,uCAAoC;AAEpC,MAAa,YAAa,SAAQ,iBAAO;IACvC;QACE,MAAM,QAAQ,GAAG,iBAAO,CAAC,IAAI,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QAEtD,KAAK,CAAC,QAAQ,EAAE;YACd,UAAU,EAAE,iBAAO,CAAC,UAAU;YAC9B,cAAc,EAAE,iBAAO,CAAC,cAAc;SACvC,CAAC,CAAC;IACL,CAAC;
|
|
1
|
+
{"version":3,"file":"cli-reference.js","sourceRoot":"","sources":["../../src/ditamap/cli-reference.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,uCAAoC;AAEpC,MAAa,YAAa,SAAQ,iBAAO;IACvC;QACE,MAAM,QAAQ,GAAG,iBAAO,CAAC,IAAI,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QAEtD,KAAK,CAAC,QAAQ,EAAE;YACd,UAAU,EAAE,iBAAO,CAAC,UAAU;YAC9B,cAAc,EAAE,iBAAO,CAAC,cAAc;SACvC,CAAC,CAAC;IACL,CAAC;IAED,kDAAkD;IAC3C,mBAAmB;QACxB,OAAO,uBAAuB,CAAC;IACjC,CAAC;CACF;AAdD,oCAcC"}
|
package/lib/ditamap/command.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Dictionary
|
|
2
|
-
import { CommandClass } from '../utils';
|
|
1
|
+
import { Dictionary } from '@salesforce/ts-types';
|
|
2
|
+
import { CommandClass, CommandParameterData } from '../utils';
|
|
3
3
|
import { Ditamap } from './ditamap';
|
|
4
|
-
|
|
4
|
+
type FlagInfo = {
|
|
5
5
|
hidden: boolean;
|
|
6
6
|
description: string;
|
|
7
7
|
summary: string;
|
|
@@ -13,8 +13,11 @@ export type CommandHelpInfo = {
|
|
|
13
13
|
};
|
|
14
14
|
export declare class Command extends Ditamap {
|
|
15
15
|
private flags;
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
private commandMeta;
|
|
17
|
+
private commandName;
|
|
18
|
+
constructor(topic: string, subtopic: string | null, command: CommandClass, commandMeta?: Record<string, unknown>);
|
|
19
|
+
getParametersForTemplate(flags: Dictionary<FlagInfo>): Promise<CommandParameterData[]>;
|
|
18
20
|
getTemplateFileName(): string;
|
|
19
21
|
protected transformToDitamap(): Promise<string>;
|
|
20
22
|
}
|
|
23
|
+
export {};
|