@salesforce/plugin-info 2.6.51 → 3.0.1

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 (40) hide show
  1. package/README.md +15 -15
  2. package/lib/commands/doctor.d.ts +6 -6
  3. package/lib/commands/doctor.js +62 -65
  4. package/lib/commands/doctor.js.map +1 -1
  5. package/lib/commands/info/releasenotes/display.d.ts +3 -3
  6. package/lib/commands/info/releasenotes/display.js +41 -45
  7. package/lib/commands/info/releasenotes/display.js.map +1 -1
  8. package/lib/constants.js +1 -4
  9. package/lib/constants.js.map +1 -1
  10. package/lib/diagnostics.d.ts +1 -1
  11. package/lib/diagnostics.js +15 -14
  12. package/lib/diagnostics.js.map +1 -1
  13. package/lib/doctor.d.ts +1 -1
  14. package/lib/doctor.js +30 -27
  15. package/lib/doctor.js.map +1 -1
  16. package/lib/index.d.ts +2 -2
  17. package/lib/index.js +2 -7
  18. package/lib/index.js.map +1 -1
  19. package/lib/shared/getDistTagVersion.d.ts +5 -2
  20. package/lib/shared/getDistTagVersion.js +10 -10
  21. package/lib/shared/getDistTagVersion.js.map +1 -1
  22. package/lib/shared/getInfoConfig.d.ts +8 -5
  23. package/lib/shared/getInfoConfig.js +6 -9
  24. package/lib/shared/getInfoConfig.js.map +1 -1
  25. package/lib/shared/getReleaseNotes.d.ts +5 -2
  26. package/lib/shared/getReleaseNotes.js +11 -14
  27. package/lib/shared/getReleaseNotes.js.map +1 -1
  28. package/lib/shared/index.d.ts +7 -0
  29. package/lib/shared/index.js +17 -0
  30. package/lib/shared/index.js.map +1 -0
  31. package/lib/shared/parseReleaseNotes.d.ts +5 -2
  32. package/lib/shared/parseReleaseNotes.js +10 -13
  33. package/lib/shared/parseReleaseNotes.js.map +1 -1
  34. package/messages/doctor.md +2 -6
  35. package/oclif.lock +8534 -0
  36. package/oclif.manifest.json +100 -57
  37. package/package.json +31 -53
  38. package/lib/hooks/init/init_doctor.d.ts +0 -3
  39. package/lib/hooks/init/init_doctor.js +0 -23
  40. package/lib/hooks/init/init_doctor.js.map +0 -1
