@salesforce/plugin-command-reference 2.4.4 → 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.
Files changed (41) hide show
  1. package/README.md +31 -15
  2. package/lib/commands/commandreference/generate.d.ts +14 -7
  3. package/lib/commands/commandreference/generate.js +105 -52
  4. package/lib/commands/commandreference/generate.js.map +1 -1
  5. package/lib/commands/jit/install.js +4 -7
  6. package/lib/commands/jit/install.js.map +1 -1
  7. package/lib/ditamap/base-ditamap.js +1 -0
  8. package/lib/ditamap/base-ditamap.js.map +1 -1
  9. package/lib/ditamap/cli-reference.js +1 -0
  10. package/lib/ditamap/cli-reference.js.map +1 -1
  11. package/lib/ditamap/command.d.ts +8 -5
  12. package/lib/ditamap/command.js +50 -38
  13. package/lib/ditamap/command.js.map +1 -1
  14. package/lib/ditamap/ditamap.d.ts +8 -8
  15. package/lib/ditamap/ditamap.js +10 -10
  16. package/lib/ditamap/ditamap.js.map +1 -1
  17. package/lib/ditamap/help-reference.js +1 -0
  18. package/lib/ditamap/help-reference.js.map +1 -1
  19. package/lib/ditamap/topic-commands.d.ts +2 -2
  20. package/lib/ditamap/topic-commands.js +1 -0
  21. package/lib/ditamap/topic-commands.js.map +1 -1
  22. package/lib/ditamap/topic-ditamap.js +1 -0
  23. package/lib/ditamap/topic-ditamap.js.map +1 -1
  24. package/lib/docs.d.ts +4 -5
  25. package/lib/docs.js +53 -65
  26. package/lib/docs.js.map +1 -1
  27. package/lib/utils.d.ts +81 -7
  28. package/lib/utils.js +4 -19
  29. package/lib/utils.js.map +1 -1
  30. package/messages/main.md +53 -0
  31. package/oclif.manifest.json +33 -13
  32. package/package.json +143 -42
  33. package/lib/ditamap/cli-reference-topic.d.ts +0 -5
  34. package/lib/ditamap/cli-reference-topic.js +0 -28
  35. package/lib/ditamap/cli-reference-topic.js.map +0 -1
  36. package/lib/ditamap/main-topic-intro.d.ts +0 -6
  37. package/lib/ditamap/main-topic-intro.js +0 -43
  38. package/lib/ditamap/main-topic-intro.js.map +0 -1
  39. package/messages/main.json +0 -9
  40. package/templates/cli_reference_topic.hbs +0 -25
  41. package/templates/main_topic_intro.hbs +0 -44
package/lib/utils.d.ts CHANGED
@@ -1,12 +1,86 @@
1
1
  /// <reference types="node" />
2
2
  import { EventEmitter } from 'events';
3
- import { Dictionary, JsonMap } from '@salesforce/ts-types';
4
- import { Command } from '@oclif/core';
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
- } & JsonMap;
8
+ longDescription?: string;
9
+ binary: string;
10
+ deprecated?: boolean;
11
+ };
9
12
  export declare const events: EventEmitter;
10
- export declare function mergeDeep(target: Dictionary, source: Dictionary): Dictionary;
11
- export declare function punctuate(description: string): string;
12
- export declare function helpFromDescription(description: string): string;
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.helpFromDescription = exports.punctuate = exports.mergeDeep = exports.events = void 0;
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.charAt(mainDescription.length - 1) !== '.') {
19
+ if (!mainDescription.endsWith('.')) {
33
20
  mainDescription += '.';
34
21
  }
35
22
  return mainDescription;
36
23
  }
37
24
  exports.punctuate = punctuate;
