@salesforce/plugin-apex 1.5.1 → 2.2.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.
Files changed (74) hide show
  1. package/README.md +9 -9
  2. package/lib/commands/apex/get/log.d.ts +20 -0
  3. package/lib/commands/apex/get/log.js +73 -0
  4. package/lib/commands/apex/get/log.js.map +1 -0
  5. package/lib/commands/apex/get/test.d.ts +19 -0
  6. package/lib/commands/apex/get/test.js +74 -0
  7. package/lib/commands/apex/get/test.js.map +1 -0
  8. package/lib/commands/apex/list/log.d.ts +17 -0
  9. package/lib/commands/apex/list/log.js +76 -0
  10. package/lib/commands/apex/list/log.js.map +1 -0
  11. package/lib/commands/apex/run/test.d.ts +33 -0
  12. package/lib/commands/apex/run/test.js +198 -0
  13. package/lib/commands/apex/run/test.js.map +1 -0
  14. package/lib/commands/apex/run.d.ts +25 -0
  15. package/lib/commands/apex/run.js +53 -0
  16. package/lib/commands/apex/run.js.map +1 -0
  17. package/lib/commands/apex/tail/log.d.ts +26 -0
  18. package/lib/commands/apex/tail/log.js +81 -0
  19. package/lib/commands/apex/tail/log.js.map +1 -0
  20. package/lib/legacyColorization.js +36 -38
  21. package/lib/legacyColorization.js.map +1 -1
  22. package/lib/reporters/index.d.ts +2 -2
  23. package/lib/reporters/index.js +3 -3
  24. package/lib/reporters/index.js.map +1 -1
  25. package/lib/reporters/jsonReporter.d.ts +33 -16
  26. package/lib/reporters/jsonReporter.js +23 -9
  27. package/lib/reporters/jsonReporter.js.map +1 -1
  28. package/lib/reporters/runReporter.d.ts +6 -0
  29. package/lib/reporters/runReporter.js +48 -0
  30. package/lib/reporters/runReporter.js.map +1 -0
  31. package/lib/reporters/testReporter.d.ts +44 -0
  32. package/lib/reporters/testReporter.js +170 -0
  33. package/lib/reporters/testReporter.js.map +1 -0
  34. package/lib/utils.d.ts +0 -2
  35. package/lib/utils.js +2 -21
  36. package/lib/utils.js.map +1 -1
  37. package/messages/get.md +45 -0
  38. package/messages/list.md +63 -0
  39. package/messages/report.md +45 -0
  40. package/messages/run.md +48 -0
  41. package/messages/runtest.md +129 -0
  42. package/messages/tail.md +37 -0
  43. package/oclif.manifest.json +426 -800
  44. package/package.json +30 -30
  45. package/lib/commands/force/apex/execute.d.ts +0 -16
  46. package/lib/commands/force/apex/execute.js +0 -109
  47. package/lib/commands/force/apex/execute.js.map +0 -1
  48. package/lib/commands/force/apex/log/get.d.ts +0 -17
  49. package/lib/commands/force/apex/log/get.js +0 -103
  50. package/lib/commands/force/apex/log/get.js.map +0 -1
  51. package/lib/commands/force/apex/log/list.d.ts +0 -17
  52. package/lib/commands/force/apex/log/list.js +0 -151
  53. package/lib/commands/force/apex/log/list.js.map +0 -1
  54. package/lib/commands/force/apex/log/tail.d.ts +0 -17
  55. package/lib/commands/force/apex/log/tail.js +0 -96
  56. package/lib/commands/force/apex/log/tail.js.map +0 -1
  57. package/lib/commands/force/apex/test/report.d.ts +0 -25
  58. package/lib/commands/force/apex/test/report.js +0 -175
  59. package/lib/commands/force/apex/test/report.js.map +0 -1
  60. package/lib/commands/force/apex/test/run.d.ts +0 -40
  61. package/lib/commands/force/apex/test/run.js +0 -299
  62. package/lib/commands/force/apex/test/run.js.map +0 -1
  63. package/lib/reporters/util.d.ts +0 -14
  64. package/lib/reporters/util.js +0 -78
  65. package/lib/reporters/util.js.map +0 -1
  66. package/messages/execute.json +0 -9
  67. package/messages/get.json +0 -12
  68. package/messages/list.json +0 -18
  69. package/messages/messages.json +0 -22
  70. package/messages/org.json +0 -6
  71. package/messages/report.json +0 -23
  72. package/messages/run.json +0 -34
  73. package/messages/tail.json +0 -12
  74. package/yarn.lock +0 -8992