@@ -1,15 +1,9 @@
1
1
  {
2
- "version": "2.6.51",
3
2
  "commands": {
4
3
  "doctor": {
5
- "id": "doctor",
6
- "summary": "Gather CLI configuration data and run diagnostic tests to discover and report potential problems in your environment.",
7
- "description": "When you run the doctor command without parameters, it first displays a diagnostic overview of your environment. It then writes a detailed diagnosis to a JSON file in the current directory. Use the --outputdir to specify a different directory. To run diagnostic tests on a specific plugin, use the --plugin parameter. If the plugin isn't listening to the doctor, then you get a warning.\n\nUse the --command parameter to run a specific command in debug mode; the doctor writes both stdout and stderr to \\*.log files that you can provide to Salesforce Customer Support or attach to a GitHub issue.\n\nPlugin providers can also implement their own doctor diagnostic tests by listening to the \"sf-doctor\" event and running plugin specific tests that are then included in the doctor diagnostics log.",
8
- "strict": true,
9
- "pluginName": "@salesforce/plugin-info",
10
- "pluginAlias": "@salesforce/plugin-info",
11
- "pluginType": "core",
12
4
  "aliases": [],
5
+ "args": {},
6
+ "description": "When you run the doctor command without parameters, it first displays a diagnostic overview of your environment. It then writes a detailed diagnosis to a JSON file in the current directory. Use the --outputdir to specify a different directory. To run diagnostic tests on a specific plugin, use the --plugin parameter. If the plugin isn't listening to the doctor, then you get a warning.\n\nUse the --command parameter to run a specific command in debug mode; the doctor writes both stdout and stderr to \\*.log files that you can provide to Salesforce Customer Support or attach to a GitHub issue.\n\nPlugin providers can also implement their own doctor diagnostic tests by listening to the \"sf-doctor\" event and running plugin specific tests that are then included in the doctor diagnostics log.",
13
7
  "examples": [
14
8
  "Run CLI doctor diagnostics:\n<%= config.bin %> doctor",
15
9
  "Run CLI doctor diagnostics and the specified command, and write the debug output to a file:\n<%= config.bin %> doctor --command \"force:org:list --all\"",
@@ -17,70 +11,88 @@
17
11
  ],
18
12
  "flags": {
19
13
  "json": {
20
- "name": "json",
21
- "type": "boolean",
22
14
  "description": "Format output as json.",
23
15
  "helpGroup": "GLOBAL",
24
- "allowNo": false
16
+ "name": "json",
17
+ "allowNo": false,
18
+ "type": "boolean"
25
19
  },
26
20
  "command": {
27
- "name": "command",
28
- "type": "option",
29
21
  "char": "c",
22
+ "name": "command",
30
23
  "summary": "Command to run in debug mode; results are written to a log file.",
31
- "multiple": false
24
+ "hasDynamicHelp": false,
25
+ "multiple": false,
26
+ "type": "option"
32
27
  },
33
28
  "plugin": {
34
- "name": "plugin",
35
- "type": "option",
36
29
  "char": "p",
30
+ "name": "plugin",
37
31
  "summary": "Specific plugin on which to run diagnostics.",
38
- "multiple": false
32
+ "hasDynamicHelp": false,
33
+ "multiple": false,
34
+ "type": "option"
39
35
  },
40
36
  "output-dir": {
41
- "name": "output-dir",
42
- "type": "option",
43
- "char": "d",
44
- "summary": "Directory to save all created files rather than the current working directory.",
45
- "multiple": false,
46
37
  "aliases": [
47
38
  "outputdir",
48
39
  "o"
49
- ]
40
+ ],
41
+ "char": "d",
42
+ "name": "output-dir",
43
+ "summary": "Directory to save all created files rather than the current working directory.",
44
+ "hasDynamicHelp": false,
45
+ "multiple": false,
46
+ "type": "option"
50
47
  },
51
48
  "create-issue": {
52
- "name": "create-issue",
53
- "type": "boolean",
49
+ "aliases": [
50
+ "createissue"
51
+ ],
54
52
  "char": "i",
53
+ "name": "create-issue",
55
54
  "summary": "Create a new issue on our GitHub repo and attach all diagnostic results.",
56
55
  "allowNo": false,
57
- "aliases": [
58
- "createissue"
59
- ]
56
+ "type": "boolean"
60
57
  },
61
58
  "loglevel": {
62
- "name": "loglevel",
63
- "type": "option",
64
- "hidden": true,
65
- "multiple": false,
66
59
  "deprecated": {
67
60
  "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
68
- }
61
+ },
62
+ "hidden": true,
63
+ "name": "loglevel",
64
+ "hasDynamicHelp": false,
65
+ "multiple": false,
66
+ "type": "option"
69
67
  }
70
68
  },
71
- "args": {}
72
- },
73
- "info:releasenotes:display": {
74
- "id": "info:releasenotes:display",
75
- "summary": "Display Salesforce CLI release notes on the command line.",
76
- "description": "By default, this command displays release notes for the currently installed CLI version on your computer. Use the --version flag to view release notes for a different release.",
77
- "strict": true,
78
- "pluginName": "@salesforce/plugin-info",
69
+ "hasDynamicHelp": false,
70
+ "hiddenAliases": [],
71
+ "id": "doctor",
79
72
  "pluginAlias": "@salesforce/plugin-info",
73
+ "pluginName": "@salesforce/plugin-info",
80
74
  "pluginType": "core",
75
+ "strict": true,
76
+ "summary": "Gather CLI configuration data and run diagnostic tests to discover and report potential problems in your environment.",
77
+ "enableJsonFlag": true,
78
+ "SF_ENV": "SF_ENV",
79
+ "isESM": true,
80
+ "relativePath": [
81
+ "lib",
82
+ "commands",
83
+ "doctor.js"
84
+ ],
85
+ "aliasPermutations": [],
86
+ "permutations": [
87
+ "doctor"
88
+ ]
89
+ },
90
+ "info:releasenotes:display": {
81
91
  "aliases": [
82
92
  "whatsnew"
83
93
  ],
94
+ "args": {},
95
+ "description": "By default, this command displays release notes for the currently installed CLI version on your computer. Use the --version flag to view release notes for a different release.",
84
96
  "examples": [
85
97
  "Display release notes for the currently installed CLI version:\n<%= config.bin %> <%= command.id %> stable, stable-rc, latest, latest-rc, rc",
86
98
  "Display release notes for CLI version 7.120.0:\n<%= config.bin %> <%= command.id %> --version 7.120.0 stable, stable-rc, latest, latest-rc, rc",
@@ -88,37 +100,68 @@
88
100
  ],
89
101
  "flags": {
90
102
  "json": {
91
- "name": "json",
92
- "type": "boolean",
93
103
  "description": "Format output as json.",
94
104
  "helpGroup": "GLOBAL",
95
- "allowNo": false
105
+ "name": "json",
106
+ "allowNo": false,
107
+ "type": "boolean"
96
108
  },
97
109
  "version": {
98
- "name": "version",
99
- "type": "option",
100
110
  "char": "v",
111
+ "name": "version",
101
112
  "summary": "CLI version or tag for which to display release notes.",
102
- "multiple": false
113
+ "hasDynamicHelp": false,
114
+ "multiple": false,
115
+ "type": "option"
103
116
  },
104
117
  "hook": {
118
+ "hidden": true,
105
119
  "name": "hook",
106
- "type": "boolean",
107
120
  "summary": "This hidden parameter is used in post install or update hooks.",
108
- "hidden": true,
109
- "allowNo": false
121
+ "allowNo": false,
122
+ "type": "boolean"
110
123
  },
111
124
  "loglevel": {
112
- "name": "loglevel",
113
- "type": "option",
114
- "hidden": true,
115
- "multiple": false,
116
125
  "deprecated": {
117
126
  "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable."
118
- }
127
+ },
128
+ "hidden": true,
129
+ "name": "loglevel",
130
+ "hasDynamicHelp": false,
131
+ "multiple": false,
132
+ "type": "option"
119
133
  }
120
134
  },
