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.
- package/CHANGELOG.md +14 -0
- package/README.md +124 -20
- package/lib/commands/acc-transformer/transform.d.ts +3 -2
- package/lib/commands/acc-transformer/transform.js +11 -2
- package/lib/commands/acc-transformer/transform.js.map +1 -1
- package/lib/helpers/setCoveredLinesCobertura.d.ts +2 -0
- package/lib/helpers/setCoveredLinesCobertura.js +34 -0
- package/lib/helpers/setCoveredLinesCobertura.js.map +1 -0
- package/lib/helpers/setCoveredLinesSonar.d.ts +2 -0
- package/lib/helpers/{setCoveredLines.js → setCoveredLinesSonar.js} +2 -2
- package/lib/helpers/setCoveredLinesSonar.js.map +1 -0
- package/lib/helpers/transformDeployCoverageReport.d.ts +1 -1
- package/lib/helpers/transformDeployCoverageReport.js +104 -30
- package/lib/helpers/transformDeployCoverageReport.js.map +1 -1
- package/lib/helpers/transformTestCoverageReport.d.ts +1 -1
- package/lib/helpers/transformTestCoverageReport.js +106 -27
- package/lib/helpers/transformTestCoverageReport.js.map +1 -1
- package/lib/helpers/types.d.ts +43 -0
- package/lib/hooks/postrun.js +3 -0
- package/lib/hooks/postrun.js.map +1 -1
- package/messages/transformer.transform.md +10 -5
- package/oclif.lock +3771 -4298
- package/oclif.manifest.json +29 -6
- package/package.json +17 -15
- package/lib/helpers/setCoveredLines.d.ts +0 -2
- package/lib/helpers/setCoveredLines.js.map +0 -1
package/oclif.manifest.json
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
"acc-transformer:transform": {
|
|
4
4
|
"aliases": [],
|
|
5
5
|
"args": {},
|
|
6
|
-
"description": "
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
4
|
-
"version": "2.
|
|
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": "^
|
|
7
|
-
"@salesforce/core": "^
|
|
8
|
-
"@salesforce/sf-plugins-core": "^
|
|
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": "^
|
|
13
|
-
"@commitlint/config-conventional": "^
|
|
14
|
-
"@oclif/plugin-command-snapshot": "^5.2.
|
|
15
|
-
"@salesforce/cli-plugins-testkit": "^5.3.
|
|
16
|
-
"@salesforce/dev-scripts": "^
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
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.
|
|
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 +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"}
|