@@ -1,1009 +1,635 @@
1
1
  {
2
- "version": "1.5.1",
2
+ "version": "2.2.0",
3
3
  "commands": {
4
- "force:apex:execute": {
5
- "id": "force:apex:execute",
6
- "description": "executes anonymous Apex code\nExecutes one or more lines of anonymous Apex code entered on the command line, or executes the code in a local file.\nIf you don’t run this command from within a Salesforce DX project, —-targetusername is required.\nTo execute your code interactively, run this command with no parameters. At the prompt, enter all your Apex code; press CTRL-D when you're finished. Your code is then executed in a single execute anonymous request.\nFor more information, see \"Anonymous Blocks\" in the Apex Developer Guide.\n\n",
4
+ "apex:run": {
5
+ "id": "apex:run",
6
+ "summary": "Execute anonymous Apex code entered on the command line or from a local file.",
7
+ "description": "If you don’t run this command from within a Salesforce DX project, you must specify the —-target-org flag.\n\nTo execute your code interactively, run this command with no flags. At the prompt, enter all your Apex code; press CTRL-D when you're finished. Your code is then executed in a single execute anonymous request.\nFor more information, see \"Anonymous Blocks\" in the Apex Developer Guide.",
7
8
  "strict": true,
8
- "usage": "<%= command.id %> [-f <filepath>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
9
9
  "pluginName": "@salesforce/plugin-apex",
10
10
  "pluginAlias": "@salesforce/plugin-apex",
11
11
  "pluginType": "core",
12
- "aliases": [],
12
+ "aliases": [
13
+ "force:apex:execute"
14
+ ],
13
15
  "examples": [
14
- "$ sfdx force:apex:execute -u testusername@salesforce.org -f ~/test.apex",
15
- "$ sfdx force:apex:execute -f ~/test.apex",
16
- "$ sfdx force:apex:execute \nStart typing Apex code. Press the Enter key after each line, then press CTRL+D when finished."
16
+ "Execute the Apex code that's in the ~/test.apex file in the org with the specified username:\n<%= config.bin %> <%= command.id %> --target-org testusername@salesforce.org --apex-code-file ~/test.apex",
17
+ "Similar to previous example, but execute the code in your default org:\n<%= config.bin %> <%= command.id %> --apex-code-file ~/test.apex",
18
+ "Run the command with no flags to start interactive mode; the code will execute in your default org when you exit. At the prompt, start type Apex code and press the Enter key after each line. Press CTRL+D when finished.\n<%= config.bin %> <%= command.id %>"
17
19
  ],
20
+ "deprecateAliases": true,
18
21
  "flags": {
19
22
  "json": {
20
23
  "name": "json",
21
24
  "type": "boolean",
22
- "description": "format output as json",
23
- "allowNo": false
25
+ "description": "Format output as json.",
26
+ "helpGroup": "GLOBAL",
27
+ "allowNo": false,
28
+ "deprecateAliases": true
24
29
  },
25
- "loglevel": {
26
- "name": "loglevel",
30
+ "target-org": {
31
+ "name": "target-org",
27
32
  "type": "option",
28
- "description": "logging level for this command invocation",
29
- "helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
33
+ "char": "o",
34
+ "summary": "Username or alias of the target org.",
35
+ "required": true,
30
36
  "multiple": false,
31
- "options": [
32
- "trace",
33
- "debug",
34
- "info",
35
- "warn",
36
- "error",
37
- "fatal",
38
- "TRACE",
39
- "DEBUG",
40
- "INFO",
41
- "WARN",
42
- "ERROR",
43
- "FATAL"
44
- ],
45
- "default": "warn"
37
+ "deprecateAliases": true,
38
+ "aliases": [
39
+ "targetusername",
40
+ "u"
41
+ ]
46
42
  },
47
- "targetusername": {
48
- "name": "targetusername",
43
+ "api-version": {
44
+ "name": "api-version",
49
45
  "type": "option",
50
- "char": "u",
51
- "description": "username or alias for the target org; overrides default target org",
52
- "multiple": false
46
+ "description": "Override the api version used for api requests made by this command",
47
+ "multiple": false,
48
+ "deprecateAliases": true,
49
+ "aliases": [
50
+ "apiversion"
51
+ ]
53
52
  },
54
- "apiversion": {
55
- "name": "apiversion",
53
+ "loglevel": {
54
+ "name": "loglevel",
56
55
  "type": "option",
57
- "description": "override the api version used for api requests made by this command",
58
- "multiple": false
56
+ "hidden": true,
57
+ "multiple": false,
58
+ "deprecated": {
59
+ "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."
60
+ },
61
+ "deprecateAliases": true
59
62
  },
60
- "apexcodefile": {
61
- "name": "apexcodefile",
63
+ "file": {
64
+ "name": "file",
62
65
  "type": "option",
63
66
  "char": "f",
64
- "description": "path to a local file that contains Apex code",
65
- "multiple": false
67
+ "summary": "Path to a local file that contains Apex code.",
68
+ "multiple": false,
69
+ "deprecateAliases": true,
70
+ "aliases": [
71
+ "apexcodefile"
72
+ ]
66
73
  }
67
74
  },
68
75
  "args": {},
69
- "longDescription": "Executes one or more lines of anonymous Apex code entered on the command line, or executes the code in a local file.\nIf you don’t run this command from within a Salesforce DX project, —-targetusername is required.\nTo execute your code interactively, run this command with no parameters. At the prompt, enter all your Apex code; press CTRL-D when you're finished. Your code is then executed in a single execute anonymous request.\nFor more information, see \"Anonymous Blocks\" in the Apex Developer Guide.\n\n",
70
- "requiresUsername": true,
71
- "flagsConfig": {
72
- "apexcodefile": {
73
- "kind": "filepath",
74
- "char": "f",
75
- "description": "path to a local file that contains Apex code",
76
- "input": [],
77
- "multiple": false,
78
- "type": "option"
79
- },
80
- "loglevel": {
81
- "kind": "enum",
82
- "helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
83
- "description": "logging level for this command invocation",
84
- "longDescription": "The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.",
85
- "default": "warn",
86
- "options": [
87
- "trace",
88
- "debug",
89
- "info",
90
- "warn",
91
- "error",
92
- "fatal",
93
- "TRACE",
94
- "DEBUG",
95
- "INFO",
96
- "WARN",
97
- "ERROR",
98
- "FATAL"
99
- ],
100
- "input": [],
101
- "multiple": false,
102
- "type": "option"
103
- },
104
- "apiversion": {
105
- "type": "option",
106
- "kind": "string",
107
- "description": "override the api version used for api requests made by this command",
108
- "longDescription": "Override the API version used for API requests made by this command.",
109
- "input": [],
110
- "multiple": false
111
- }
112
- }
76
+ "hasDynamicHelp": true
113
77
  },
114
- "force:apex:log:get": {
115
- "id": "force:apex:log:get",
116
- "description": "fetch debug logs\nFetches the specified log or given number of most recent logs from the scratch org. \nTo get the IDs for your debug logs, run \"sfdx force:apex:log:list\". \nUse the --logid parameter to return a specific log. \nUse the --number parameter to return the specified number of recent logs.\nUse the --outputdir parameter to specify the directory to store the logs in.\nExecuting this command without parameters returns the most recent log.",
78
+ "apex:get:log": {
79
+ "id": "apex:get:log",
80
+ "summary": "Fetch the specified log or given number of most recent logs from the org.",
81
+ "description": "To get the IDs for your debug logs, run \"<%= config.bin %> apex log list\". Executing this command without flags returns the most recent log.",
117
82
  "strict": true,
118
- "usage": "<%= command.id %> [-i <id>] [-n <number>] [-d <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
119
83
  "pluginName": "@salesforce/plugin-apex",
120
84
  "pluginAlias": "@salesforce/plugin-apex",
121
85
  "pluginType": "core",
122
- "aliases": [],
86
+ "aliases": [
87
+ "force:apex:log:get"
88
+ ],
123
89
  "examples": [
124
- "$ sfdx force:apex:log:get -i <log id>",
125
- "$ sfdx force:apex:log:get -i <log id> -u me@my.org",
126
- "$ sfdx force:apex:log:get -n 2 -c",
127
- "$ sfdx force:apex:log:get -d Users/Desktop/logs -n 2"
90
+ "Fetch the log in your default org using an ID:\n<%= config.bin %> <%= command.id %> --log-id <log id>",
91
+ "Fetch the log in the org with the specified username using an ID:\n<%= config.bin %> <%= command.id %> --log-id <log id> --target-org me@my.org",
92
+ "Fetch the two most recent logs in your default org:\n<%= config.bin %> <%= command.id %> --number 2",
93
+ "Similar to previous example, but save the two log files in the specified directory:\n<%= config.bin %> <%= command.id %> --output-dir /Users/sfdxUser/logs --number 2"
128
94
  ],
95
+ "deprecateAliases": true,
129
96
  "flags": {
130
97
  "json": {
131
98
  "name": "json",
132
99
  "type": "boolean",
133
- "description": "format output as JSON",
134
- "allowNo": false
100
+ "description": "Format output as json.",
101
+ "helpGroup": "GLOBAL",
102
+ "allowNo": false,
103
+ "deprecateAliases": true
135
104
  },
136
- "loglevel": {
137
- "name": "loglevel",
105
+ "target-org": {
106
+ "name": "target-org",
138
107
  "type": "option",
139
- "description": "logging level for this command invocation",
140
- "helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
108
+ "char": "o",
109
+ "summary": "Username or alias of the target org.",
110
+ "required": true,
141
111
  "multiple": false,
142
- "options": [
143
- "trace",
144
- "debug",
145
- "info",
146
- "warn",
147
- "error",
148
- "fatal",
149
- "TRACE",
150
- "DEBUG",
151
- "INFO",
152
- "WARN",
153
- "ERROR",
154
- "FATAL"
155
- ],
156
- "default": "warn"
112
+ "deprecateAliases": true,
113
+ "aliases": [
114
+ "targetusername",
115
+ "u"
116
+ ]
157
117
  },
158
- "targetusername": {
159
- "name": "targetusername",
118
+ "api-version": {
119
+ "name": "api-version",
160
120
  "type": "option",
161
- "char": "u",
162
- "description": "username or alias for the target org; overrides default target org",
163
- "multiple": false
121
+ "description": "Override the api version used for api requests made by this command",
122
+ "multiple": false,
123
+ "deprecateAliases": true,
124
+ "aliases": [
125
+ "apiversion"
126
+ ]
164
127
  },
165
- "apiversion": {
166
- "name": "apiversion",
128
+ "loglevel": {
129
+ "name": "loglevel",
167
130
  "type": "option",
168
- "description": "override the api version used for api requests made by this command",
169
- "multiple": false
131
+ "hidden": true,
132
+ "multiple": false,
133
+ "deprecated": {
134
+ "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."
135
+ },
136
+ "deprecateAliases": true
170
137
  },
171
- "logid": {
172
- "name": "logid",
138
+ "log-id": {
139
+ "name": "log-id",
173
140
  "type": "option",
174
141
  "char": "i",
175
- "description": "id of the log to display",
176
- "multiple": false
142
+ "summary": "ID of the specific log to display.",
143
+ "multiple": false,
144
+ "deprecateAliases": true,
145
+ "aliases": [
146
+ "logid"
147
+ ]
177
148
  },
178
149
  "number": {
179
150
  "name": "number",
180
151
  "type": "option",
181
152
  "char": "n",
182
- "description": "number of most recent logs to display",
183
- "multiple": false
184
- },
185
- "outputdir": {
186
- "name": "outputdir",
187
- "type": "option",
188
- "char": "d",
189
- "description": "directory for saving the log files",
190
- "multiple": false
191
- }
192
- },
193
- "args": {},
194
- "requiresUsername": true,
195
- "longDescription": "Fetches the specified log or given number of most recent logs from the scratch org. \nTo get the IDs for your debug logs, run \"sfdx force:apex:log:list\". \nUse the --logid parameter to return a specific log. \nUse the --number parameter to return the specified number of recent logs.\nUse the --outputdir parameter to specify the directory to store the logs in.\nExecuting this command without parameters returns the most recent log.",
196
- "flagsConfig": {
197
- "json": {
198
- "kind": "boolean",
199
- "description": "format output as JSON",
200
- "allowNo": false,
201
- "type": "boolean"
202
- },
203
- "loglevel": {
204
- "kind": "enum",
205
- "helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
206
- "description": "logging level for this command invocation",
207
- "longDescription": "The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.",
208
- "default": "warn",
209
- "options": [
210
- "trace",
211
- "debug",
212
- "info",
213
- "warn",
214
- "error",
215
- "fatal",
216
- "TRACE",
217
- "DEBUG",
218
- "INFO",
219
- "WARN",
220
- "ERROR",
221
- "FATAL"
222
- ],
223
- "input": [],
153
+ "summary": "Number of the most recent logs to display.",
224
154
  "multiple": false,
225
- "type": "option"
155
+ "default": 1,
156
+ "deprecateAliases": true
226
157
  },
227
- "apiversion": {
158
+ "output-dir": {
159
+ "name": "output-dir",
228
160
  "type": "option",
229
- "kind": "string",
230
- "description": "override the api version used for api requests made by this command",
231
- "longDescription": "Override the API version used for API requests made by this command.",
232
- "input": [],
233
- "multiple": false
234
- },
235
- "logid": {
236
- "kind": "id",
237
- "char": "i",
238
- "description": "id of the log to display",
239
- "input": [],
240
- "multiple": false,
241
- "type": "option"
242
- },
243
- "number": {
244
- "kind": "number",
245
- "char": "n",
246
- "min": 1,
247
- "max": 25,
248
- "description": "number of most recent logs to display",
249
- "input": [],
250
- "multiple": false,
251
- "type": "option"
252
- },
253
- "outputdir": {
254
- "kind": "string",
255
161
  "char": "d",
256
- "description": "directory for saving the log files",
257
- "longDescription": "The location can be an absolute path or relative to the current working directory. The default is the current directory.",
258
- "input": [],
162
+ "summary": "Directory for saving the log files.",
163
+ "description": "The location can be an absolute path or relative to the current working directory. The default is the current directory.",
259
164
  "multiple": false,
260
- "type": "option"
165
+ "deprecateAliases": true,
166
+ "aliases": [
167
+ "outputdir",
168
+ "output-directory"
169
+ ]
261
170
  }
262
- }
171
+ },
172
+ "args": {},
173
+ "hasDynamicHelp": true
263
174
  },
264
- "force:apex:log:list": {
265
- "id": "force:apex:log:list",
266
- "description": "display a list of IDs and general information about debug logs\nRun this command in a project to list the IDs and general information for all debug logs in your default org.\nTo fetch a specific log from your org, obtain the ID from this command's output, then run the “sfdx force:apex:log:get” command.",
175
+ "apex:get:test": {
176
+ "id": "apex:get:test",
177
+ "summary": "Display test results for a specific asynchronous test run.",
178
+ "description": "Provide a test run ID to display test results for an enqueued or completed asynchronous test run. The test run ID is displayed after running the \"<%= config.bin %> apex test run\" command.",
267
179
  "strict": true,
268
- "usage": "<%= command.id %> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
269
180
  "pluginName": "@salesforce/plugin-apex",
270
181
  "pluginAlias": "@salesforce/plugin-apex",
271
182
  "pluginType": "core",
272
- "aliases": [],
183
+ "aliases": [
184
+ "force:apex:test:report"
185
+ ],
273
186
  "examples": [
274
- "$ sfdx force:apex:log:list",
275
- "$ sfdx force:apex:log:list -u me@my.org"
187
+ "Display test results for your default org using a test run ID:\n<%= config.bin %> <%= command.id %> --test-run-id <test run id>",
188
+ "Similar to previous example, but output the result in JUnit format:\n<%= config.bin %> <%= command.id %> --test-run-id <test run id> --result-format junit",
189
+ "Also retrieve code coverage results and output in JSON format:\n<%= config.bin %> <%= command.id %> --test-run-id <test run id> --code-coverage --json",
190
+ "Specify a directory in which to save the test results from the org with the specified username (rather than your default org):\n<%= config.bin %> <%= command.id %> --test-run-id <test run id> --code-coverage --output-dir <path to outputdir> --target-org me@myorg',"
276
191
  ],
192
+ "deprecateAliases": true,
277
193
  "flags": {
278
194
  "json": {
279
195
  "name": "json",
280
196
  "type": "boolean",
281
- "description": "format output as JSON",
282
- "allowNo": false
197
+ "description": "Format output as json.",
198
+ "helpGroup": "GLOBAL",
199
+ "allowNo": false,
200
+ "deprecateAliases": true
283
201
  },
284
- "loglevel": {
285
- "name": "loglevel",
202
+ "target-org": {
203
+ "name": "target-org",
286
204
  "type": "option",
287
- "description": "logging level for this command invocation",
288
- "helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
205
+ "char": "o",
206
+ "summary": "Username or alias of the target org.",
207
+ "required": true,
289
208
  "multiple": false,
290
- "options": [
291
- "trace",
292
- "debug",
293
- "info",
294
- "warn",
295
- "error",
296
- "fatal",
297
- "TRACE",
298
- "DEBUG",
299
- "INFO",
300
- "WARN",
301
- "ERROR",
302
- "FATAL"
303
- ],
304
- "default": "warn"
305
- },
306
- "targetusername": {
307
- "name": "targetusername",
308
- "type": "option",
309
- "char": "u",
310
- "description": "username or alias for the target org; overrides default target org",
311
- "multiple": false
209
+ "deprecateAliases": true,
210
+ "aliases": [
211
+ "targetusername",
212
+ "u"
213
+ ]
312
214
  },
313
- "apiversion": {
314
- "name": "apiversion",
215
+ "api-version": {
216
+ "name": "api-version",
315
217
  "type": "option",
316
- "description": "override the api version used for api requests made by this command",
317
- "multiple": false
318
- }
319
- },
320
- "args": {},
321
- "requiresUsername": true,
322
- "longDescription": "Run this command in a project to list the IDs and general information for all debug logs in your default org.\nTo fetch a specific log from your org, obtain the ID from this command's output, then run the “sfdx force:apex:log:get” command.",
323
- "flagsConfig": {
324
- "json": {
325
- "kind": "boolean",
326
- "description": "format output as JSON",
327
- "allowNo": false,
328
- "type": "boolean"
329
- },
330
- "loglevel": {
331
- "kind": "enum",
332
- "helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
333
- "description": "logging level for this command invocation",
334
- "longDescription": "The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.",
335
- "default": "warn",
336
- "options": [
337
- "trace",
338
- "debug",
339
- "info",
340
- "warn",
341
- "error",
342
- "fatal",
343
- "TRACE",
344
- "DEBUG",
345
- "INFO",
346
- "WARN",
347
- "ERROR",
348
- "FATAL"
349
- ],
350
- "input": [],
218
+ "description": "Override the api version used for api requests made by this command",
351
219
  "multiple": false,
352
- "type": "option"
353
- },
354
- "apiversion": {
355
- "type": "option",
356
- "kind": "string",
357
- "description": "override the api version used for api requests made by this command",
358
- "longDescription": "Override the API version used for API requests made by this command.",
359
- "input": [],
360
- "multiple": false
361
- }
362
- }
363
- },
364
- "force:apex:log:tail": {
365
- "id": "force:apex:log:tail",
366
- "description": "Follows active log\nActivates debug logging and displays logs in the terminal. You can also pipe the logs to a file.",
367
- "strict": true,
368
- "usage": "<%= command.id %> [-c] [-d <string>] [-s] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
369
- "pluginName": "@salesforce/plugin-apex",
370
- "pluginAlias": "@salesforce/plugin-apex",
371
- "pluginType": "core",
372
- "aliases": [],
373
- "examples": [
374
- "$ sfdx force:apex:log:tail",
375
- "$ sfdx force:apex:log:tail --debuglevel MyDebugLevel",
376
- "$ sfdx force:apex:log:tail -c -s"
377
- ],
378
- "flags": {
379
- "json": {
380
- "name": "json",
381
- "type": "boolean",
382
- "description": "Format output as JSON.",
383
- "allowNo": false
220
+ "deprecateAliases": true,
221
+ "aliases": [
222
+ "apiversion"
223
+ ]
384
224
  },
385
225
  "loglevel": {
386
226
  "name": "loglevel",
387
227
  "type": "option",
388
- "description": "Logging level for this command invocation",
389
- "helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
228
+ "hidden": true,
390
229
  "multiple": false,
391
- "options": [
392
- "trace",
393
- "debug",
394
- "info",
395
- "warn",
396
- "error",
397
- "fatal",
398
- "TRACE",
399
- "DEBUG",
400
- "INFO",
401
- "WARN",
402
- "ERROR",
403
- "FATAL"
404
- ],
405
- "default": "warn"
230
+ "deprecated": {
231
+ "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."
232
+ },
233
+ "deprecateAliases": true
406
234
  },
407
- "targetusername": {
408
- "name": "targetusername",
235
+ "test-run-id": {
236
+ "name": "test-run-id",
409
237
  "type": "option",
410
- "char": "u",
411
- "description": "username or alias for the target org; overrides default target org",
412
- "multiple": false
413
- },
414
- "apiversion": {
415
- "name": "apiversion",
416
- "type": "option",
417
- "description": "override the api version used for api requests made by this command",
418
- "multiple": false
238
+ "char": "i",
239
+ "summary": "ID of the test run.",
240
+ "required": true,
241
+ "multiple": false,
242
+ "deprecateAliases": true,
243
+ "aliases": [
244
+ "testrunid"
245
+ ]
419
246
  },
420
- "color": {
421
- "name": "color",
247
+ "code-coverage": {
248
+ "name": "code-coverage",
422
249
  "type": "boolean",
423
250
  "char": "c",
424
- "description": "Applies default colors to noteworthy log lines.",
425
- "allowNo": false
251
+ "summary": "Retrieve code coverage results.",
252
+ "allowNo": false,
253
+ "deprecateAliases": true,
254
+ "aliases": [
255
+ "codecoverage"
256
+ ]
426
257
  },
427
- "debuglevel": {
428
- "name": "debuglevel",
258
+ "output-dir": {
259
+ "name": "output-dir",
429
260
  "type": "option",
430
261
  "char": "d",
431
- "description": "Debug level to set on the DEVELOPER_LOG trace flag for your user.",
432
- "multiple": false
433
- },
434
- "skiptraceflag": {
435
- "name": "skiptraceflag",
436
- "type": "boolean",
437
- "char": "s",
438
- "description": "Skips trace flag setup. Assumes that a trace flag and debug level are fully set up.",
439
- "allowNo": false
440
- }
441
- },
442
- "args": {},
443
- "requiresUsername": true,
444
- "longDescription": "Activates debug logging and displays logs in the terminal. You can also pipe the logs to a file.",
445
- "flagsConfig": {
446
- "json": {
447
- "kind": "boolean",
448
- "description": "Format output as JSON.",
449
- "allowNo": false,
450
- "type": "boolean"
451
- },
452
- "loglevel": {
453
- "kind": "enum",
454
- "helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
455
- "description": "Logging level for this command invocation",
456
- "longDescription": "The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.",
457
- "default": "warn",
458
- "options": [
459
- "trace",
460
- "debug",
461
- "info",
462
- "warn",
463
- "error",
464
- "fatal",
465
- "TRACE",
466
- "DEBUG",
467
- "INFO",
468
- "WARN",
469
- "ERROR",
470
- "FATAL"
471
- ],
472
- "input": [],
262
+ "summary": "Directory in which to store test result files.",
473
263
  "multiple": false,
474
- "type": "option"
264
+ "deprecateAliases": true,
265
+ "aliases": [
266
+ "outputdir",
267
+ "output-directory"
268
+ ]
475
269
  },
476
- "apiversion": {
270
+ "result-format": {
271
+ "name": "result-format",
477
272
  "type": "option",
478
- "kind": "string",
479
- "description": "override the api version used for api requests made by this command",
480
- "longDescription": "Override the API version used for API requests made by this command.",
481
- "input": [],
482
- "multiple": false
483
- },
484
- "color": {
485
- "kind": "boolean",
486
- "char": "c",
487
- "description": "Applies default colors to noteworthy log lines.",
488
- "allowNo": false,
489
- "type": "boolean"
490
- },
491
- "debuglevel": {
492
- "kind": "string",
493
- "char": "d",
494
- "description": "Debug level to set on the DEVELOPER_LOG trace flag for your user.",
495
- "input": [],
273
+ "char": "r",
274
+ "summary": "Format of the results.",
496
275
  "multiple": false,
497
- "type": "option"
498
- },
499
- "skiptraceflag": {
500
- "kind": "boolean",
501
- "char": "s",
502
- "description": "Skips trace flag setup. Assumes that a trace flag and debug level are fully set up.",
503
- "allowNo": false,
504
- "type": "boolean"
276
+ "options": [
277
+ "human",
278
+ "tap",
279
+ "junit",
280
+ "json"
281
+ ],
282
+ "deprecateAliases": true,
283
+ "aliases": [
284
+ "resultformat"
285
+ ]
505
286
  }
506
- }
287
+ },
288
+ "args": {},
289
+ "hasDynamicHelp": true
507
290
  },
508
- "force:apex:test:report": {
509
- "id": "force:apex:test:report",
510
- "description": "display test results for a specific asynchronous test run\nProvide a test run ID to display test results for an enqueued or completed asynchronous test run. The test run ID is displayed after running the \"sfdx force:apex:test:run\" command.",
291
+ "apex:list:log": {
292
+ "id": "apex:list:log",
293
+ "summary": "Display a list of IDs and general information about debug logs.",
294
+ "description": "Run this command in a project to list the IDs and general information for all debug logs in your default org.\n\nTo fetch a specific log from your org, obtain the ID from this command's output, then run the “<%= config.bin %> apex log get” command.",
511
295
  "strict": true,
512
- "usage": "<%= command.id %> -i <string> [-c] [-d <string>] [-r human|tap|junit|json] [-w <string>] [-u <string>] [--apiversion <string>] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
513
296
  "pluginName": "@salesforce/plugin-apex",
514
297
  "pluginAlias": "@salesforce/plugin-apex",
515
298
  "pluginType": "core",
516
- "aliases": [],
299
+ "aliases": [
300
+ "force:apex:log:list"
301
+ ],
517
302
  "examples": [
518
- "$ sfdx force:apex:test:report -i <test run id>",
519
- "$ sfdx force:apex:test:report -i <test run id> -r junit",
520
- "$ sfdx force:apex:test:report -i <test run id> -c --json",
521
- "$ sfdx force:apex:test:report -i <test run id> -c -d <path to outputdir> -u me@myorg"
303
+ "List the IDs and information about the debug logs in your default org:\n<%= config.bin %> <%= command.id %>",
304
+ "Similar to previous example, but use the org with the specified username:\n<%= config.bin %> <%= command.id %> --target-org me@my.org"
522
305
  ],
306
+ "deprecateAliases": true,
523
307
  "flags": {
524
308
  "json": {
525
309
  "name": "json",
526
310
  "type": "boolean",
527
- "description": "format output as JSON",
528
- "allowNo": false
529
- },
530
- "loglevel": {
531
- "name": "loglevel",
532
- "type": "option",
533
- "description": "[default: warn] logging level for this command invocation; logs are stored in $HOME/.sfdx/sfdx.log",
534
- "helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
535
- "multiple": false,
536
- "options": [
537
- "trace",
538
- "debug",
539
- "info",
540
- "warn",
541
- "error",
542
- "fatal",
543
- "TRACE",
544
- "DEBUG",
545
- "INFO",
546
- "WARN",
547
- "ERROR",
548
- "FATAL"
549
- ],
550
- "default": "warn"
551
- },
552
- "targetusername": {
553
- "name": "targetusername",
554
- "type": "option",
555
- "char": "u",
556
- "description": "username or alias for the target org; overrides default target org",
557
- "multiple": false
558
- },
559
- "apiversion": {
560
- "name": "apiversion",
561
- "type": "option",
562
- "description": "override the api version used for api requests made by this command",
563
- "multiple": false
311
+ "description": "Format output as json.",
312
+ "helpGroup": "GLOBAL",
313
+ "allowNo": false,
314
+ "deprecateAliases": true
564
315
  },
565
- "testrunid": {
566
- "name": "testrunid",
316
+ "target-org": {
317
+ "name": "target-org",
567
318
  "type": "option",
568
- "char": "i",
569
- "description": "the ID of the test run",
319
+ "char": "o",
320
+ "summary": "Username or alias of the target org.",
570
321
  "required": true,
571
- "multiple": false
572
- },
573
- "codecoverage": {
574
- "name": "codecoverage",
575
- "type": "boolean",
576
- "char": "c",
577
- "description": "retrieves code coverage results",
578
- "allowNo": false
579
- },
580
- "outputdir": {
581
- "name": "outputdir",
582
- "type": "option",
583
- "char": "d",
584
- "description": "directory to store test result files",
585
- "multiple": false
586
- },
587
- "resultformat": {
588
- "name": "resultformat",
589
- "type": "option",
590
- "char": "r",
591
- "description": "Permissible values are: human, tap, junit, json",
592
- "helpValue": "(human|tap|junit|json)",
593
322
  "multiple": false,
594
- "options": [
595
- "human",
596
- "tap",
597
- "junit",
598
- "json"
323
+ "deprecateAliases": true,
324
+ "aliases": [
325
+ "targetusername",
326
+ "u"
599
327
  ]
600
328
  },
601
- "wait": {
602
- "name": "wait",
329
+ "api-version": {
330
+ "name": "api-version",
603
331
  "type": "option",
604
- "char": "w",
605
- "description": "sets the streaming client socket timeout in minutes; specify a longer wait time if timeouts occur frequently",
606
- "multiple": false
607
- },
608
- "verbose": {
609
- "name": "verbose",
610
- "type": "boolean",
611
- "description": "display Apex test processing details; if JSON is specified, processing details aren't displayed",
612
- "allowNo": false
613
- }
614
- },
615
- "args": {},
616
- "requiresUsername": true,
617
- "longDescription": "Provide a test run ID to display test results for an enqueued or completed asynchronous test run. The test run ID is displayed after running the \"sfdx force:apex:test:run\" command.",
618
- "flagsConfig": {
619
- "testrunid": {
620
- "kind": "string",
621
- "char": "i",
622
- "description": "the ID of the test run",
623
- "required": true,
624
- "input": [],
332
+ "description": "Override the api version used for api requests made by this command",
625
333
  "multiple": false,
626
- "type": "option"
627
- },
628
- "json": {
629
- "kind": "boolean",
630
- "description": "format output as JSON",
631
- "allowNo": false,
632
- "type": "boolean"
334
+ "deprecateAliases": true,
335
+ "aliases": [
336
+ "apiversion"
337
+ ]
633
338
  },
634
339
  "loglevel": {
635
- "kind": "enum",
636
- "helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
637
- "description": "[default: warn] logging level for this command invocation; logs are stored in $HOME/.sfdx/sfdx.log",
638
- "longDescription": "Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL",
639
- "default": "warn",
640
- "options": [
641
- "trace",
642
- "debug",
643
- "info",
644
- "warn",
645
- "error",
646
- "fatal",
647
- "TRACE",
648
- "DEBUG",
649
- "INFO",
650
- "WARN",
651
- "ERROR",
652
- "FATAL"
653
- ],
654
- "input": [],
655
- "multiple": false,
656
- "type": "option"
657
- },
658
- "apiversion": {
340
+ "name": "loglevel",
659
341
  "type": "option",
660
- "kind": "string",
661
- "description": "override the api version used for api requests made by this command",
662
- "longDescription": "Override the API version used for API requests made by this command.",
663
- "input": [],
664
- "multiple": false
665
- },
666
- "codecoverage": {
667
- "kind": "boolean",
668
- "char": "c",
669
- "description": "retrieves code coverage results",
670
- "allowNo": false,
671
- "type": "boolean"
672
- },
673
- "outputdir": {
674
- "kind": "string",
675
- "char": "d",
676
- "description": "directory to store test result files",
677
- "input": [],
342
+ "hidden": true,
678
343
  "multiple": false,
679
- "type": "option"
680
- },
681
- "resultformat": {
682
- "kind": "enum",
683
- "helpValue": "(human|tap|junit|json)",
684
- "char": "r",
685
- "description": "Permissible values are: human, tap, junit, json",
686
- "options": [
687
- "human",
688
- "tap",
689
- "junit",
690
- "json"
691
- ],
692
- "input": [],
693
- "multiple": false,
694
- "type": "option"
695
- },
696
- "wait": {
697
- "kind": "string",
698
- "char": "w",
699
- "description": "sets the streaming client socket timeout in minutes; specify a longer wait time if timeouts occur frequently",
700
- "input": [],
701
- "multiple": false,
702
- "type": "option"
703
- },
704
- "verbose": {
705
- "description": "display Apex test processing details; if JSON is specified, processing details aren't displayed",
706
- "type": "boolean",
707
- "kind": "boolean",
708
- "longDescription": "Emit additional command output to stdout.",
709
- "allowNo": false
344
+ "deprecated": {
345
+ "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."
346
+ },
347
+ "deprecateAliases": true
710
348
  }
711
- }
349
+ },
350
+ "args": {},
351
+ "hasDynamicHelp": true
712
352
  },
713
- "force:apex:test:run": {
714
- "id": "force:apex:test:run",
715
- "description": "invoke Apex tests\nSpecify which tests to run by using the --classnames, --suites, or --tests parameters. Alternatively, use the --testlevel parameter to run all the tests in your org, local tests, or specified tests.\nTo see code coverage results, use the --codecoverage parameter with --resultformat. The output displays a high-level summary of the test run and the code coverage values for classes in your org. If you specify human-readable result format, use the --detailedcoverage parameter to see detailed coverage results for each test method run.\n\nNOTE: The testRunCoverage value (JSON and JUnit result formats) is a percentage of the covered lines and total lines from all the Apex classes evaluated by the tests in this run.",
353
+ "apex:run:test": {
354
+ "id": "apex:run:test",
355
+ "summary": "Invoke Apex tests in an org.",
356
+ "description": "Specify which tests to run by using the --class-names, --suite-names, or --tests flags. Alternatively, use the --test-level flag to run all the tests in your org, local tests, or specified tests.\nTo see code coverage results, use the --code-coverage flag with --result-format. The output displays a high-level summary of the test run and the code coverage values for classes in your org. If you specify human-readable result format, use the --detailed-coverage flag to see detailed coverage results for each test method run.\n\nNOTE: The testRunCoverage value (JSON and JUnit result formats) is a percentage of the covered lines and total lines from all the Apex classes evaluated by the tests in this run.",
716
357
  "strict": true,
717
- "usage": "<%= command.id %> [-d <string>] [-l RunLocalTests|RunAllTestsInOrg|RunSpecifiedTests] [-n <string>] [-r human|tap|junit|json] [-s <string>] [-t <string>] [-w <string>] [-y] [-v -c] [-u <string>] [--apiversion <string>] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
718
358
  "pluginName": "@salesforce/plugin-apex",
719
359
  "pluginAlias": "@salesforce/plugin-apex",
720
360
  "pluginType": "core",
721
- "aliases": [],
361
+ "aliases": [
362
+ "force:apex:test:run"
363
+ ],
722
364
  "examples": [
723
- "$ sfdx force:apex:test:run",
724
- "$ sfdx force:apex:test:run -n \"MyClassTest,MyOtherClassTest\" -r human",
725
- "$ sfdx force:apex:test:run -s \"MySuite,MyOtherSuite\" -c -v --json",
726
- "$ sfdx force:apex:test:run -t \"MyClassTest.testCoolFeature,MyClassTest.testAwesomeFeature,AnotherClassTest,namespace.TheirClassTest.testThis\" -r human",
727
- "$ sfdx force:apex:test:run -l RunLocalTests -d <path to outputdir> -u me@my.org"
365
+ "Run all Apex tests and suites in your default org:\n<%= config.bin %> <%= command.id %>",
366
+ "Run the specified Apex test classes in your default org and display results in human-readable form:\n<%= config.bin %> <%= command.id %> --class-names \"MyClassTest,MyOtherClassTest\" --result-format human",
367
+ "Run the specified Apex test suites in your default org and include code coverage results and additional details:\n<%= config.bin %> <%= command.id %> --suite-names \"MySuite,MyOtherSuite\" --code-coverage --detailed-coverage",
368
+ "Run the specified Apex tests in your default org and display results in human-readable output:\n<%= config.bin %> <%= command.id %> --tests \"MyClassTest.testCoolFeature,MyClassTest.testAwesomeFeature,AnotherClassTest,namespace.TheirClassTest.testThis\" --result-format human",
369
+ "Run all tests in the org with the specified username with the specified test level; save the output to the specified directory:\n<%= config.bin %> <%= command.id %> --test-level RunLocalTests --output-dir <path to outputdir> --target-org me@my.org"
728
370
  ],
371
+ "deprecateAliases": true,
729
372
  "flags": {
730
373
  "json": {
731
374
  "name": "json",
732
375
  "type": "boolean",
733
- "description": "format output as JSON",
734
- "allowNo": false
376
+ "description": "Format output as json.",
377
+ "helpGroup": "GLOBAL",
378
+ "allowNo": false,
379
+ "deprecateAliases": true
735
380
  },
736
- "loglevel": {
737
- "name": "loglevel",
381
+ "target-org": {
382
+ "name": "target-org",
738
383
  "type": "option",
739
- "description": "[default: warn] logging level for this command invocation; logs are stored in $HOME/.sfdx/sfdx.log",
740
- "helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
384
+ "char": "o",
385
+ "summary": "Username or alias of the target org.",
386
+ "required": true,
741
387
  "multiple": false,
742
- "options": [
743
- "trace",
744
- "debug",
745
- "info",
746
- "warn",
747
- "error",
748
- "fatal",
749
- "TRACE",
750
- "DEBUG",
751
- "INFO",
752
- "WARN",
753
- "ERROR",
754
- "FATAL"
755
- ],
756
- "default": "warn"
388
+ "deprecateAliases": true,
389
+ "aliases": [
390
+ "targetusername",
391
+ "u"
392
+ ]
757
393
  },
758
- "targetusername": {
759
- "name": "targetusername",
394
+ "api-version": {
395
+ "name": "api-version",
760
396
  "type": "option",
761
- "char": "u",
762
- "description": "username or alias for the target org; overrides default target org",
763
- "multiple": false
397
+ "description": "Override the api version used for api requests made by this command",
398
+ "multiple": false,
399
+ "deprecateAliases": true,
400
+ "aliases": [
401
+ "apiversion"
402
+ ]
764
403
  },
765
- "apiversion": {
766
- "name": "apiversion",
404
+ "loglevel": {
405
+ "name": "loglevel",
767
406
  "type": "option",
768
- "description": "override the api version used for api requests made by this command",
769
- "multiple": false
407
+ "hidden": true,
408
+ "multiple": false,
409
+ "deprecated": {
410
+ "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."
411
+ },
412
+ "deprecateAliases": true
770
413
  },
771
- "codecoverage": {
772
- "name": "codecoverage",
414
+ "code-coverage": {
415
+ "name": "code-coverage",
773
416
  "type": "boolean",
774
417
  "char": "c",
775
- "description": "retrieves code coverage results",
776
- "allowNo": false
418
+ "summary": "Retrieve code coverage results.",
419
+ "allowNo": false,
420
+ "deprecateAliases": true,
421
+ "aliases": [
422
+ "codecoverage"
423
+ ]
777
424
  },
778
- "outputdir": {
779
- "name": "outputdir",
425
+ "output-dir": {
426
+ "name": "output-dir",
780
427
  "type": "option",
781
428
  "char": "d",
782
- "description": "directory to store test run files",
783
- "multiple": false
429
+ "summary": "Directory in which to store test run files.",
430
+ "multiple": false,
431
+ "deprecateAliases": true,
432
+ "aliases": [
433
+ "outputdir",
434
+ "output-directory"
435
+ ]
784
436
  },
785
- "testlevel": {
786
- "name": "testlevel",
437
+ "test-level": {
438
+ "name": "test-level",
787
439
  "type": "option",
788
440
  "char": "l",
789
- "description": "specifies which tests to run, using one of these TestLevel enum values:\nRunSpecifiedTests—Only the tests that you specify are run.\nRunLocalTests—All tests in your org are run, except the ones that originate from installed managed packages.\nRunAllTestsInOrg—All tests are in your org and in installed managed packages are run",
790
- "helpValue": "(RunLocalTests|RunAllTestsInOrg|RunSpecifiedTests)",
441
+ "summary": "Level of tests to run; default is RunLocalTests.",
442
+ "description": "Here's what the levels mean:\n\n- RunSpecifiedTests — Only the tests that you specify are run.\n- RunLocalTests — All tests in your org are run, except the ones that originate from installed managed packages.\n- RunAllTestsInOrg — All tests are in your org and in installed managed packages are run",
791
443
  "multiple": false,
792
444
  "options": [
793
445
  "RunLocalTests",
794
446
  "RunAllTestsInOrg",
795
447
  "RunSpecifiedTests"
448
+ ],
449
+ "deprecateAliases": true,
450
+ "aliases": [
451
+ "testlevel"
796
452
  ]
797
453
  },
798
- "classnames": {
799
- "name": "classnames",
454
+ "class-names": {
455
+ "name": "class-names",
800
456
  "type": "option",
801
457
  "char": "n",
802
- "description": "comma-separated list of Apex test class names to run; if you select --classnames, you can't specify --suitenames or --tests",
803
- "multiple": false
458
+ "summary": "Comma-separated list of Apex test class names to run; default is all classes.",
459
+ "description": "If you select --class-names, you can't specify --suite-names or --tests.",
460
+ "multiple": false,
461
+ "deprecateAliases": true,
462
+ "aliases": [
463
+ "classnames"
464
+ ]
804
465
  },
805
- "resultformat": {
806
- "name": "resultformat",
466
+ "result-format": {
467
+ "name": "result-format",
807
468
  "type": "option",
808
469
  "char": "r",
809
- "description": "Permissible values are: human, tap, junit, json",
810
- "helpValue": "(human|tap|junit|json)",
470
+ "summary": "Format of the test results.",
811
471
  "multiple": false,
812
472
  "options": [
813
473
  "human",
814
474
  "tap",
815
475
  "junit",
816
476
  "json"
477
+ ],
478
+ "deprecateAliases": true,
479
+ "aliases": [
480
+ "resultformat"
817
481
  ]
818
482
  },
819
- "suitenames": {
820
- "name": "suitenames",
483
+ "suite-names": {
484
+ "name": "suite-names",
821
485
  "type": "option",
822
486
  "char": "s",
823
- "description": "comma-separated list of Apex test suite names to run; if you select --suitenames, you can't specify --classnames or --tests",
824
- "multiple": false
487
+ "summary": "Comma-separated list of Apex test suite names to run; default is all suites.",
488
+ "description": "If you select --suite-names, you can't specify --class-names or --tests.",
489
+ "multiple": false,
490
+ "deprecateAliases": true,
491
+ "aliases": [
492
+ "suitenames"
493
+ ]
825
494
  },
826
495
  "tests": {
827
496
  "name": "tests",
828
497
  "type": "option",
829
498
  "char": "t",
830
- "description": "comma-separated list of Apex test class names or IDs and, if applicable, test methods to run; if you specify --tests, you can't specify --classnames or --suitenames",
831
- "multiple": false
499
+ "summary": "Comma-separated list of Apex test class names or IDs and, if applicable, test methods to run; default is all tests.",
500
+ "description": "If you specify --tests, you can't specify --class-names or --suite-names",
501
+ "multiple": false,
502
+ "deprecateAliases": true
832
503
  },
833
504
  "wait": {
834
505
  "name": "wait",
835
506
  "type": "option",
836
507
  "char": "w",
837
- "description": "sets the streaming client socket timeout in minutes; specify a longer wait time if timeouts occur frequently",
838
- "multiple": false
508
+ "summary": "Sets the streaming client socket timeout in minutes; specify a longer wait time if timeouts occur frequently.",
509
+ "multiple": false,
510
+ "deprecateAliases": true
839
511
  },
840
512
  "synchronous": {
841
513
  "name": "synchronous",
842
514
  "type": "boolean",
843
515
  "char": "y",
844
- "description": "runs test methods from a single Apex class synchronously; if not specified, tests are run ansynchronously",
845
- "allowNo": false
846
- },
847
- "verbose": {
848
- "name": "verbose",
849
- "type": "boolean",
850
- "description": "display Apex test processing details; if JSON is specified, processing details aren't displayed",
851
- "allowNo": false
516
+ "summary": "Runs test methods from a single Apex class synchronously; if not specified, tests are run asynchronously.",
517
+ "allowNo": false,
518
+ "deprecateAliases": true
852
519
  },
853
- "detailedcoverage": {
854
- "name": "detailedcoverage",
520
+ "detailed-coverage": {
521
+ "name": "detailed-coverage",
855
522
  "type": "boolean",
856
523
  "char": "v",
857
- "description": "display detailed code coverage per test",
524
+ "summary": "Display detailed code coverage per test.",
858
525
  "allowNo": false,
859
526
  "dependsOn": [
860
- "codecoverage"
527
+ "code-coverage"
528
+ ],
529
+ "deprecateAliases": true,
530
+ "aliases": [
531
+ "detailedcoverage"
861
532
  ]
862
533
  }
863
534
  },
864
535
  "args": {},
865
- "requiresUsername": true,
866
- "longDescription": "Specify which tests to run by using the --classnames, --suites, or --tests parameters. Alternatively, use the --testlevel parameter to run all the tests in your org, local tests, or specified tests.\nTo see code coverage results, use the --codecoverage parameter with --resultformat. The output displays a high-level summary of the test run and the code coverage values for classes in your org. If you specify human-readable result format, use the --detailedcoverage parameter to see detailed coverage results for each test method run.\n\nNOTE: The testRunCoverage value (JSON and JUnit result formats) is a percentage of the covered lines and total lines from all the Apex classes evaluated by the tests in this run.",
867
- "flagsConfig": {
536
+ "hasDynamicHelp": true
537
+ },
538
+ "apex:tail:log": {
539
+ "id": "apex:tail:log",
540
+ "summary": "Activate debug logging and display logs in the terminal.",
541
+ "description": "You can also pipe the logs to a file.",
542
+ "strict": true,
543
+ "pluginName": "@salesforce/plugin-apex",
544
+ "pluginAlias": "@salesforce/plugin-apex",
545
+ "pluginType": "core",
546
+ "aliases": [
547
+ "force:apex:log:tail"
548
+ ],
549
+ "examples": [
550
+ "Activate debug logging:\n<%= config.bin %> <%= command.id %>",
551
+ "Specify a debug level:\n<%= config.bin %> <%= command.id %> --debug-level MyDebugLevel",
552
+ "Skip the trace flag setup and apply default colors:\n<%= config.bin %> <%= command.id %> --color --skip-trace-flag"
553
+ ],
554
+ "deprecateAliases": true,
555
+ "flags": {
868
556
  "json": {
869
- "kind": "boolean",
870
- "description": "format output as JSON",
557
+ "name": "json",
558
+ "type": "boolean",
559
+ "description": "Format output as json.",
560
+ "helpGroup": "GLOBAL",
871
561
  "allowNo": false,
872
- "type": "boolean"
562
+ "deprecateAliases": true
873
563
  },
874
- "loglevel": {
875
- "kind": "enum",
876
- "helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
877
- "description": "[default: warn] logging level for this command invocation; logs are stored in $HOME/.sfdx/sfdx.log",
878
- "longDescription": "Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL",
879
- "default": "warn",
880
- "options": [
881
- "trace",
882
- "debug",
883
- "info",
884
- "warn",
885
- "error",
886
- "fatal",
887
- "TRACE",
888
- "DEBUG",
889
- "INFO",
890
- "WARN",
891
- "ERROR",
892
- "FATAL"
893
- ],
894
- "input": [],
564
+ "target-org": {
565
+ "name": "target-org",
566
+ "type": "option",
567
+ "char": "o",
568
+ "summary": "Username or alias of the target org.",
569
+ "required": true,
570
+ "multiple": false,
571
+ "deprecateAliases": true,
572
+ "aliases": [
573
+ "targetusername",
574
+ "u"
575
+ ]
576
+ },
577
+ "api-version": {
578
+ "name": "api-version",
579
+ "type": "option",
580
+ "description": "Override the api version used for api requests made by this command",
895
581
  "multiple": false,
896
- "type": "option"
582
+ "deprecateAliases": true,
583
+ "aliases": [
584
+ "apiversion"
585
+ ]
897
586
  },
898
- "apiversion": {
587
+ "loglevel": {
588
+ "name": "loglevel",
899
589
  "type": "option",
900
- "kind": "string",
901
- "description": "override the api version used for api requests made by this command",
902
- "longDescription": "Override the API version used for API requests made by this command.",
903
- "input": [],
904
- "multiple": false
590
+ "hidden": true,
591
+ "multiple": false,
592
+ "deprecated": {
593
+ "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."
594
+ },
595
+ "deprecateAliases": true
905
596
  },
906
- "codecoverage": {
907
- "kind": "boolean",
597
+ "color": {
598
+ "name": "color",
599
+ "type": "boolean",
908
600
  "char": "c",
909
- "description": "retrieves code coverage results",
601
+ "summary": "Apply default colors to noteworthy log lines.",
910
602
  "allowNo": false,
911
- "type": "boolean"
603
+ "deprecateAliases": true
912
604
  },
913
- "outputdir": {
914
- "kind": "string",
605
+ "debug-level": {
606
+ "name": "debug-level",
607
+ "type": "option",
915
608
  "char": "d",
916
- "description": "directory to store test run files",
917
- "input": [],
918
- "multiple": false,
919
- "type": "option"
920
- },
921
- "testlevel": {
922
- "kind": "enum",
923
- "helpValue": "(RunLocalTests|RunAllTestsInOrg|RunSpecifiedTests)",
924
- "char": "l",
925
- "description": "specifies which tests to run, using one of these TestLevel enum values:\nRunSpecifiedTests—Only the tests that you specify are run.\nRunLocalTests—All tests in your org are run, except the ones that originate from installed managed packages.\nRunAllTestsInOrg—All tests are in your org and in installed managed packages are run",
926
- "options": [
927
- "RunLocalTests",
928
- "RunAllTestsInOrg",
929
- "RunSpecifiedTests"
930
- ],
931
- "input": [],
932
- "multiple": false,
933
- "type": "option"
934
- },
935
- "classnames": {
936
- "kind": "string",
937
- "char": "n",
938
- "description": "comma-separated list of Apex test class names to run; if you select --classnames, you can't specify --suitenames or --tests",
939
- "input": [],
609
+ "summary": "Debug level to set on the DEVELOPER_LOG trace flag for your user.",
940
610
  "multiple": false,
941
- "type": "option"
942
- },
943
- "resultformat": {
944
- "kind": "enum",
945
- "helpValue": "(human|tap|junit|json)",
946
- "char": "r",
947
- "description": "Permissible values are: human, tap, junit, json",
948
- "options": [
949
- "human",
950
- "tap",
951
- "junit",
952
- "json"
611
+ "exclusive": [
612
+ "skip-trace-flag"
953
613
  ],
954
- "input": [],
955
- "multiple": false,
956
- "type": "option"
957
- },
958
- "suitenames": {
959
- "kind": "string",
960
- "char": "s",
961
- "description": "comma-separated list of Apex test suite names to run; if you select --suitenames, you can't specify --classnames or --tests",
962
- "input": [],
963
- "multiple": false,
964
- "type": "option"
965
- },
966
- "tests": {
967
- "kind": "string",
968
- "char": "t",
969
- "description": "comma-separated list of Apex test class names or IDs and, if applicable, test methods to run; if you specify --tests, you can't specify --classnames or --suitenames",
970
- "input": [],
971
- "multiple": false,
972
- "type": "option"
973
- },
974
- "wait": {
975
- "kind": "string",
976
- "char": "w",
977
- "description": "sets the streaming client socket timeout in minutes; specify a longer wait time if timeouts occur frequently",
978
- "input": [],
979
- "multiple": false,
980
- "type": "option"
981
- },
982
- "synchronous": {
983
- "kind": "boolean",
984
- "char": "y",
985
- "description": "runs test methods from a single Apex class synchronously; if not specified, tests are run ansynchronously",
986
- "allowNo": false,
987
- "type": "boolean"
614
+ "deprecateAliases": true,
615
+ "aliases": [
616
+ "debuglevel"
617
+ ]
988
618
  },
989
- "verbose": {
990
- "description": "display Apex test processing details; if JSON is specified, processing details aren't displayed",
619
+ "skip-trace-flag": {
620
+ "name": "skip-trace-flag",
991
621
  "type": "boolean",
992
- "kind": "boolean",
993
- "longDescription": "Emit additional command output to stdout.",
994
- "allowNo": false
995
- },
996
- "detailedcoverage": {
997
- "kind": "boolean",
998
- "char": "v",
999
- "description": "display detailed code coverage per test",
1000
- "dependsOn": [
1001
- "codecoverage"
1002
- ],
622
+ "char": "s",
623
+ "summary": "Skip trace flag setup. Assumes that a trace flag and debug level are fully set up.",
1003
624
  "allowNo": false,
1004
- "type": "boolean"
625
+ "deprecateAliases": true,
626
+ "aliases": [
627
+ "skiptraceflag"
628
+ ]
1005
629
  }
1006
- }
630
+ },
631
+ "args": {},
632
+ "hasDynamicHelp": true
1007
633
  }
1008
634
  }
1009
635
  }