apex-code-coverage-transformer 2.2.0 → 2.3.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.
@@ -3,9 +3,10 @@
3
3
  "acc-transformer:transform": {
4
4
  "aliases": [],
5
5
  "args": {},
6
- "description": "This plugin will convert the code coverage JSON file created by the Salesforce CLI during Apex deployments and test runs into an XML accepted by tools like SonarQube.",
6
+ "description": "Transform the Apex code coverage JSON file created by the Salesforce CLI deploy and test command into SonarQube or Cobertura format.",
7
7
  "examples": [
8
- "`sf acc-transformer transform -j \"coverage.json\" -x \"coverage.xml\"`"
8
+ "`sf acc-transformer transform -j \"coverage.json\" -x \"coverage.xml\" -f \"sonar\"`",
9
+ "`sf acc-transformer transform -j \"coverage.json\" -x \"coverage.xml\" -f \"cobertura\"`"
9
10
  ],
10
11
  "flags": {
11
12
  "json": {
@@ -15,11 +16,19 @@
15
16
  "allowNo": false,
16
17
  "type": "boolean"
17
18
  },
19
+ "flags-dir": {
20
+ "helpGroup": "GLOBAL",
21
+ "name": "flags-dir",
22
+ "summary": "Import flag values from a directory.",
23
+ "hasDynamicHelp": false,
24
+ "multiple": false,
25
+ "type": "option"
26
+ },
18
27
  "coverage-json": {
19
28
  "char": "j",
20
29
  "name": "coverage-json",
21
30
  "required": true,
22
- "summary": "Path to the code coverage JSON file created by the Salesforce CLI deployment or test command.",
31
+ "summary": "Path to the code coverage JSON file created by the Salesforce CLI deploy or test command.",
23
32
  "hasDynamicHelp": false,
24
33
  "multiple": false,
25
34
  "type": "option"
@@ -28,11 +37,25 @@
28
37
  "char": "x",
29
38
  "name": "xml",
30
39
  "required": true,
31
- "summary": "Path to code coverage XML file that will be created by this plugin.",
40
+ "summary": "Path to the code coverage XML file that will be created by this plugin.",
32
41
  "default": "coverage.xml",
33
42
  "hasDynamicHelp": false,
34
43
  "multiple": false,
35
44
  "type": "option"
45
+ },
46
+ "format": {
47
+ "char": "f",
48
+ "name": "format",
49
+ "required": true,
50
+ "summary": "Output format for the coverage report.",
51
+ "default": "sonar",
52
+ "hasDynamicHelp": false,
53
+ "multiple": false,
54
+ "options": [
55
+ "sonar",
56
+ "cobertura"
57
+ ],
58
+ "type": "option"
36
59
  }
37
60
  },
38
61
  "hasDynamicHelp": false,
@@ -42,7 +65,7 @@
42
65
  "pluginName": "apex-code-coverage-transformer",
43
66
  "pluginType": "core",
44
67
  "strict": true,
45
- "summary": "Transforms the Code Coverage JSON into the Generic Test Coverage Format (XML).",
68
+ "summary": "Transforms the Code Coverage JSON into SonarQube or Cobertura format.",
46
69
  "enableJsonFlag": true,
47
70
  "isESM": true,
48
71
  "relativePath": [
@@ -58,5 +81,5 @@
58
81
  ]
59
82
  }
60
83
  },
61
- "version": "2.2.0"
84
+ "version": "2.3.0"
62
85
  }
package/package.json CHANGED
@@ -1,25 +1,26 @@
1
1
  {
2
2
  "name": "apex-code-coverage-transformer",
3
- "description": "Transforms the Apex code coverage JSON created during Salesforce deployments and test runs into the Generic Test Coverage Format (XML) for SonarQube.",
4
- "version": "2.2.0",
3
+ "description": "Transforms the Apex code coverage JSON created during Salesforce deployments and test runs into SonarQube or Cobertura format.",
4
+ "version": "2.3.0",
5
5
  "dependencies": {
6
- "@oclif/core": "^3.18.1",
7
- "@salesforce/core": "^6.4.7",
8
- "@salesforce/sf-plugins-core": "^7.1.3",
6
+ "@oclif/core": "^4.0.37",
7
+ "@salesforce/core": "^8.8.0",
8
+ "@salesforce/sf-plugins-core": "^12.1.1",
9
9
  "xmlbuilder2": "^3.1.1"
10
10
  },
11
11
  "devDependencies": {
12
- "@commitlint/cli": "^18.6.1",
13
- "@commitlint/config-conventional": "^18.6.0",
14
- "@oclif/plugin-command-snapshot": "^5.2.19",
15
- "@salesforce/cli-plugins-testkit": "^5.3.34",
16
- "@salesforce/dev-scripts": "^8.3.0",
17
- "eslint-plugin-sf-plugin": "^1.17.2",
18
- "husky": "^9.1.4",
19
- "oclif": "^4.3.4",
12
+ "@commitlint/cli": "^19.6.0",
13
+ "@commitlint/config-conventional": "^19.6.0",
14
+ "@oclif/plugin-command-snapshot": "^5.2.23",
15
+ "@salesforce/cli-plugins-testkit": "^5.3.39",
16
+ "@salesforce/dev-scripts": "^10.2.11",
17
+ "@types/node": "18",
18
+ "eslint-plugin-sf-plugin": "^1.20.13",
19
+ "husky": "^9.1.7",
20
+ "oclif": "^4.16.2",
20
21
  "shx": "0.3.4",
21
22
  "ts-node": "^10.9.2",
22
- "typescript": "^5.3.3"
23
+ "typescript": "^5.7.2"
23
24
  },
24
25
  "engines": {
25
26
  "node": ">=18.0.0"
@@ -44,7 +45,8 @@
44
45
  "sonarqube",
45
46
  "apex",
46
47
  "coverage",
47
- "git"
48
+ "git",
49
+ "cobertura"
48
50
  ],
49
51
  "license": "MIT",
50
52
  "oclif": {
@@ -1,2 +0,0 @@
1
- import { FileObject } from './types.js';
2
- export declare function setCoveredLines(coveredLines: number[], uncoveredLines: number[], repoRoot: string, filePath: string, fileObj: FileObject): Promise<void>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"setCoveredLines.js","sourceRoot":"","sources":["../../src/helpers/setCoveredLines.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,YAAsB,EACtB,cAAwB,EACxB,QAAgB,EAChB,QAAgB,EAChB,OAAmB;IAEnB,MAAM,WAAW,GAAa,EAAE,CAAC;IACjC,MAAM,UAAU,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;IACjE,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACvC,IAAI,WAAW,GAAG,UAAU,EAAE,CAAC;YAC7B,KAAK,IAAI,gBAAgB,GAAG,CAAC,EAAE,gBAAgB,IAAI,UAAU,EAAE,gBAAgB,EAAE,EAAE,CAAC;gBAClF,IACE,CAAC,cAAc,CAAC,QAAQ,CAAC,gBAAgB,CAAC;oBAC1C,CAAC,YAAY,CAAC,QAAQ,CAAC,gBAAgB,CAAC;oBACxC,CAAC,WAAW,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EACvC,CAAC;oBACD,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC;wBACvB,aAAa,EAAE,gBAAgB;wBAC/B,UAAU,EAAE,MAAM;qBACnB,CAAC,CAAC;oBACH,WAAW,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;oBACnC,MAAM;gBACR,CAAC;YACH,CAAC;QACH,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC;gBACvB,aAAa,EAAE,WAAW;gBAC1B,UAAU,EAAE,MAAM;aACnB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;AACH,CAAC"}