@salesforce/plugin-apex 1.3.0 → 1.4.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.
@@ -2,16 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.JsonReporter = void 0;
4
4
  const skippedProperties = ['skipRate', 'coveredLines', 'totalLines'];
5
- const timeProperties = [
6
- 'testExecutionTimeInMs',
7
- 'testTotalTimeInMs',
8
- 'commandTimeInMs'
9
- ];
5
+ const timeProperties = ['testExecutionTimeInMs', 'testTotalTimeInMs', 'commandTimeInMs'];
10
6
  class JsonReporter {
11
7
  format(result) {
12
8
  return Object.assign({ summary: this.formatSummary(result), tests: this.formatTestResults(result.tests) }, (result.codecoverage
13
9
  ? {
14
- coverage: this.formatCoverage(result)
10
+ coverage: this.formatCoverage(result),
15
11
  }
16
12
  : {}));
17
13
  }
@@ -30,24 +26,22 @@ class JsonReporter {
30
26
  return summary;
31
27
  }
32
28
  formatTestResults(testResults) {
33
- return testResults.map(test => {
34
- return {
35
- Id: test.id,
36
- QueueItemId: test.queueItemId,
37
- StackTrace: test.stackTrace,
38
- Message: test.message,
39
- AsyncApexJobId: test.asyncApexJobId,
40
- MethodName: test.methodName,
41
- Outcome: test.outcome,
42
- ApexClass: {
43
- Id: test.apexClass.id,
44
- Name: test.apexClass.name,
45
- NamespacePrefix: test.apexClass.namespacePrefix
46
- },
47
- RunTime: test.runTime,
48
- FullName: test.fullName
49
- };
50
- });
29
+ return testResults.map((test) => ({
30
+ Id: test.id,
31
+ QueueItemId: test.queueItemId,
32
+ StackTrace: test.stackTrace,
33
+ Message: test.message,
34
+ AsyncApexJobId: test.asyncApexJobId,
35
+ MethodName: test.methodName,
36
+ Outcome: test.outcome,
37
+ ApexClass: {
38
+ Id: test.apexClass.id,
39
+ Name: test.apexClass.name,
40
+ NamespacePrefix: test.apexClass.namespacePrefix,
41
+ },
42
+ RunTime: test.runTime,
43
+ FullName: test.fullName,
44
+ }));
51
45
  }
52
46
  formatCoverage(testResult) {
53
47
  const formattedCov = {
@@ -57,31 +51,29 @@ class JsonReporter {
57
51
  totalLines: testResult.summary.totalLines,
58
52
  coveredLines: testResult.summary.coveredLines,
59
53
  orgWideCoverage: testResult.summary.orgWideCoverage,
60
- testRunCoverage: testResult.summary.testRunCoverage
61
- }
54
+ testRunCoverage: testResult.summary.testRunCoverage,
55
+ },
62
56
  };
63
57
  if (testResult.codecoverage) {
64
- formattedCov.coverage = testResult.codecoverage.map(cov => {
58
+ formattedCov.coverage = testResult.codecoverage.map((cov) => {
65
59
  const lines = {};
66
- cov.coveredLines.forEach(covLine => (lines[covLine] = 1));
67
- cov.uncoveredLines.forEach(uncovLine => (lines[uncovLine] = 0));
60
+ cov.coveredLines.forEach((covLine) => (lines[covLine] = 1));
61
+ cov.uncoveredLines.forEach((uncovLine) => (lines[uncovLine] = 0));
68
62
  return {
69
63
  id: cov.apexId,
70
64
  name: cov.name,
71
65
  totalLines: cov.numLinesCovered + cov.numLinesUncovered,
72
66
  lines,
73
67
  totalCovered: cov.numLinesCovered,
74
- coveredPercent: parseInt(cov.percentage)
68
+ coveredPercent: parseInt(cov.percentage),
75
69
  };
76
70
  });
77
- testResult.tests.forEach(test => {
71
+ testResult.tests.forEach((test) => {
78
72
  if (test.perClassCoverage) {
79
- test.perClassCoverage.forEach(perClassCov => {
80
- formattedCov.records.push(Object.assign(Object.assign({ ApexTestClass: { Id: test.id, Name: test.apexClass.name } }, (perClassCov.coverage
81
- ? { Coverage: perClassCov.coverage }
82
- : {})), { TestMethodName: test.methodName, NumLinesCovered: perClassCov.numLinesCovered, ApexClassOrTrigger: {
73
+ test.perClassCoverage.forEach((perClassCov) => {
74
+ formattedCov.records.push(Object.assign(Object.assign({ ApexTestClass: { Id: test.id, Name: test.apexClass.name } }, (perClassCov.coverage ? { Coverage: perClassCov.coverage } : {})), { TestMethodName: test.methodName, NumLinesCovered: perClassCov.numLinesCovered, ApexClassOrTrigger: {
83
75
  Id: perClassCov.apexClassOrTriggerId,
84
- Name: perClassCov.apexClassOrTriggerName
76
+ Name: perClassCov.apexClassOrTriggerName,
85
77
  }, NumLinesUncovered: perClassCov.numLinesUncovered }));
86
78
  });
87
79
  }
@@ -1 +1 @@
1
- {"version":3,"file":"jsonReporter.js","sourceRoot":"","sources":["../../src/reporters/jsonReporter.ts"],"names":[],"mappings":";;;AAkEA,MAAM,iBAAiB,GAAG,CAAC,UAAU,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;AACrE,MAAM,cAAc,GAAG;IACrB,uBAAuB;IACvB,mBAAmB;IACnB,iBAAiB;CAClB,CAAC;AAEF,MAAa,YAAY;IAChB,MAAM,CACX,MAAkB;QAMlB,uBACE,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EACnC,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,IACxC,CAAC,MAAM,CAAC,YAAY;YACrB,CAAC,CAAC;gBACE,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC;aACtC;YACH,CAAC,CAAC,EAAE,CAAC,EACP;IACJ,CAAC;IAEO,aAAa,CAAC,UAAsB;QAC1C,MAAM,OAAO,GAAG,EAAE,CAAC;QAEnB,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC1D,IAAI,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBACnC,OAAO;aACR;YAED,IAAI,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAChC,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;gBAC9B,KAAK,GAAG,GAAG,KAAK,KAAK,CAAC;aACvB;YAED,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,CAAC,E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AC,CAAC,CAAC;iBACJ;YACH,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,YAAY,CAAC;IACtB,CAAC;CACF;AAxGD,oCAwGC"}
@@ -2,6 +2,7 @@ import { TestResult, TestRunIdResult, OutputDirConfig, ResultFormat } from '@sal
2
2
  import { CliJsonFormat } from './jsonReporter';
3
3
  /**
4
4
  * Builds output directory configuration with CLI format result files
5
+ *
5
6
  * @param result Test results from async/sync test run
6
7
  * @param jsonOutput JSON CLI format of test results
7
8
  * @param outputDir Output directory for result files
@@ -10,6 +10,7 @@ exports.buildOutputDirConfig = void 0;
10
10
  const apex_node_1 = require("@salesforce/apex-node");
11
11
  /**
12
12
  * Builds output directory configuration with CLI format result files
13
+ *
13
14
  * @param result Test results from async/sync test run
14
15
  * @param jsonOutput JSON CLI format of test results
15
16
  * @param outputDir Output directory for result files
@@ -21,7 +22,7 @@ const apex_node_1 = require("@salesforce/apex-node");
21
22
  function buildOutputDirConfig(result, jsonOutput, outputDir, resultFormat, detailedCoverage, synchronous = false) {
22
23
  var _a, _b, _c, _d, _e;
23
24
  const outputDirConfig = {
24
- dirPath: outputDir
25
+ dirPath: outputDir,
25
26
  };
26
27
  if (result.hasOwnProperty('summary')) {
27
28
  result = result;
@@ -29,19 +30,17 @@ function buildOutputDirConfig(result, jsonOutput, outputDir, resultFormat, detai
29
30
  if (typeof resultFormat !== 'undefined' || synchronous) {
30
31
  outputDirConfig.fileInfos = [
31
32
  {
32
- filename: result.summary.testRunId
33
- ? `test-result-${result.summary.testRunId}.json`
34
- : `test-result.json`,
35
- content: jsonOutput
33
+ filename: result.summary.testRunId ? `test-result-${result.summary.testRunId}.json` : 'test-result.json',
34
+ content: jsonOutput,
36
35
  },
37
36
  ...(jsonOutput.coverage
38
37
  ? [
39
38
  {
40
- filename: `test-result-codecoverage.json`,
41
- content: (_a = jsonOutput.coverage) === null || _a === void 0 ? void 0 : _a.coverage
42
- }
39
+ filename: 'test-result-codecoverage.json',
40
+ content: (_a = jsonOutput.coverage) === null || _a === void 0 ? void 0 : _a.coverage,
41
+ },
43
42
  ]
44
- : [])
43
+ : []),
45
44
  ];
46
45
  outputDirConfig.resultFormats = [apex_node_1.ResultFormat.junit];
47
46
  }
@@ -52,23 +51,23 @@ function buildOutputDirConfig(result, jsonOutput, outputDir, resultFormat, detai
52
51
  case 'tap':
53
52
  const tapResult = new apex_node_1.TapReporter().format(result);
54
53
  (_b = outputDirConfig.fileInfos) === null || _b === void 0 ? void 0 : _b.push({
55
- filename: `test-result.txt`,
56
- content: tapResult
54
+ filename: 'test-result.txt',
55
+ content: tapResult,
57
56
  });
58
57
  (_c = outputDirConfig.resultFormats) === null || _c === void 0 ? void 0 : _c.push(apex_node_1.ResultFormat.tap);
59
58
  break;
60
59
  case 'junit':
61
60
  const junitResult = new apex_node_1.JUnitReporter().format(result);
62
61
  (_d = outputDirConfig.fileInfos) === null || _d === void 0 ? void 0 : _d.push({
63
- filename: `test-result.xml`,
64
- content: junitResult
62
+ filename: 'test-result.xml',
63
+ content: junitResult,
65
64
  });
66
65
  break;
67
66
  case 'human':
68
67
  const humanResult = new apex_node_1.HumanReporter().format(result, detailedCoverage);
69
68
  (_e = outputDirConfig.fileInfos) === null || _e === void 0 ? void 0 : _e.push({
70
- filename: `test-result.txt`,
71
- content: humanResult
69
+ filename: 'test-result.txt',
70
+ content: humanResult,
72
71
  });
73
72
  break;
74
73
  }
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/reporters/util.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,qDAQ+B;AAG/B;;;;;;;;;GASG;AACH,SAAgB,oBAAoB,CAClC,MAAoC,EACpC,UAA2C,EAC3C,SAAiB,EACjB,YAAsC,EACtC,gBAAyB,EACzB,WAAW,GAAG,KAAK;;IAEnB,MAAM,eAAe,GAAoB;QACvC,OAAO,EAAE,SAAS;KACnB,CAAC;IAEF,IAAI,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE;Q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;aACR,CAAC;YACF,eAAe,CAAC,aAAa,GAAG,CAAC,wBAAY,CAAC,KAAK,CAAC,CAAC;SACtD;QAED,IAAI,OAAO,YAAY,KAAK,WAAW,IAAI,WAAW,EAAE;YACtD,YAAY,GAAG,wBAAY,CAAC,KAAK,CAAC;SACnC;QAED,QAAQ,YAAY,EAAE;YACpB,KAAK,KAAK;gBACR,MAAM,SAAS,GAAG,IAAI,uBAAW,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBACnD,MAAA,eAAe,CAAC,SAAS,0CAAE,IAAI,CAAC;oBAC9B,QAAQ,EAAE,iBAAiB;oBAC3B,OAAO,EAAE,SAAS;iBACnB,CAAC,CAAC;gBACH,MAAA,eAAe,CAAC,aAAa,0CAAE,IAAI,CAAC,wBAAY,CAAC,GAAG,CAAC,CAAC;gBACtD,MAAM;YACR,KAAK,OAAO;gBACV,MAAM,WAAW,GAAG,IAAI,yBAAa,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBACvD,MAAA,eAAe,CAAC,SAAS,0CAAE,IAAI,CAAC;oBAC9B,QAAQ,EAAE,iBAAiB;oBAC3B,OAAO,EAAE,WAAW;iBACrB,CAAC,CAAC;gBACH,MAAM;YACR,KAAK,OAAO;gBACV,MAAM,WAAW,GAAG,IAAI,yBAAa,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;gBACzE,MAAA,eAAe,CAAC,SAAS,0CAAE,IAAI,CAAC;oBAC9B,QAAQ,EAAE,iBAAiB;oBAC3B,OAAO,EAAE,WAAW;iBACrB,CAAC,CAAC;gBACH,MAAM;SACT;KACF;IAED,OAAO,eAAe,CAAC;AACzB,CAAC;AAjED,oDAiEC"}
package/lib/utils.js CHANGED
@@ -24,7 +24,7 @@ exports.logLevels = [
24
24
  'INFO',
25
25
  'WARN',
26
26
  'ERROR',
27
- 'FATAL'
27
+ 'FATAL',
28
28
  ];
29
29
  function buildDescription(shortDescription, longDescription) {
30
30
  return `${shortDescription}\n${longDescription}`;
@@ -38,16 +38,14 @@ const colorMap = new Map([
38
38
  [new RegExp(/\b(ERROR|FAILURE|FAIL)\b/g), chalk.bold.red],
39
39
  [new RegExp(/\b([a-zA-Z.]*Exception)\b/g), chalk.bold.red],
40
40
  [new RegExp(/"[^"]*"/g), chalk.bold.red],
41
- [new RegExp(/\b([0-9]+|true|false|null)\b/g), chalk.blueBright]
41
+ [new RegExp(/\b([0-9]+|true|false|null)\b/g), chalk.blueBright],
42
42
  ]);
43
43
  function replace(regex, word) {
44
44
  const color = colorMap.get(regex);
45
45
  if (!color) {
46
46
  throw new Error('Error retrieving colors');
47
47
  }
48
- const result = word.replace(regex, match => {
49
- return `${color(match)}`;
50
- });
48
+ const result = word.replace(regex, (match) => `${color(match)}`);
51
49
  return result;
52
50
  }
53
51
  function colorLogs(log) {
package/lib/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,+BAA+B;AAElB,QAAA,iBAAiB,GAAG,GAAG,CAAC;AAExB,QAAA,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AAChC,QAAA,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;AAE5B,QAAA,YAAY,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AACjD,QAAA,SAAS,GAAG;IACvB,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;CACR,CAAC;AAEF,SAAgB,gBAAgB,CAC9B,gBAAwB,EACxB,eAAuB;IAEvB,OAAO,GAAG,gBAAgB,KAAK,eAAe,EAAE,CAAC;AACnD,CAAC;AALD,4CAKC;AAED,MAAM,QAAQ,GAAG,IAAI,GAA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G,CAAC;IAC1D,CAAC,IAAI,MAAM,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;IACxC,CAAC,IAAI,MAAM,CAAC,+BAA+B,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC;CAChE,CAAC,CAAC;AAEH,SAAS,OAAO,CAAC,KAAa,EAAE,IAAY;IAC1C,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAClC,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC5C;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACjE,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAgB,SAAS,CAAC,GAAW;IACnC,KAAK,MAAM,CAAC,IAAI,QAAQ,CAAC,IAAI,EAAE,EAAE;QAC/B,GAAG,GAAG,OAAO,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;KACvB;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AALD,8BAKC"}
@@ -0,0 +1,22 @@
1
+ {
2
+ "HelpDefaults": "If not supplied, the apiversion, template, and outputdir use default values.\n",
3
+ "HelpOutputDirRelative": "The outputdir can be an absolute path or relative to the current working directory.\n",
4
+ "HelpOutputDirRelativeLightning": "If you don’t specify an outputdir, we create a subfolder in your current working directory with the name of your bundle. For example, if the current working directory is force-app and your Lightning bundle is called myBundle, we create force-app/myBundle/ to store the files in the bundle.\n",
5
+ "HelpExamplesTitle": "\nExamples:\n",
6
+ "OutputDirFlagDescription": "folder for saving the created files",
7
+ "OutputDirFlagLongDescription": "The directory to store the newly created files. The location can be an absolute path or relative to the current working directory. The default is the current directory.",
8
+ "TemplateFlagDescription": "template to use for file creation",
9
+ "TemplateFlagLongDescription": "The template to use to create the file. Supplied parameter values or default values are filled into a copy of the template.",
10
+ "TargetDirOutput": "target dir = %s",
11
+ "App": "app",
12
+ "Event": "event",
13
+ "Interface": "interface",
14
+ "Test": "test",
15
+ "Component": "component",
16
+ "Page": "page",
17
+
18
+ "AlphaNumericNameError": "Name must contain only alphanumeric characters.",
19
+ "NameMustStartWithLetterError": "Name must start with a letter.",
20
+ "EndWithUnderscoreError": "Name can't end with an underscore.",
21
+ "DoubleUnderscoreError": "Name can't contain 2 consecutive underscores."
22
+ }
@@ -1 +1 @@
1
- {"version":"1.3.0","commands":{"force:apex:execute":{"id":"force:apex:execute","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","strict":true,"usage":"<%= command.id %> [-f <filepath>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-apex","pluginAlias":"@salesforce/plugin-apex","pluginType":"core","aliases":[],"examples":["$ sfdx force:apex:execute -u testusername@salesforce.org -f ~/test.apex","$ sfdx force:apex:execute -f ~/test.apex","$ sfdx force:apex:execute \nStart typing Apex code. Press the Enter key after each line, then press CTRL+D when finished."],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"apexcodefile":{"name":"apexcodefile","type":"option","char":"f","description":"path to a local file that contains Apex code","multiple":false}},"args":[],"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","requiresUsername":true,"flagsConfig":{"apexcodefile":{"kind":"filepath","char":"f","description":"path to a local file that contains Apex code","input":[],"multiple":false,"type":"option"},"loglevel":{"kind":"enum","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","description":"logging level for this command invocation","longDescription":"The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.","default":"warn","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"input":[],"multiple":false,"type":"option"},"apiversion":{"type":"option","kind":"string","description":"override the api version used for api requests made by this command","longDescription":"Override the API version used for API requests made by this command.","input":[],"multiple":false}}},"force:apex:log:get":{"id":"force:apex:log:get","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.","strict":true,"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]","pluginName":"@salesforce/plugin-apex","pluginAlias":"@salesforce/plugin-apex","pluginType":"core","aliases":[],"examples":["$ sfdx force:apex:log:get -i <log id>","$ sfdx force:apex:log:get -i <log id> -u me@my.org","$ sfdx force:apex:log:get -n 2 -c","$ sfdx force:apex:log:get -d Users/Desktop/logs -n 2"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as JSON","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"logid":{"name":"logid","type":"option","char":"i","description":"id of the log to display","multiple":false},"number":{"name":"number","type":"option","char":"n","description":"number of most recent logs to display","multiple":false},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory for saving the log files","multiple":false}},"args":[],"requiresUsername":true,"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.","flagsConfig":{"json":{"kind":"boolean","description":"format output as JSON","allowNo":false,"type":"boolean"},"loglevel":{"kind":"enum","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","description":"logging level for this command invocation","longDescription":"The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.","default":"warn","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"input":[],"multiple":false,"type":"option"},"apiversion":{"type":"option","kind":"string","description":"override the api version used for api requests made by this command","longDescription":"Override the API version used for API requests made by this command.","input":[],"multiple":false},"logid":{"kind":"id","char":"i","description":"id of the log to display","input":[],"multiple":false,"type":"option"},"number":{"kind":"number","char":"n","min":1,"max":25,"description":"number of most recent logs to display","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"string","char":"d","description":"directory for saving the log files","longDescription":"The location can be an absolute path or relative to the current working directory. The default is the current directory.","input":[],"multiple":false,"type":"option"}}},"force:apex:log:list":{"id":"force:apex:log:list","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.","strict":true,"usage":"<%= command.id %> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-apex","pluginAlias":"@salesforce/plugin-apex","pluginType":"core","aliases":[],"examples":["$ sfdx force:apex:log:list","$ sfdx force:apex:log:list -u me@my.org"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as JSON","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false}},"args":[],"requiresUsername":true,"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.","flagsConfig":{"json":{"kind":"boolean","description":"format output as JSON","allowNo":false,"type":"boolean"},"loglevel":{"kind":"enum","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","description":"logging level for this command invocation","longDescription":"The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.","default":"warn","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"input":[],"multiple":false,"type":"option"},"apiversion":{"type":"option","kind":"string","description":"override the api version used for api requests made by this command","longDescription":"Override the API version used for API requests made by this command.","input":[],"multiple":false}}},"force:apex:log:tail":{"id":"force:apex:log:tail","description":"Follows active log\nActivates debug logging and displays logs in the terminal. You can also pipe the logs to a file.","strict":true,"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]","pluginName":"@salesforce/plugin-apex","pluginAlias":"@salesforce/plugin-apex","pluginType":"core","aliases":[],"examples":["$ sfdx force:apex:log:tail","$ sfdx force:apex:log:tail --debuglevel MyDebugLevel","$ sfdx force:apex:log:tail -c -s"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as JSON.","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"Logging level for this command invocation","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"color":{"name":"color","type":"boolean","char":"c","description":"Applies default colors to noteworthy log lines.","allowNo":false},"debuglevel":{"name":"debuglevel","type":"option","char":"d","description":"Debug level to set on the DEVELOPER_LOG trace flag for your user.","multiple":false},"skiptraceflag":{"name":"skiptraceflag","type":"boolean","char":"s","description":"Skips trace flag setup. Assumes that a trace flag and debug level are fully set up.","allowNo":false}},"args":[],"requiresUsername":true,"longDescription":"Activates debug logging and displays logs in the terminal. You can also pipe the logs to a file.","flagsConfig":{"json":{"kind":"boolean","description":"Format output as JSON.","allowNo":false,"type":"boolean"},"loglevel":{"kind":"enum","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","description":"Logging level for this command invocation","longDescription":"The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.","default":"warn","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"input":[],"multiple":false,"type":"option"},"apiversion":{"type":"option","kind":"string","description":"override the api version used for api requests made by this command","longDescription":"Override the API version used for API requests made by this command.","input":[],"multiple":false},"color":{"kind":"boolean","char":"c","description":"Applies default colors to noteworthy log lines.","allowNo":false,"type":"boolean"},"debuglevel":{"kind":"string","char":"d","description":"Debug level to set on the DEVELOPER_LOG trace flag for your user.","input":[],"multiple":false,"type":"option"},"skiptraceflag":{"kind":"boolean","char":"s","description":"Skips trace flag setup. Assumes that a trace flag and debug level are fully set up.","allowNo":false,"type":"boolean"}}},"force:apex:test:report":{"id":"force:apex:test:report","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.","strict":true,"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]","pluginName":"@salesforce/plugin-apex","pluginAlias":"@salesforce/plugin-apex","pluginType":"core","aliases":[],"examples":["$ sfdx force:apex:test:report -i <test run id>","$ sfdx force:apex:test:report -i <test run id> -r junit","$ sfdx force:apex:test:report -i <test run id> -c --json","$ sfdx force:apex:test:report -i <test run id> -c -d <path to outputdir> -u me@myorg"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as JSON","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"[default: warn] logging level for this command invocation; logs are stored in $HOME/.sfdx/sfdx.log","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"testrunid":{"name":"testrunid","type":"option","char":"i","description":"the ID of the test run","required":true,"multiple":false},"codecoverage":{"name":"codecoverage","type":"boolean","char":"c","description":"retrieves code coverage results","allowNo":false},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store test result files","multiple":false},"resultformat":{"name":"resultformat","type":"option","char":"r","description":"Permissible values are: human, tap, junit, json","helpValue":"(human|tap|junit|json)","multiple":false,"options":["human","tap","junit","json"]},"wait":{"name":"wait","type":"option","char":"w","description":"sets the streaming client socket timeout in minutes; specify a longer wait time if timeouts occur frequently","multiple":false},"verbose":{"name":"verbose","type":"boolean","description":"display Apex test processing details; if JSON is specified, processing details aren't displayed","allowNo":false}},"args":[],"requiresUsername":true,"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.","flagsConfig":{"testrunid":{"kind":"string","char":"i","description":"the ID of the test run","required":true,"input":[],"multiple":false,"type":"option"},"json":{"kind":"boolean","description":"format output as JSON","allowNo":false,"type":"boolean"},"loglevel":{"kind":"enum","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","description":"[default: warn] logging level for this command invocation; logs are stored in $HOME/.sfdx/sfdx.log","longDescription":"Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL","default":"warn","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"input":[],"multiple":false,"type":"option"},"apiversion":{"type":"option","kind":"string","description":"override the api version used for api requests made by this command","longDescription":"Override the API version used for API requests made by this command.","input":[],"multiple":false},"codecoverage":{"kind":"boolean","char":"c","description":"retrieves code coverage results","allowNo":false,"type":"boolean"},"outputdir":{"kind":"string","char":"d","description":"directory to store test result files","input":[],"multiple":false,"type":"option"},"resultformat":{"kind":"enum","helpValue":"(human|tap|junit|json)","char":"r","description":"Permissible values are: human, tap, junit, json","options":["human","tap","junit","json"],"input":[],"multiple":false,"type":"option"},"wait":{"kind":"string","char":"w","description":"sets the streaming client socket timeout in minutes; specify a longer wait time if timeouts occur frequently","input":[],"multiple":false,"type":"option"},"verbose":{"description":"display Apex test processing details; if JSON is specified, processing details aren't displayed","type":"boolean","kind":"boolean","longDescription":"Emit additional command output to stdout.","allowNo":false}}},"force:apex:test:run":{"id":"force:apex:test:run","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.","strict":true,"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]","pluginName":"@salesforce/plugin-apex","pluginAlias":"@salesforce/plugin-apex","pluginType":"core","aliases":[],"examples":["$ sfdx force:apex:test:run","$ sfdx force:apex:test:run -n \"MyClassTest,MyOtherClassTest\" -r human","$ sfdx force:apex:test:run -s \"MySuite,MyOtherSuite\" -c -v --json","$ sfdx force:apex:test:run -t \"MyClassTest.testCoolFeature,MyClassTest.testAwesomeFeature,AnotherClassTest,namespace.TheirClassTest.testThis\" -r human","$ sfdx force:apex:test:run -l RunLocalTests -d <path to outputdir> -u me@my.org"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as JSON","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"[default: warn] logging level for this command invocation; logs are stored in $HOME/.sfdx/sfdx.log","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"codecoverage":{"name":"codecoverage","type":"boolean","char":"c","description":"retrieves code coverage results","allowNo":false},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store test run files","multiple":false},"testlevel":{"name":"testlevel","type":"option","char":"l","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","helpValue":"(RunLocalTests|RunAllTestsInOrg|RunSpecifiedTests)","multiple":false,"options":["RunLocalTests","RunAllTestsInOrg","RunSpecifiedTests"]},"classnames":{"name":"classnames","type":"option","char":"n","description":"comma-separated list of Apex test class names to run; if you select --classnames, you can't specify --suitenames or --tests","multiple":false},"resultformat":{"name":"resultformat","type":"option","char":"r","description":"Permissible values are: human, tap, junit, json","helpValue":"(human|tap|junit|json)","multiple":false,"options":["human","tap","junit","json"]},"suitenames":{"name":"suitenames","type":"option","char":"s","description":"comma-separated list of Apex test suite names to run; if you select --suitenames, you can't specify --classnames or --tests","multiple":false},"tests":{"name":"tests","type":"option","char":"t","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","multiple":false},"wait":{"name":"wait","type":"option","char":"w","description":"sets the streaming client socket timeout in minutes; specify a longer wait time if timeouts occur frequently","multiple":false},"synchronous":{"name":"synchronous","type":"boolean","char":"y","description":"runs test methods from a single Apex class synchronously; if not specified, tests are run ansynchronously","allowNo":false},"verbose":{"name":"verbose","type":"boolean","description":"display Apex test processing details; if JSON is specified, processing details aren't displayed","allowNo":false},"detailedcoverage":{"name":"detailedcoverage","type":"boolean","char":"v","description":"display detailed code coverage per test","allowNo":false,"dependsOn":["codecoverage"]}},"args":[],"requiresUsername":true,"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.","flagsConfig":{"json":{"kind":"boolean","description":"format output as JSON","allowNo":false,"type":"boolean"},"loglevel":{"kind":"enum","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","description":"[default: warn] logging level for this command invocation; logs are stored in $HOME/.sfdx/sfdx.log","longDescription":"Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL","default":"warn","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"input":[],"multiple":false,"type":"option"},"apiversion":{"type":"option","kind":"string","description":"override the api version used for api requests made by this command","longDescription":"Override the API version used for API requests made by this command.","input":[],"multiple":false},"codecoverage":{"kind":"boolean","char":"c","description":"retrieves code coverage results","allowNo":false,"type":"boolean"},"outputdir":{"kind":"string","char":"d","description":"directory to store test run files","input":[],"multiple":false,"type":"option"},"testlevel":{"kind":"enum","helpValue":"(RunLocalTests|RunAllTestsInOrg|RunSpecifiedTests)","char":"l","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","options":["RunLocalTests","RunAllTestsInOrg","RunSpecifiedTests"],"input":[],"multiple":false,"type":"option"},"classnames":{"kind":"string","char":"n","description":"comma-separated list of Apex test class names to run; if you select --classnames, you can't specify --suitenames or --tests","input":[],"multiple":false,"type":"option"},"resultformat":{"kind":"enum","helpValue":"(human|tap|junit|json)","char":"r","description":"Permissible values are: human, tap, junit, json","options":["human","tap","junit","json"],"input":[],"multiple":false,"type":"option"},"suitenames":{"kind":"string","char":"s","description":"comma-separated list of Apex test suite names to run; if you select --suitenames, you can't specify --classnames or --tests","input":[],"multiple":false,"type":"option"},"tests":{"kind":"string","char":"t","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","input":[],"multiple":false,"type":"option"},"wait":{"kind":"string","char":"w","description":"sets the streaming client socket timeout in minutes; specify a longer wait time if timeouts occur frequently","input":[],"multiple":false,"type":"option"},"synchronous":{"kind":"boolean","char":"y","description":"runs test methods from a single Apex class synchronously; if not specified, tests are run ansynchronously","allowNo":false,"type":"boolean"},"verbose":{"description":"display Apex test processing details; if JSON is specified, processing details aren't displayed","type":"boolean","kind":"boolean","longDescription":"Emit additional command output to stdout.","allowNo":false},"detailedcoverage":{"kind":"boolean","char":"v","description":"display detailed code coverage per test","dependsOn":["codecoverage"],"allowNo":false,"type":"boolean"}}}}}
1
+ {"version":"1.4.1","commands":{"force:apex:execute":{"id":"force:apex:execute","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","strict":true,"usage":"<%= command.id %> [-f <filepath>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-apex","pluginAlias":"@salesforce/plugin-apex","pluginType":"core","aliases":[],"examples":["$ sfdx force:apex:execute -u testusername@salesforce.org -f ~/test.apex","$ sfdx force:apex:execute -f ~/test.apex","$ sfdx force:apex:execute \nStart typing Apex code. Press the Enter key after each line, then press CTRL+D when finished."],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"apexcodefile":{"name":"apexcodefile","type":"option","char":"f","description":"path to a local file that contains Apex code","multiple":false}},"args":[],"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","requiresUsername":true,"flagsConfig":{"apexcodefile":{"kind":"filepath","char":"f","description":"path to a local file that contains Apex code","input":[],"multiple":false,"type":"option"},"loglevel":{"kind":"enum","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","description":"logging level for this command invocation","longDescription":"The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.","default":"warn","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"input":[],"multiple":false,"type":"option"},"apiversion":{"type":"option","kind":"string","description":"override the api version used for api requests made by this command","longDescription":"Override the API version used for API requests made by this command.","input":[],"multiple":false}}},"force:apex:log:get":{"id":"force:apex:log:get","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.","strict":true,"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]","pluginName":"@salesforce/plugin-apex","pluginAlias":"@salesforce/plugin-apex","pluginType":"core","aliases":[],"examples":["$ sfdx force:apex:log:get -i <log id>","$ sfdx force:apex:log:get -i <log id> -u me@my.org","$ sfdx force:apex:log:get -n 2 -c","$ sfdx force:apex:log:get -d Users/Desktop/logs -n 2"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as JSON","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"logid":{"name":"logid","type":"option","char":"i","description":"id of the log to display","multiple":false},"number":{"name":"number","type":"option","char":"n","description":"number of most recent logs to display","multiple":false},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory for saving the log files","multiple":false}},"args":[],"requiresUsername":true,"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.","flagsConfig":{"json":{"kind":"boolean","description":"format output as JSON","allowNo":false,"type":"boolean"},"loglevel":{"kind":"enum","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","description":"logging level for this command invocation","longDescription":"The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.","default":"warn","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"input":[],"multiple":false,"type":"option"},"apiversion":{"type":"option","kind":"string","description":"override the api version used for api requests made by this command","longDescription":"Override the API version used for API requests made by this command.","input":[],"multiple":false},"logid":{"kind":"id","char":"i","description":"id of the log to display","input":[],"multiple":false,"type":"option"},"number":{"kind":"number","char":"n","min":1,"max":25,"description":"number of most recent logs to display","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"string","char":"d","description":"directory for saving the log files","longDescription":"The location can be an absolute path or relative to the current working directory. The default is the current directory.","input":[],"multiple":false,"type":"option"}}},"force:apex:log:list":{"id":"force:apex:log:list","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.","strict":true,"usage":"<%= command.id %> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-apex","pluginAlias":"@salesforce/plugin-apex","pluginType":"core","aliases":[],"examples":["$ sfdx force:apex:log:list","$ sfdx force:apex:log:list -u me@my.org"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as JSON","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false}},"args":[],"requiresUsername":true,"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.","flagsConfig":{"json":{"kind":"boolean","description":"format output as JSON","allowNo":false,"type":"boolean"},"loglevel":{"kind":"enum","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","description":"logging level for this command invocation","longDescription":"The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.","default":"warn","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"input":[],"multiple":false,"type":"option"},"apiversion":{"type":"option","kind":"string","description":"override the api version used for api requests made by this command","longDescription":"Override the API version used for API requests made by this command.","input":[],"multiple":false}}},"force:apex:log:tail":{"id":"force:apex:log:tail","description":"Follows active log\nActivates debug logging and displays logs in the terminal. You can also pipe the logs to a file.","strict":true,"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]","pluginName":"@salesforce/plugin-apex","pluginAlias":"@salesforce/plugin-apex","pluginType":"core","aliases":[],"examples":["$ sfdx force:apex:log:tail","$ sfdx force:apex:log:tail --debuglevel MyDebugLevel","$ sfdx force:apex:log:tail -c -s"],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as JSON.","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"Logging level for this command invocation","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"color":{"name":"color","type":"boolean","char":"c","description":"Applies default colors to noteworthy log lines.","allowNo":false},"debuglevel":{"name":"debuglevel","type":"option","char":"d","description":"Debug level to set on the DEVELOPER_LOG trace flag for your user.","multiple":false},"skiptraceflag":{"name":"skiptraceflag","type":"boolean","char":"s","description":"Skips trace flag setup. Assumes that a trace flag and debug level are fully set up.","allowNo":false}},"args":[],"requiresUsername":true,"longDescription":"Activates debug logging and displays logs in the terminal. You can also pipe the logs to a file.","flagsConfig":{"json":{"kind":"boolean","description":"Format output as JSON.","allowNo":false,"type":"boolean"},"loglevel":{"kind":"enum","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","description":"Logging level for this command invocation","longDescription":"The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.","default":"warn","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"input":[],"multiple":false,"type":"option"},"apiversion":{"type":"option","kind":"string","description":"override the api version used for api requests made by this command","longDescription":"Override the API version used for API requests made by this command.","input":[],"multiple":false},"color":{"kind":"boolean","char":"c","description":"Applies default colors to noteworthy log lines.","allowNo":false,"type":"boolean"},"debuglevel":{"kind":"string","char":"d","description":"Debug level to set on the DEVELOPER_LOG trace flag for your user.","input":[],"multiple":false,"type":"option"},"skiptraceflag":{"kind":"boolean","char":"s","description":"Skips trace flag setup. Assumes that a trace flag and debug level are fully set up.","allowNo":false,"type":"boolean"}}},"force:apex:test:report":{"id":"force:apex:test:report","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.","strict":true,"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]","pluginName":"@salesforce/plugin-apex","pluginAlias":"@salesforce/plugin-apex","pluginType":"core","aliases":[],"examples":["$ sfdx force:apex:test:report -i <test run id>","$ sfdx force:apex:test:report -i <test run id> -r junit","$ sfdx force:apex:test:report -i <test run id> -c --json","$ sfdx force:apex:test:report -i <test run id> -c -d <path to outputdir> -u me@myorg"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as JSON","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"[default: warn] logging level for this command invocation; logs are stored in $HOME/.sfdx/sfdx.log","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"testrunid":{"name":"testrunid","type":"option","char":"i","description":"the ID of the test run","required":true,"multiple":false},"codecoverage":{"name":"codecoverage","type":"boolean","char":"c","description":"retrieves code coverage results","allowNo":false},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store test result files","multiple":false},"resultformat":{"name":"resultformat","type":"option","char":"r","description":"Permissible values are: human, tap, junit, json","helpValue":"(human|tap|junit|json)","multiple":false,"options":["human","tap","junit","json"]},"wait":{"name":"wait","type":"option","char":"w","description":"sets the streaming client socket timeout in minutes; specify a longer wait time if timeouts occur frequently","multiple":false},"verbose":{"name":"verbose","type":"boolean","description":"display Apex test processing details; if JSON is specified, processing details aren't displayed","allowNo":false}},"args":[],"requiresUsername":true,"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.","flagsConfig":{"testrunid":{"kind":"string","char":"i","description":"the ID of the test run","required":true,"input":[],"multiple":false,"type":"option"},"json":{"kind":"boolean","description":"format output as JSON","allowNo":false,"type":"boolean"},"loglevel":{"kind":"enum","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","description":"[default: warn] logging level for this command invocation; logs are stored in $HOME/.sfdx/sfdx.log","longDescription":"Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL","default":"warn","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"input":[],"multiple":false,"type":"option"},"apiversion":{"type":"option","kind":"string","description":"override the api version used for api requests made by this command","longDescription":"Override the API version used for API requests made by this command.","input":[],"multiple":false},"codecoverage":{"kind":"boolean","char":"c","description":"retrieves code coverage results","allowNo":false,"type":"boolean"},"outputdir":{"kind":"string","char":"d","description":"directory to store test result files","input":[],"multiple":false,"type":"option"},"resultformat":{"kind":"enum","helpValue":"(human|tap|junit|json)","char":"r","description":"Permissible values are: human, tap, junit, json","options":["human","tap","junit","json"],"input":[],"multiple":false,"type":"option"},"wait":{"kind":"string","char":"w","description":"sets the streaming client socket timeout in minutes; specify a longer wait time if timeouts occur frequently","input":[],"multiple":false,"type":"option"},"verbose":{"description":"display Apex test processing details; if JSON is specified, processing details aren't displayed","type":"boolean","kind":"boolean","longDescription":"Emit additional command output to stdout.","allowNo":false}}},"force:apex:test:run":{"id":"force:apex:test:run","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.","strict":true,"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]","pluginName":"@salesforce/plugin-apex","pluginAlias":"@salesforce/plugin-apex","pluginType":"core","aliases":[],"examples":["$ sfdx force:apex:test:run","$ sfdx force:apex:test:run -n \"MyClassTest,MyOtherClassTest\" -r human","$ sfdx force:apex:test:run -s \"MySuite,MyOtherSuite\" -c -v --json","$ sfdx force:apex:test:run -t \"MyClassTest.testCoolFeature,MyClassTest.testAwesomeFeature,AnotherClassTest,namespace.TheirClassTest.testThis\" -r human","$ sfdx force:apex:test:run -l RunLocalTests -d <path to outputdir> -u me@my.org"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as JSON","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"[default: warn] logging level for this command invocation; logs are stored in $HOME/.sfdx/sfdx.log","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"codecoverage":{"name":"codecoverage","type":"boolean","char":"c","description":"retrieves code coverage results","allowNo":false},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store test run files","multiple":false},"testlevel":{"name":"testlevel","type":"option","char":"l","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","helpValue":"(RunLocalTests|RunAllTestsInOrg|RunSpecifiedTests)","multiple":false,"options":["RunLocalTests","RunAllTestsInOrg","RunSpecifiedTests"]},"classnames":{"name":"classnames","type":"option","char":"n","description":"comma-separated list of Apex test class names to run; if you select --classnames, you can't specify --suitenames or --tests","multiple":false},"resultformat":{"name":"resultformat","type":"option","char":"r","description":"Permissible values are: human, tap, junit, json","helpValue":"(human|tap|junit|json)","multiple":false,"options":["human","tap","junit","json"]},"suitenames":{"name":"suitenames","type":"option","char":"s","description":"comma-separated list of Apex test suite names to run; if you select --suitenames, you can't specify --classnames or --tests","multiple":false},"tests":{"name":"tests","type":"option","char":"t","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","multiple":false},"wait":{"name":"wait","type":"option","char":"w","description":"sets the streaming client socket timeout in minutes; specify a longer wait time if timeouts occur frequently","multiple":false},"synchronous":{"name":"synchronous","type":"boolean","char":"y","description":"runs test methods from a single Apex class synchronously; if not specified, tests are run ansynchronously","allowNo":false},"verbose":{"name":"verbose","type":"boolean","description":"display Apex test processing details; if JSON is specified, processing details aren't displayed","allowNo":false},"detailedcoverage":{"name":"detailedcoverage","type":"boolean","char":"v","description":"display detailed code coverage per test","allowNo":false,"dependsOn":["codecoverage"]}},"args":[],"requiresUsername":true,"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.","flagsConfig":{"json":{"kind":"boolean","description":"format output as JSON","allowNo":false,"type":"boolean"},"loglevel":{"kind":"enum","helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","description":"[default: warn] logging level for this command invocation; logs are stored in $HOME/.sfdx/sfdx.log","longDescription":"Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL","default":"warn","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"input":[],"multiple":false,"type":"option"},"apiversion":{"type":"option","kind":"string","description":"override the api version used for api requests made by this command","longDescription":"Override the API version used for API requests made by this command.","input":[],"multiple":false},"codecoverage":{"kind":"boolean","char":"c","description":"retrieves code coverage results","allowNo":false,"type":"boolean"},"outputdir":{"kind":"string","char":"d","description":"directory to store test run files","input":[],"multiple":false,"type":"option"},"testlevel":{"kind":"enum","helpValue":"(RunLocalTests|RunAllTestsInOrg|RunSpecifiedTests)","char":"l","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","options":["RunLocalTests","RunAllTestsInOrg","RunSpecifiedTests"],"input":[],"multiple":false,"type":"option"},"classnames":{"kind":"string","char":"n","description":"comma-separated list of Apex test class names to run; if you select --classnames, you can't specify --suitenames or --tests","input":[],"multiple":false,"type":"option"},"resultformat":{"kind":"enum","helpValue":"(human|tap|junit|json)","char":"r","description":"Permissible values are: human, tap, junit, json","options":["human","tap","junit","json"],"input":[],"multiple":false,"type":"option"},"suitenames":{"kind":"string","char":"s","description":"comma-separated list of Apex test suite names to run; if you select --suitenames, you can't specify --classnames or --tests","input":[],"multiple":false,"type":"option"},"tests":{"kind":"string","char":"t","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","input":[],"multiple":false,"type":"option"},"wait":{"kind":"string","char":"w","description":"sets the streaming client socket timeout in minutes; specify a longer wait time if timeouts occur frequently","input":[],"multiple":false,"type":"option"},"synchronous":{"kind":"boolean","char":"y","description":"runs test methods from a single Apex class synchronously; if not specified, tests are run ansynchronously","allowNo":false,"type":"boolean"},"verbose":{"description":"display Apex test processing details; if JSON is specified, processing details aren't displayed","type":"boolean","kind":"boolean","longDescription":"Emit additional command output to stdout.","allowNo":false},"detailedcoverage":{"kind":"boolean","char":"v","description":"display detailed code coverage per test","dependsOn":["codecoverage"],"allowNo":false,"type":"boolean"}}}}}