@salesforce/plugin-command-reference 2.4.5 → 2.4.6
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 +31 -15
- 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/lib/docs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../src/docs.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../src/docs.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,kCAAkC;AAClC,mDAA6D;AAC7D,+BAA+B;AAC/B,yDAAqD;AACrD,2DAAuD;AACvD,+CAA4C;AAC5C,6DAAyD;AACzD,2DAAuD;AACvD,mCAAsF;AACtF,6DAAyD;AAIzD,SAAS,0BAA0B,CAAC,KAAa;IAC/C,cAAM,CAAC,IAAI,CACT,SAAS,EACT,yBAAyB,KAAK,CAAC,IAAI,CACjC,KAAK,CACN,+GAA+G,CACjH,CAAC;AACJ,CAAC;AAED,MAAa,IAAI;IACf,YACU,SAAiB,EACjB,MAAe,EACf,SAAmB,EACnB,OAAgB;QAHhB,cAAS,GAAT,SAAS,CAAQ;QACjB,WAAM,GAAN,MAAM,CAAS;QACf,cAAS,GAAT,SAAS,CAAU;QACnB,YAAO,GAAP,OAAO,CAAS;IACvB,CAAC;IAEG,KAAK,CAAC,KAAK,CAAC,QAAwB;QACzC,0BAA0B;QAC1B,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAEpD,MAAM,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACxC,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,KAAa,EAAE,SAAsC;QAC9E,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,SAAS,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,qBAAqB,KAAK,6DAA6D,CAAC,CAAC;SAC1G;QAED,IAAI,WAAW,GAAG,SAAS,CAA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K,EAAE,CAAC;QAC7B,OAAO,cAAc,CAAC,WAAW,EAAE,CAAC;IACtC,CAAC;CACF;AA/MD,oBA+MC"}
|
package/lib/utils.d.ts
CHANGED
|
@@ -1,12 +1,86 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
export type CommandClass = Command.Class & {
|
|
3
|
+
import { Command, Interfaces } from '@oclif/core';
|
|
4
|
+
import { AnyJson } from '@salesforce/ts-types';
|
|
5
|
+
export type CommandClass = Pick<Command.Class, 'id' | 'hidden' | 'description' | 'plugin' | 'state' | 'examples' | 'summary' | 'flags' | 'pluginName'> & {
|
|
6
6
|
topic: string;
|
|
7
7
|
subtopic: string;
|
|
8
|
-
|
|
8
|
+
longDescription?: string;
|
|
9
|
+
binary: string;
|
|
10
|
+
deprecated?: boolean;
|
|
11
|
+
};
|
|
9
12
|
export declare const events: EventEmitter;
|
|
10
|
-
export declare function
|
|
11
|
-
export declare
|
|
12
|
-
export
|
|
13
|
+
export declare function punctuate(description?: string): string | undefined;
|
|
14
|
+
export declare const replaceConfigVariables: (text: string, bin: string, id: string) => string;
|
|
15
|
+
export type CliMeta = {
|
|
16
|
+
binary: string;
|
|
17
|
+
topicSeparator?: string;
|
|
18
|
+
state?: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
longDescription?: string | AnyJson;
|
|
21
|
+
};
|
|
22
|
+
type PluginVersion = {
|
|
23
|
+
name: string;
|
|
24
|
+
version: string;
|
|
25
|
+
};
|
|
26
|
+
type BaseDitamapData = {
|
|
27
|
+
namespaceDitamapFiles: string[];
|
|
28
|
+
};
|
|
29
|
+
type CliRefData = {
|
|
30
|
+
cliVersion: string;
|
|
31
|
+
pluginVersions: PluginVersion[];
|
|
32
|
+
};
|
|
33
|
+
type CliRefHelpData = {
|
|
34
|
+
id: string;
|
|
35
|
+
};
|
|
36
|
+
type ClIRefTopicData = {
|
|
37
|
+
topic: string;
|
|
38
|
+
longDescription?: string;
|
|
39
|
+
};
|
|
40
|
+
export type CommandParameterData = {
|
|
41
|
+
optional?: boolean;
|
|
42
|
+
char?: string;
|
|
43
|
+
name: string;
|
|
44
|
+
hasValue?: boolean;
|
|
45
|
+
deprecated?: {
|
|
46
|
+
version: string;
|
|
47
|
+
to: string;
|
|
48
|
+
};
|
|
49
|
+
kind?: string;
|
|
50
|
+
options?: string[];
|
|
51
|
+
defaultFlagValue?: string;
|
|
52
|
+
aliases?: string[];
|
|
53
|
+
};
|
|
54
|
+
export type DitamapData = CliRefHelpData | BaseDitamapData | CliRefData | ClIRefTopicData | CommandData | SfTopic | TopicDitamapData | undefined;
|
|
55
|
+
export type CommandData = {
|
|
56
|
+
name: string;
|
|
57
|
+
summary?: string;
|
|
58
|
+
description?: string;
|
|
59
|
+
binary: string;
|
|
60
|
+
commandWithUnderscores: string;
|
|
61
|
+
isClosedPilotCommand: boolean;
|
|
62
|
+
isOpenPilotCommand: boolean;
|
|
63
|
+
isBetaCommand: boolean;
|
|
64
|
+
deprecated: boolean;
|
|
65
|
+
trailblazerCommunityUrl?: string;
|
|
66
|
+
trailblazerCommunityName?: string;
|
|
67
|
+
help?: string[];
|
|
68
|
+
examples?: unknown[];
|
|
69
|
+
parameters?: CommandParameterData[];
|
|
70
|
+
};
|
|
71
|
+
type TopicDitamapData = {
|
|
72
|
+
topic: string;
|
|
73
|
+
commands: Array<{
|
|
74
|
+
command: string;
|
|
75
|
+
}>;
|
|
76
|
+
};
|
|
77
|
+
export type SfTopic = Interfaces.Topic & {
|
|
78
|
+
external?: boolean;
|
|
79
|
+
trailblazerCommunityLink?: {
|
|
80
|
+
url: string;
|
|
81
|
+
name: string;
|
|
82
|
+
};
|
|
83
|
+
subtopics?: SfTopics;
|
|
84
|
+
};
|
|
85
|
+
export type SfTopics = Map<string, SfTopic>;
|
|
86
|
+
export {};
|
package/lib/utils.js
CHANGED
|
@@ -6,37 +6,22 @@
|
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
9
|
+
exports.replaceConfigVariables = exports.punctuate = exports.events = void 0;
|
|
10
10
|
const events_1 = require("events");
|
|
11
11
|
const os_1 = require("os");
|
|
12
|
-
const ts_types_1 = require("@salesforce/ts-types");
|
|
13
12
|
exports.events = new events_1.EventEmitter();
|
|
14
|
-
function mergeDeep(target, source) {
|
|
15
|
-
Object.keys(source).forEach((key) => {
|
|
16
|
-
if ((0, ts_types_1.isObject)(target[key]) && (0, ts_types_1.isObject)(source[key])) {
|
|
17
|
-
mergeDeep(target[key], source[key]);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
target[key] = source[key];
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
return target;
|
|
24
|
-
}
|
|
25
|
-
exports.mergeDeep = mergeDeep;
|
|
26
13
|
function punctuate(description) {
|
|
27
14
|
if (!description)
|
|
28
15
|
return description;
|
|
29
16
|
const lines = description.split(os_1.EOL);
|
|
30
17
|
let mainDescription = lines[0];
|
|
31
18
|
mainDescription = mainDescription.charAt(0).toUpperCase() + mainDescription.substring(1);
|
|
32
|
-
if (mainDescription.
|
|
19
|
+
if (!mainDescription.endsWith('.')) {
|
|
33
20
|
mainDescription += '.';
|
|
34
21
|
}
|
|
35
22
|
return mainDescription;
|
|
36
23
|
}
|
|
37
24
|
exports.punctuate = punctuate;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
exports.helpFromDescription = helpFromDescription;
|
|
25
|
+
const replaceConfigVariables = (text, bin, id) => text.replace(/<%= config.bin %>/g, bin ?? 'unknown').replace(/<%= command.id %>/g, id);
|
|
26
|
+
exports.replaceConfigVariables = replaceConfigVariables;
|
|
42
27
|
//# sourceMappingURL=utils.js.map
|
package/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,mCAAsC;AACtC,2BAAyB;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,mCAAsC;AACtC,2BAAyB;AASZ,QAAA,MAAM,GAAG,IAAI,qBAAY,EAAE,CAAC;AAEzC,SAAgB,SAAS,CAAC,WAAoB;IAC5C,IAAI,CAAC,WAAW;QAAE,OAAO,WAAW,CAAC;IAErC,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,QAAG,CAAC,CAAC;IACrC,IAAI,eAAe,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAE/B,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAEzF,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAClC,eAAe,IAAI,GAAG,CAAC;KACxB;IAED,OAAO,eAAe,CAAC;AACzB,CAAC;AAbD,8BAaC;AAEM,MAAM,sBAAsB,GAAG,CAAC,IAAY,EAAE,GAAW,EAAE,EAAU,EAAU,EAAE,CACtF,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,GAAG,IAAI,SAAS,CAAC,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AAD5E,QAAA,sBAAsB,0BACsD"}
|
package/messages/main.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# commandSummary
|
|
2
|
+
|
|
3
|
+
generate the command reference guide located
|
|
4
|
+
|
|
5
|
+
# commandDescription
|
|
6
|
+
|
|
7
|
+
generate the command reference guide located
|
|
8
|
+
|
|
9
|
+
# pluginFlagSummary
|
|
10
|
+
|
|
11
|
+
comma separated list of plugin names to be part of the generation. Defaults to the oclif plugin in the current working directory
|
|
12
|
+
|
|
13
|
+
# allFlagSummary
|
|
14
|
+
|
|
15
|
+
include all relevant plugins in the generation
|
|
16
|
+
|
|
17
|
+
# hiddenFlagSummary
|
|
18
|
+
|
|
19
|
+
show hidden commands
|
|
20
|
+
|
|
21
|
+
# outputdirFlagSummary
|
|
22
|
+
|
|
23
|
+
output directory to put generated files
|
|
24
|
+
|
|
25
|
+
# erroronwarningFlagSummary
|
|
26
|
+
|
|
27
|
+
fail the command if there are any warnings
|
|
28
|
+
|
|
29
|
+
# ditamapSuffixFlagSummary
|
|
30
|
+
|
|
31
|
+
unique suffix to append to generated ditamap
|
|
32
|
+
|
|
33
|
+
# configPathFlagSummary
|
|
34
|
+
|
|
35
|
+
A path to the directory containing a plugin or cli
|
|
36
|
+
|
|
37
|
+
# examples
|
|
38
|
+
|
|
39
|
+
- Generate the command reference guide
|
|
40
|
+
|
|
41
|
+
<%= config.bin %> <%= command.id %>
|
|
42
|
+
|
|
43
|
+
- Generate the command reference for a set of plugins
|
|
44
|
+
|
|
45
|
+
<%= config.bin %> <%= command.id %> --plugins pluginA,pluginB
|
|
46
|
+
|
|
47
|
+
- Generate the command reference for all plugins
|
|
48
|
+
|
|
49
|
+
<%= config.bin %> <%= command.id %> --all --output-dir ./docs
|
|
50
|
+
|
|
51
|
+
- Generate the command reference for all plugins in a directory
|
|
52
|
+
|
|
53
|
+
<%= config.bin %> <%= command.id %> --all --config-path /path/to/plugin --output-dir ./docs
|
package/oclif.manifest.json
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.4.
|
|
2
|
+
"version": "2.4.6",
|
|
3
3
|
"commands": {
|
|
4
4
|
"commandreference:generate": {
|
|
5
5
|
"id": "commandreference:generate",
|
|
6
|
+
"summary": "generate the command reference guide located",
|
|
6
7
|
"description": "generate the command reference guide located",
|
|
7
8
|
"strict": true,
|
|
8
9
|
"pluginName": "@salesforce/plugin-command-reference",
|
|
9
10
|
"pluginAlias": "@salesforce/plugin-command-reference",
|
|
10
11
|
"pluginType": "core",
|
|
11
12
|
"aliases": [],
|
|
13
|
+
"examples": [
|
|
14
|
+
"Generate the command reference guide\n<%= config.bin %> <%= command.id %>",
|
|
15
|
+
"Generate the command reference for a set of plugins\n<%= config.bin %> <%= command.id %> --plugins pluginA,pluginB",
|
|
16
|
+
"Generate the command reference for all plugins\n<%= config.bin %> <%= command.id %> --all --output-dir ./docs",
|
|
17
|
+
"Generate the command reference for all plugins in a directory\n<%= config.bin %> <%= command.id %> --all --config-path /path/to/plugin --output-dir ./docs"
|
|
18
|
+
],
|
|
12
19
|
"flags": {
|
|
13
20
|
"json": {
|
|
14
21
|
"name": "json",
|
|
@@ -17,19 +24,22 @@
|
|
|
17
24
|
"helpGroup": "GLOBAL",
|
|
18
25
|
"allowNo": false
|
|
19
26
|
},
|
|
20
|
-
"
|
|
21
|
-
"name": "
|
|
27
|
+
"output-dir": {
|
|
28
|
+
"name": "output-dir",
|
|
22
29
|
"type": "option",
|
|
23
30
|
"char": "d",
|
|
24
|
-
"
|
|
31
|
+
"summary": "output directory to put generated files",
|
|
25
32
|
"multiple": false,
|
|
26
|
-
"default": "./tmp/root"
|
|
33
|
+
"default": "./tmp/root",
|
|
34
|
+
"aliases": [
|
|
35
|
+
"outputdir"
|
|
36
|
+
]
|
|
27
37
|
},
|
|
28
38
|
"plugins": {
|
|
29
39
|
"name": "plugins",
|
|
30
40
|
"type": "option",
|
|
31
41
|
"char": "p",
|
|
32
|
-
"
|
|
42
|
+
"summary": "comma separated list of plugin names to be part of the generation. Defaults to the oclif plugin in the current working directory",
|
|
33
43
|
"multiple": true,
|
|
34
44
|
"exclusive": [
|
|
35
45
|
"all"
|
|
@@ -39,7 +49,7 @@
|
|
|
39
49
|
"name": "all",
|
|
40
50
|
"type": "boolean",
|
|
41
51
|
"char": "a",
|
|
42
|
-
"
|
|
52
|
+
"summary": "include all relevant plugins in the generation",
|
|
43
53
|
"allowNo": false,
|
|
44
54
|
"exclusive": [
|
|
45
55
|
"plugins"
|
|
@@ -49,21 +59,31 @@
|
|
|
49
59
|
"name": "ditamap-suffix",
|
|
50
60
|
"type": "option",
|
|
51
61
|
"char": "s",
|
|
52
|
-
"
|
|
62
|
+
"summary": "unique suffix to append to generated ditamap",
|
|
53
63
|
"multiple": false,
|
|
54
64
|
"default": "unified"
|
|
55
65
|
},
|
|
56
66
|
"hidden": {
|
|
57
67
|
"name": "hidden",
|
|
58
68
|
"type": "boolean",
|
|
59
|
-
"
|
|
69
|
+
"summary": "show hidden commands",
|
|
60
70
|
"allowNo": false
|
|
61
71
|
},
|
|
62
|
-
"
|
|
63
|
-
"name": "
|
|
72
|
+
"error-on-warnings": {
|
|
73
|
+
"name": "error-on-warnings",
|
|
64
74
|
"type": "boolean",
|
|
65
|
-
"
|
|
66
|
-
"allowNo": false
|
|
75
|
+
"summary": "fail the command if there are any warnings",
|
|
76
|
+
"allowNo": false,
|
|
77
|
+
"aliases": [
|
|
78
|
+
"erroronwarnings"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"config-path": {
|
|
82
|
+
"name": "config-path",
|
|
83
|
+
"type": "option",
|
|
84
|
+
"char": "c",
|
|
85
|
+
"summary": "A path to the directory containing a plugin or cli",
|
|
86
|
+
"multiple": false
|
|
67
87
|
}
|
|
68
88
|
},
|
|
69
89
|
"args": {}
|
package/package.json
CHANGED
|
@@ -1,56 +1,53 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-command-reference",
|
|
3
3
|
"description": "Generate the Salesforce CLI command reference guide",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.6",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/salesforcecli/plugin-command-reference/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@oclif/core": "^2.
|
|
9
|
-
"@salesforce/core": "^3.
|
|
10
|
-
"@salesforce/kit": "^
|
|
11
|
-
"@salesforce/sf-plugins-core": "^2.
|
|
12
|
-
"@salesforce/ts-types": "^
|
|
8
|
+
"@oclif/core": "^2.8.5",
|
|
9
|
+
"@salesforce/core": "^3.36.0",
|
|
10
|
+
"@salesforce/kit": "^3.0.0",
|
|
11
|
+
"@salesforce/sf-plugins-core": "^2.4.2",
|
|
12
|
+
"@salesforce/ts-types": "^2.0.1",
|
|
13
13
|
"chalk": "^3.0.0",
|
|
14
|
-
"fs-extra": "^10.0.1",
|
|
15
14
|
"handlebars": "^4.7.7",
|
|
16
|
-
"lodash.uniqby": "^4.7.0",
|
|
17
|
-
"mkdirp": "^1.0.4",
|
|
18
15
|
"tslib": "^2"
|
|
19
16
|
},
|
|
20
17
|
"devDependencies": {
|
|
21
|
-
"@oclif/plugin-help": "^5.
|
|
22
|
-
"@salesforce/dev-config": "^
|
|
23
|
-
"@salesforce/dev-scripts": "^
|
|
24
|
-
"@salesforce/plugin-
|
|
18
|
+
"@oclif/plugin-help": "^5.2.9",
|
|
19
|
+
"@salesforce/dev-config": "^4.0.1",
|
|
20
|
+
"@salesforce/dev-scripts": "^5.0.1",
|
|
21
|
+
"@salesforce/plugin-auth": "^2.7.15",
|
|
25
22
|
"@salesforce/prettier-config": "^0.0.2",
|
|
23
|
+
"@types/debug": "^4.1.7",
|
|
26
24
|
"@types/ejs": "^3.1.2",
|
|
27
|
-
"@
|
|
28
|
-
"@
|
|
29
|
-
"@typescript-eslint/eslint-plugin": "^4.2.0",
|
|
30
|
-
"@typescript-eslint/parser": "^4.2.0",
|
|
25
|
+
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
26
|
+
"@typescript-eslint/parser": "^5.59.2",
|
|
31
27
|
"chai": "^4.2.0",
|
|
32
|
-
"eslint": "^
|
|
33
|
-
"eslint-config-prettier": "^
|
|
34
|
-
"eslint-config-salesforce": "^0.1
|
|
35
|
-
"eslint-config-salesforce-license": "^0.
|
|
36
|
-
"eslint-config-salesforce-typescript": "^
|
|
28
|
+
"eslint": "^8.40.0",
|
|
29
|
+
"eslint-config-prettier": "^8.8.0",
|
|
30
|
+
"eslint-config-salesforce": "^2.0.1",
|
|
31
|
+
"eslint-config-salesforce-license": "^0.2.0",
|
|
32
|
+
"eslint-config-salesforce-typescript": "^1.1.1",
|
|
37
33
|
"eslint-plugin-header": "^3.0.0",
|
|
38
|
-
"eslint-plugin-import": "2.
|
|
39
|
-
"eslint-plugin-jsdoc": "^
|
|
40
|
-
"eslint-plugin-
|
|
41
|
-
"husky": "^
|
|
42
|
-
"mocha": "^
|
|
34
|
+
"eslint-plugin-import": "^2.27.5",
|
|
35
|
+
"eslint-plugin-jsdoc": "^44.0.0",
|
|
36
|
+
"eslint-plugin-sf-plugin": "^1.15.2",
|
|
37
|
+
"husky": "^8.0.3",
|
|
38
|
+
"mocha": "^10.2.0",
|
|
43
39
|
"nyc": "^15.1.0",
|
|
44
|
-
"oclif": "^3.
|
|
45
|
-
"prettier": "^2.
|
|
40
|
+
"oclif": "^3.9.0",
|
|
41
|
+
"prettier": "^2.8.8",
|
|
46
42
|
"pretty-quick": "^3.1.0",
|
|
47
43
|
"shx": "^0.3.3",
|
|
48
44
|
"sinon": "10.0.0",
|
|
49
45
|
"ts-node": "^10.0.0",
|
|
50
|
-
"typescript": "^4.
|
|
46
|
+
"typescript": "^4.9.5",
|
|
47
|
+
"wireit": "^0.9.5"
|
|
51
48
|
},
|
|
52
49
|
"engines": {
|
|
53
|
-
"node": ">=
|
|
50
|
+
"node": ">=16.0.0"
|
|
54
51
|
},
|
|
55
52
|
"files": [
|
|
56
53
|
"/lib",
|
|
@@ -79,30 +76,133 @@
|
|
|
79
76
|
},
|
|
80
77
|
"devPlugins": [
|
|
81
78
|
"@oclif/plugin-help",
|
|
82
|
-
"@salesforce/plugin-
|
|
79
|
+
"@salesforce/plugin-auth"
|
|
83
80
|
]
|
|
84
81
|
},
|
|
85
82
|
"repository": "salesforcecli/plugin-command-reference",
|
|
86
83
|
"scripts": {
|
|
87
|
-
"build": "
|
|
84
|
+
"build": "wireit",
|
|
88
85
|
"clean": "sf-clean",
|
|
89
86
|
"clean-all": "sf-clean all",
|
|
90
|
-
"clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json",
|
|
91
|
-
"
|
|
92
|
-
"compile": "sf-compile",
|
|
87
|
+
"clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -rf test/tmp && shx rm -f oclif.manifest.json",
|
|
88
|
+
"compile": "wireit",
|
|
93
89
|
"docs": "sf-docs",
|
|
94
|
-
"format": "
|
|
95
|
-
"lint": "
|
|
90
|
+
"format": "wireit",
|
|
91
|
+
"lint": "wireit",
|
|
96
92
|
"postpack": "shx rm -f oclif.manifest.json",
|
|
97
|
-
"posttest": "yarn lint",
|
|
98
93
|
"prepack": "sf-prepack",
|
|
99
94
|
"prepare": "sf-install",
|
|
100
|
-
"
|
|
101
|
-
"test": "
|
|
95
|
+
"test": "wireit",
|
|
96
|
+
"test:only": "wireit",
|
|
102
97
|
"version": "oclif readme"
|
|
103
98
|
},
|
|
104
99
|
"publishConfig": {
|
|
105
100
|
"access": "public"
|
|
106
101
|
},
|
|
107
|
-
"main": "lib/index.js"
|
|
102
|
+
"main": "lib/index.js",
|
|
103
|
+
"wireit": {
|
|
104
|
+
"build": {
|
|
105
|
+
"dependencies": [
|
|
106
|
+
"compile",
|
|
107
|
+
"lint"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"compile": {
|
|
111
|
+
"command": "tsc -p . --pretty --incremental",
|
|
112
|
+
"files": [
|
|
113
|
+
"src/**/*.ts",
|
|
114
|
+
"**/tsconfig.json",
|
|
115
|
+
"messages/**"
|
|
116
|
+
],
|
|
117
|
+
"output": [
|
|
118
|
+
"lib/**",
|
|
119
|
+
"*.tsbuildinfo"
|
|
120
|
+
],
|
|
121
|
+
"clean": "if-file-deleted"
|
|
122
|
+
},
|
|
123
|
+
"format": {
|
|
124
|
+
"command": "prettier --write \"+(src|test|schemas)/**/*.+(ts|js|json)|command-snapshot.json\"",
|
|
125
|
+
"files": [
|
|
126
|
+
"src/**/*.ts",
|
|
127
|
+
"test/**/*.ts",
|
|
128
|
+
"schemas/**/*.json",
|
|
129
|
+
"command-snapshot.json",
|
|
130
|
+
".prettier*"
|
|
131
|
+
],
|
|
132
|
+
"output": []
|
|
133
|
+
},
|
|
134
|
+
"lint": {
|
|
135
|
+
"command": "eslint src test --color --cache --cache-location .eslintcache",
|
|
136
|
+
"files": [
|
|
137
|
+
"src/**/*.ts",
|
|
138
|
+
"test/**/*.ts",
|
|
139
|
+
"messages/**",
|
|
140
|
+
"**/.eslint*",
|
|
141
|
+
"**/tsconfig.json"
|
|
142
|
+
],
|
|
143
|
+
"output": []
|
|
144
|
+
},
|
|
145
|
+
"test:compile": {
|
|
146
|
+
"command": "tsc -p \"./test\" --pretty",
|
|
147
|
+
"files": [
|
|
148
|
+
"test/**/*.ts",
|
|
149
|
+
"**/tsconfig.json"
|
|
150
|
+
],
|
|
151
|
+
"output": []
|
|
152
|
+
},
|
|
153
|
+
"test": {
|
|
154
|
+
"dependencies": [
|
|
155
|
+
"test:compile",
|
|
156
|
+
"test:only",
|
|
157
|
+
"lint"
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
"test:only": {
|
|
161
|
+
"command": "nyc mocha \"test/**/*.test.ts\"",
|
|
162
|
+
"env": {
|
|
163
|
+
"FORCE_COLOR": "2"
|
|
164
|
+
},
|
|
165
|
+
"files": [
|
|
166
|
+
"test/**/*.ts",
|
|
167
|
+
"src/**/*.ts",
|
|
168
|
+
"**/tsconfig.json",
|
|
169
|
+
".mocha*",
|
|
170
|
+
"!*.nut.ts",
|
|
171
|
+
".nycrc"
|
|
172
|
+
],
|
|
173
|
+
"output": [],
|
|
174
|
+
"dependencies": [
|
|
175
|
+
"test:command-reference"
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
"test:command-reference": {
|
|
179
|
+
"command": "\"./bin/dev\" commandreference:generate --plugins auth --outputdir test/tmp",
|
|
180
|
+
"files": [
|
|
181
|
+
"src/**/*.ts",
|
|
182
|
+
"messages/**",
|
|
183
|
+
"package.json"
|
|
184
|
+
],
|
|
185
|
+
"output": [
|
|
186
|
+
"test/tmp"
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
"test:deprecation-policy": {
|
|
190
|
+
"command": "\"./bin/dev\" snapshot:compare",
|
|
191
|
+
"files": [
|
|
192
|
+
"src/**/*.ts"
|
|
193
|
+
],
|
|
194
|
+
"output": [],
|
|
195
|
+
"dependencies": [
|
|
196
|
+
"compile"
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
"test:json-schema": {
|
|
200
|
+
"command": "\"./bin/dev\" schema:compare",
|
|
201
|
+
"files": [
|
|
202
|
+
"src/**/*.ts",
|
|
203
|
+
"schemas"
|
|
204
|
+
],
|
|
205
|
+
"output": []
|
|
206
|
+
}
|
|
207
|
+
}
|
|
108
208
|
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Licensed under the BSD 3-Clause license.
|
|
6
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.CLIReferenceTopic = void 0;
|
|
10
|
-
const path_1 = require("path");
|
|
11
|
-
const ditamap_1 = require("./ditamap");
|
|
12
|
-
class CLIReferenceTopic extends ditamap_1.Ditamap {
|
|
13
|
-
constructor(topic, longDescription) {
|
|
14
|
-
const filename = ditamap_1.Ditamap.file(`cli_reference_${topic}`, 'xml');
|
|
15
|
-
// Set the data of topic and filenames
|
|
16
|
-
super(filename, {
|
|
17
|
-
topic,
|
|
18
|
-
longDescription,
|
|
19
|
-
});
|
|
20
|
-
// Override destination to include topic and subtopic
|
|
21
|
-
this.destination = (0, path_1.join)(ditamap_1.Ditamap.outputDir, topic, filename);
|
|
22
|
-
}
|
|
23
|
-
getTemplateFileName() {
|
|
24
|
-
return 'cli_reference_topic.hbs';
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.CLIReferenceTopic = CLIReferenceTopic;
|
|
28
|
-
//# sourceMappingURL=cli-reference-topic.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli-reference-topic.js","sourceRoot":"","sources":["../../src/ditamap/cli-reference-topic.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,+BAA4B;AAC5B,uCAAoC;AAEpC,MAAa,iBAAkB,SAAQ,iBAAO;IAC5C,YAAmB,KAAa,EAAE,eAAuB;QACvD,MAAM,QAAQ,GAAG,iBAAO,CAAC,IAAI,CAAC,iBAAiB,KAAK,EAAE,EAAE,KAAK,CAAC,CAAC;QAC/D,sCAAsC;QACtC,KAAK,CAAC,QAAQ,EAAE;YACd,KAAK;YACL,eAAe;SAChB,CAAC,CAAC;QAEH,qDAAqD;QACrD,IAAI,CAAC,WAAW,GAAG,IAAA,WAAI,EAAC,iBAAO,CAAC,SAAS,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC9D,CAAC;IAEM,mBAAmB;QACxB,OAAO,yBAAyB,CAAC;IACnC,CAAC;CACF;AAhBD,8CAgBC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Licensed under the BSD 3-Clause license.
|
|
6
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.MainTopicIntro = void 0;
|
|
10
|
-
const path_1 = require("path");
|
|
11
|
-
const ts_types_1 = require("@salesforce/ts-types");
|
|
12
|
-
const utils_1 = require("../utils");
|
|
13
|
-
const ditamap_1 = require("./ditamap");
|
|
14
|
-
class MainTopicIntro extends ditamap_1.Ditamap {
|
|
15
|
-
constructor(topic, subtopic, subTopicMeta) {
|
|
16
|
-
const filename = ditamap_1.Ditamap.file(`cli_reference_${topic}_${subtopic}`, 'xml');
|
|
17
|
-
let trailblazerCommunityUrl;
|
|
18
|
-
let trailblazerCommunityName;
|
|
19
|
-
if (subTopicMeta.trailblazerCommunityLink) {
|
|
20
|
-
const community = (0, ts_types_1.ensureJsonMap)(subTopicMeta.trailblazerCommunityLink);
|
|
21
|
-
trailblazerCommunityUrl = community.url;
|
|
22
|
-
trailblazerCommunityName = community.name;
|
|
23
|
-
}
|
|
24
|
-
if (!subTopicMeta.longDescription && !subTopicMeta.external) {
|
|
25
|
-
subTopicMeta.longDescription = (0, utils_1.punctuate)((0, ts_types_1.asString)(subTopicMeta.description));
|
|
26
|
-
}
|
|
27
|
-
super(filename, {
|
|
28
|
-
topic: subtopic,
|
|
29
|
-
longDescription: subTopicMeta.longDescription,
|
|
30
|
-
isOpenPilotTopic: subTopicMeta.state === 'openPilot',
|
|
31
|
-
isClosedPilotTopic: subTopicMeta.state === 'closedPilot',
|
|
32
|
-
isBetaTopic: subTopicMeta.state === 'beta',
|
|
33
|
-
trailblazerCommunityUrl,
|
|
34
|
-
trailblazerCommunityName,
|
|
35
|
-
});
|
|
36
|
-
this.destination = (0, path_1.join)(ditamap_1.Ditamap.outputDir, topic, filename);
|
|
37
|
-
}
|
|
38
|
-
getTemplateFileName() {
|
|
39
|
-
return 'main_topic_intro.hbs';
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.MainTopicIntro = MainTopicIntro;
|
|
43
|
-
//# sourceMappingURL=main-topic-intro.js.map
|