121
- "args": {}
135
+ "hasDynamicHelp": false,
136
+ "hiddenAliases": [],
137
+ "id": "info:releasenotes:display",
138
+ "pluginAlias": "@salesforce/plugin-info",
139
+ "pluginName": "@salesforce/plugin-info",
140
+ "pluginType": "core",
141
+ "strict": true,
142
+ "summary": "Display Salesforce CLI release notes on the command line.",
143
+ "enableJsonFlag": true,
144
+ "SF_ENV": "SF_ENV",
145
+ "isESM": true,
146
+ "relativePath": [
147
+ "lib",
148
+ "commands",
149
+ "info",
150
+ "releasenotes",
151
+ "display.js"
152
+ ],
153
+ "aliasPermutations": [
154
+ "whatsnew"
155
+ ],
156
+ "permutations": [
157
+ "info:releasenotes:display",
158
+ "releasenotes:info:display",
159
+ "releasenotes:display:info",
160
+ "info:display:releasenotes",
161
+ "display:info:releasenotes",
162
+ "display:releasenotes:info"
163
+ ]
122
164
  }
123
- }
165
+ },
166
+ "version": "3.0.1"
124
167
  }
package/package.json CHANGED
@@ -1,78 +1,57 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-info",
3
3
  "description": "Plugin for accessing cli info from the command line",
4
- "version": "2.6.51",
4
+ "version": "3.0.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
- "main": "lib/index.js",
8
7
  "dependencies": {
9
- "@oclif/core": "^2.15.0",
8
+ "@oclif/core": "^3.7.1",
10
9
  "@salesforce/core": "^5.3.1",
11
10
  "@salesforce/kit": "^3.0.14",
12
- "@salesforce/sf-plugins-core": "^3.1.28",
13
- "got": "^11.8.6",
11
+ "@salesforce/sf-plugins-core": "^4",
12
+ "got": "^13.0.0",
14
13
  "marked": "^4.3.0",
15
14
  "marked-terminal": "^4.2.0",
16
15
  "open": "^8.4.2",
17
16
  "proxy-agent": "^6.3.1",
18
- "semver": "^7.5.4",
19
- "tslib": "^2"
17
+ "semver": "^7.5.4"
20
18
  },