38
- function helpFromDescription(description) {
39
- return description ? description.split(os_1.EOL).slice(1).join(os_1.EOL).trim() : '';
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;AACzB,mDAAqE;AAKxD,QAAA,MAAM,GAAG,IAAI,qBAAY,EAAE,CAAC;AAEzC,SAAgB,SAAS,CAAC,MAAkB,EAAE,MAAkB;IAC9D,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAClC,IAAI,IAAA,mBAAQ,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,IAAA,mBAAQ,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE;YAClD,SAAS,CAAC,MAAM,CAAC,GAAG,CAAe,EAAE,MAAM,CAAC,GAAG,CAAe,CAAC,CAAC;SACjE;aAAM;YACL,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;SAC3B;IACH,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC;AATD,8BASC;AAED,SAAgB,SAAS,CAAC,WAAmB;IAC3C,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,eAAe,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;QAC9D,eAAe,IAAI,GAAG,CAAC;KACxB;IAED,OAAO,eAAe,CAAC;AACzB,CAAC;AAbD,8BAaC;AAED,SAAgB,mBAAmB,CAAC,WAAmB;IACrD,OAAO,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,QAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC7E,CAAC;AAFD,kDAEC"}
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"}
@@ -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
@@ -1,14 +1,21 @@
1
1
  {
2
- "version": "2.4.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
- "outputdir": {
21
- "name": "outputdir",
27
+ "output-dir": {
28
+ "name": "output-dir",
22
29
  "type": "option",
23
30
  "char": "d",
24
- "description": "output directory to put generated files",
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
- "description": "comma separated list of plugin names to be part of the generation. Defaults to the oclif plugin in the current working directory",
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
- "description": "include all relevant plugins in the generation",
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
- "description": "unique suffix to append to generated ditamap",
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
- "description": "show hidden commands",
69
+ "summary": "show hidden commands",
60
70
  "allowNo": false
61
71
  },
62
- "erroronwarnings": {
63
- "name": "erroronwarnings",
72
+ "error-on-warnings": {
73
+ "name": "error-on-warnings",
64
74
  "type": "boolean",
65
- "description": "fail the command if there are any warnings",
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,55 +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",
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.0.7",
9
- "@salesforce/core": "^3.32.12",
10
- "@salesforce/kit": "^1.8.2",
11
- "@salesforce/sf-plugins-core": "^2.0.1",
12
- "@salesforce/ts-types": "^1.7.1",
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.1.1",
22
- "@salesforce/dev-config": "^3.1.0",
23
- "@salesforce/dev-scripts": "^2.0.4",
24
- "@salesforce/plugin-login": "^1.1.15",
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",
26
- "@types/fs-extra": "^9.0.13",
27
- "@types/lodash.uniqby": "^4.7.6",
28
- "@typescript-eslint/eslint-plugin": "^4.2.0",
29
- "@typescript-eslint/parser": "^4.2.0",
23
+ "@types/debug": "^4.1.7",
24
+ "@types/ejs": "^3.1.2",
25
+ "@typescript-eslint/eslint-plugin": "^5.59.2",
26
+ "@typescript-eslint/parser": "^5.59.2",
30
27
  "chai": "^4.2.0",
31
- "eslint": "^7.27.0",
32
- "eslint-config-prettier": "^6.11.0",
33
- "eslint-config-salesforce": "^0.1.6",
34
- "eslint-config-salesforce-license": "^0.1.6",
35
- "eslint-config-salesforce-typescript": "^0.2.8",
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",
36
33
  "eslint-plugin-header": "^3.0.0",
37
- "eslint-plugin-import": "2.24.2",
38
- "eslint-plugin-jsdoc": "^35.1.2",
39
- "eslint-plugin-prettier": "^3.1.3",
40
- "husky": "^7.0.4",
41
- "mocha": "^9.1.3",
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",
42
39
  "nyc": "^15.1.0",
43
- "oclif": "^3.6.1",
44
- "prettier": "^2.0.5",
40
+ "oclif": "^3.9.0",
41
+ "prettier": "^2.8.8",
45
42
  "pretty-quick": "^3.1.0",
46
43
  "shx": "^0.3.3",
47
44
  "sinon": "10.0.0",
48
45
  "ts-node": "^10.0.0",
49
- "typescript": "^4.1.3"
46
+ "typescript": "^4.9.5",
47
+ "wireit": "^0.9.5"
50
48
  },
51
49
  "engines": {
52
- "node": ">=14.0.0"
50
+ "node": ">=16.0.0"
53
51
  },
54
52
  "files": [
55
53
  "/lib",
@@ -78,30 +76,133 @@
78
76
  },
79
77
  "devPlugins": [
80
78
  "@oclif/plugin-help",
81
- "@salesforce/plugin-login"
79
+ "@salesforce/plugin-auth"
82
80
  ]
83
81
  },
84
82
  "repository": "salesforcecli/plugin-command-reference",
85
83
  "scripts": {
86
- "build": "sf-build",
84
+ "build": "wireit",
87
85
  "clean": "sf-clean",
88
86
  "clean-all": "sf-clean all",
89
- "clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json",
90
- "command-reference": "./bin/dev commandreference:generate --plugins login --outputdir test/tmp",
91
- "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",
92
89
  "docs": "sf-docs",
93
- "format": "sf-format",
94
- "lint": "sf-lint",
90
+ "format": "wireit",
91
+ "lint": "wireit",
95
92
  "postpack": "shx rm -f oclif.manifest.json",
96
- "posttest": "yarn lint",
97
93
  "prepack": "sf-prepack",
98
94
  "prepare": "sf-install",
99
- "pretest": "sf-compile-test && yarn command-reference",
100
- "test": "sf-test",
95
+ "test": "wireit",
96
+ "test:only": "wireit",
101
97
  "version": "oclif readme"
102
98
  },
103
99
  "publishConfig": {
104
100
  "access": "public"
105
101
  },
106
- "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
+ }
107
208
  }
@@ -1,5 +0,0 @@
1
- import { Ditamap } from './ditamap';
2
- export declare class CLIReferenceTopic extends Ditamap {
3
- constructor(topic: string, longDescription: string);
4
- getTemplateFileName(): string;
5
- }
@@ -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,6 +0,0 @@
1
- import { JsonMap } from '@salesforce/ts-types';
2
- import { Ditamap } from './ditamap';
3
- export declare class MainTopicIntro extends Ditamap {
4
- constructor(topic: string, subtopic: string, subTopicMeta: JsonMap);
5
- getTemplateFileName(): string;
6
- }
@@ -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
@@ -1 +0,0 @@
1
- {"version":3,"file":"main-topic-intro.js","sourceRoot":"","sources":["../../src/ditamap/main-topic-intro.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,+BAA4B;AAC5B,mDAAiF;AACjF,oCAAqC;AACrC,uCAAoC;AAEpC,MAAa,cAAe,SAAQ,iBAAO;IACzC,YAAmB,KAAa,EAAE,QAAgB,EAAE,YAAqB;QACvE,MAAM,QAAQ,GAAG,iBAAO,CAAC,IAAI,CAAC,iBAAiB,KAAK,IAAI,QAAQ,EAAE,EAAE,KAAK,CAAC,CAAC;QAE3E,IAAI,uBAAgC,CAAC;QACrC,IAAI,wBAAiC,CAAC;QACtC,IAAI,YAAY,CAAC,wBAAwB,EAAE;YACzC,MAAM,SAAS,GAAG,IAAA,wBAAa,EAAC,YAAY,CAAC,wBAAwB,CAAC,CAAC;YACvE,uBAAuB,GAAG,SAAS,CAAC,GAAG,CAAC;YACxC,wBAAwB,GAAG,SAAS,CAAC,IAAI,CAAC;SAC3C;QAED,IAAI,CAAC,YAAY,CAAC,eAAe,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE;YAC3D,YAAY,CAAC,eAAe,GAAG,IAAA,iBAAS,EAAC,IAAA,mBAAQ,EAAC,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC;SAC9E;QAED,KAAK,CAAC,QAAQ,EAAE;YACd,KAAK,EAAE,QAAQ;YACf,eAAe,EAAE,YAAY,CAAC,eAAe;YAC7C,gBAAgB,EAAE,YAAY,CAAC,KAAK,KAAK,WAAW;YACpD,kBAAkB,EAAE,YAAY,CAAC,KAAK,KAAK,aAAa;YACxD,WAAW,EAAE,YAAY,CAAC,KAAK,KAAK,MAAM;YAC1C,uBAAuB;YACvB,wBAAwB;SACzB,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,GAAG,IAAA,WAAI,EAAC,iBAAO,CAAC,SAAS,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC9D,CAAC;IAEM,mBAAmB;QACxB,OAAO,sBAAsB,CAAC;IAChC,CAAC;CACF;AAhCD,wCAgCC"}
@@ -1,9 +0,0 @@
1
- {
2
- "commandDescription": "generate the command reference guide located",
3
- "pluginFlagDescription": "comma separated list of plugin names to be part of the generation. Defaults to the oclif plugin in the current working directory",
4
- "allFlagDescription": "include all relevant plugins in the generation",
5
- "hiddenFlagDescription": "show hidden commands",
6
- "outputdirFlagDescription": "output directory to put generated files",
7
- "erroronwarningFlagDescription": "fail the command if there are any warnings",
8
- "ditamapSuffixFlagDescription": "unique suffix to append to generated ditamap"
9
- }
@@ -1,25 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
3
- "concept.dtd">
4
- <concept id="{{uniqueId 'cli_reference' topic}}" xml:lang="en-us">
5
- <!--
6
-
7
- NOTE TO WRITERS:
8
- THIS FILE IS AUTOGENERATED. DON’T MAKE CHANGES TO THIS FILE IN PERFORCE! YOUR CHANGES WILL BE OVERWRITTEN.
9
- IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR DETAILS.
10
-
11
- -->
12
- <!--This is a static file that should be passed as-is through the autogen process.-->
13
- <title><codeph otherprops="nolang">{{topic}}</codeph> Namespace</title>
14
- <shortdesc>{{longDescription}}</shortdesc>
15
- <prolog>
16
- <metadata>
17
- <!--In the future we’ll add keywords here.-->
18
- <othermeta content="reference" name="topic_type"/>
19
- <othermeta content="Developer_Tools" name="app_area"/>
20
- <othermeta content="Developer Partner" name="role"/>
21
- <othermeta content="EE UE DE PXE" name="edition"/>
22
- <othermeta content="aloha mobile sfx" name="ui_platform"/>
23
- </metadata>
24
- </prolog>
25
- </concept>