21
19
  "devDependencies": {
22
- "@oclif/plugin-command-snapshot": "^4.0.14",
23
- "@salesforce/cli-plugins-testkit": "^4.4.10",
24
- "@salesforce/dev-config": "^4.0.1",
25
- "@salesforce/dev-scripts": "^5.11.0",
20
+ "@oclif/plugin-command-snapshot": "^5",
21
+ "@salesforce/cli-plugins-testkit": "^5",
22
+ "@salesforce/dev-scripts": "^6.0.1",
26
23
  "@salesforce/plugin-command-reference": "^3.0.33",
27
- "@salesforce/prettier-config": "^0.0.3",
28
24
  "@salesforce/ts-sinon": "^1.4.18",
29
- "@swc/core": "1.3.39",
30
25
  "@types/fs-extra": "^9.0.13",
31
26
  "@types/marked": "^4.0.8",
32
27
  "@types/marked-terminal": "^3.1.3",
33
28
  "@types/semver": "^7.5.4",
34
29
  "@types/sinon-chai": "^3.2.11",
35
- "@typescript-eslint/eslint-plugin": "^5.61.0",
36
- "@typescript-eslint/parser": "^5.62.0",
37
- "chai": "^4.3.10",
38
- "eslint": "^8.51.0",
39
- "eslint-config-prettier": "^8.10.0",
40
- "eslint-config-salesforce": "^2.0.2",
41
- "eslint-config-salesforce-license": "^0.2.0",
42
- "eslint-config-salesforce-typescript": "^1.1.2",
43
- "eslint-plugin-header": "^3.1.1",
44
- "eslint-plugin-import": "^2.28.1",
45
- "eslint-plugin-jsdoc": "^43.0.5",
46
30
  "eslint-plugin-sf-plugin": "^1.16.10",
47
- "husky": "^7.0.4",
48
- "mocha": "^9.1.3",
49
- "nyc": "^15.1.0",
50
- "oclif": "^3.17.2",
51
- "prettier": "^2.8.8",
52
- "pretty-quick": "^3.1.0",
31
+ "oclif": "^4.0.3",
53
32
  "shx": "0.3.4",
54
- "sinon": "^11.1.1",
55
33
  "sinon-chai": "^3.7.0",
56
- "ts-node": "^10.4.0",
57
- "typescript": "^4.9.5",
58
- "wireit": "^0.14.0"
34
+ "typescript": "^5.2.2"
59
35
  },
60
36
  "config": {},
61
37
  "engines": {
62
- "node": ">=16.0.0"
38
+ "node": ">=18.0.0"
63
39
  },
64
40
  "files": [
65
41
  "/lib",
66
42
  "/messages",
67
- "/oclif.manifest.json"
43
+ "/oclif.manifest.json",
44
+ "/oclif.lock"
68
45
  ],
69
46
  "homepage": "https://github.com/salesforcecli/plugin-info",
70
47
  "keywords": [
71
48
  "force",
72
49
  "salesforce",
73
- "sfdx",
74
50
  "salesforcedx",
75
- "sfdx-plugin"
51
+ "sf-plugin",
52
+ "sf",
53
+ "sfdx-plugin",
54
+ "sfdx"
76
55
  ],
77
56
  "license": "BSD-3-Clause",
78
57
  "oclif": {
@@ -80,17 +59,12 @@
80
59
  "additionalHelpFlags": [
81
60
  "-h"
82
61
  ],
83
- "bin": "sfdx",
62
+ "bin": "sf",
84
63
  "devPlugins": [
85
64
  "@oclif/plugin-help",
86
65
  "@oclif/plugin-command-snapshot",
87
66
  "@salesforce/plugin-command-reference"
88
67
  ],
89
- "hooks": {
90
- "init": [
91
- "./lib/hooks/init/init_doctor.js"
92
- ]
93
- },
94
68
  "topics": {
95
69
  "info": {
96
70
  "description": "Access Salesforce CLI information from the command line.",
@@ -103,25 +77,27 @@
103
77
  "doctor": {
104
78
  "description": "Tools for diagnosing problems with Salesforce CLI."
105
79
  }
106
- }
80
+ },
81
+ "flexibleTaxonomy": true,
82
+ "topicSeparator": " "
107
83
  },
108
84
  "repository": "salesforcecli/plugin-info",
109
85
  "scripts": {
110
86
  "build": "wireit",
111
87
  "clean": "sf-clean",
112
88
  "clean-all": "sf-clean all",
113
- "clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json",
89
+ "clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json oclif.lock",
114
90
  "compile": "wireit",
115
91
  "docs": "sf-docs",
116
92
  "format": "wireit",
117
93
  "lint": "wireit",
118
- "postpack": "shx rm -f oclif.manifest.json",
94
+ "postpack": "shx rm -f oclif.manifest.json oclif.lock",
119
95
  "prepack": "sf-prepack",
120
96
  "prepare": "sf-install",
121
97
  "test": "wireit",
122
98
  "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
123
99
  "test:only": "wireit",
124
- "version": "oclif-dev readme"
100
+ "version": "oclif readme"
125
101
  },
126
102
  "publishConfig": {
127
103
  "access": "public"
@@ -202,7 +178,7 @@
202
178
  "output": []
203
179
  },
204
180
  "test:command-reference": {
205
- "command": "\"./bin/dev\" commandreference:generate --erroronwarnings",
181
+ "command": "ts-node \"./bin/dev.js\" commandreference:generate --erroronwarnings",
206
182
  "files": [
207
183
  "src/**/*.ts",
208
184
  "messages/**",
@@ -213,7 +189,7 @@
213
189
  ]
214
190
  },
215
191
  "test:deprecation-policy": {
216
- "command": "\"./bin/dev\" snapshot:compare",
192
+ "command": "ts-node \"./bin/dev.js\" snapshot:compare",
217
193
  "files": [
218
194
  "src/**/*.ts"
219
195
  ],
@@ -223,7 +199,7 @@
223
199
  ]
224
200
  },
225
201
  "test:json-schema": {
226
- "command": "\"./bin/dev\" schema:compare",
202
+ "command": "ts-node \"./bin/dev.js\" schema:compare",
227
203
  "files": [
228
204
  "src/**/*.ts",
229
205
  "schemas"
@@ -231,8 +207,10 @@
231
207
  "output": []
232
208
  }
233
209
  },
210
+ "exports": "./lib/index.js",
211
+ "type": "module",
234
212
  "sfdx": {
235
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/2.6.51.crt",
236
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/2.6.51.sig"
213
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/3.0.1.crt",
214
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/3.0.1.sig"
237
215
  }
238
216
  }
@@ -1,3 +0,0 @@
1
- import type { Hook } from '@oclif/core';
2
- declare const hook: Hook<'init'>;
3
- export default hook;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2020, 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
- const core_1 = require("@salesforce/core");
10
- const doctor_1 = require("../../doctor");
11
- const log = core_1.Logger.childFromRoot('plugin-info:init_doctor');
12
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
13
- const hook = async ({ config, argv, id }) => {
14
- log.debug('init_doctor hook');
15
- if (id === 'doctor') {
16
- if (!doctor_1.Doctor.isDoctorEnabled()) {
17
- doctor_1.Doctor.init(config);
18
- }
19
- }
20
- return Promise.resolve();
21
- };
22
- exports.default = hook;
23
- //# sourceMappingURL=init_doctor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"init_doctor.js","sourceRoot":"","sources":["../../../src/hooks/init/init_doctor.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAGH,2CAA0C;AAC1C,yCAAsC;AAEtC,MAAM,GAAG,GAAG,aAAM,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;AAC5D,6DAA6D;AAC7D,MAAM,IAAI,GAAiB,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,EAAiB,EAAE;IACvE,GAAG,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAC9B,IAAI,EAAE,KAAK,QAAQ,EAAE;QACnB,IAAI,CAAC,eAAM,CAAC,eAAe,EAAE,EAAE;YAC7B,eAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SACrB;KACF;IAED,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AAC3B,CAAC,CAAC;AAEF,kBAAe,IAAI,CAAC"}