From df4c7603408528de7ec186c9269ca7c40c72e4b1 Mon Sep 17 00:00:00 2001 From: Matt Carvin <90224411+mcarvin8@users.noreply.github.com> Date: Mon, 4 Mar 2024 17:21:18 -0500 Subject: [PATCH 01/18] chore: delete XMLs at the end of the test --- test/commands/transformer/unit.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/commands/transformer/unit.test.ts b/test/commands/transformer/unit.test.ts index 9437bd2..be97a69 100644 --- a/test/commands/transformer/unit.test.ts +++ b/test/commands/transformer/unit.test.ts @@ -50,6 +50,8 @@ describe('transform the code coverage json', () => { fs.rmdirSync('force-app/main/default/classes'); fs.rmdirSync('force-app/main/default/triggers'); fs.rmdirSync('force-app/main/default/flows'); + fs.rmSync(testXmlPath1); + fs.rmSync(testXmlPath2); }); it('transform the test JSON file without file extensions into the generic test coverage format', async () => { From 9e8f102e9e5c848f5bd604fb2755ae7ea2172cc9 Mon Sep 17 00:00:00 2001 From: Matt Carvin <90224411+mcarvin8@users.noreply.github.com> Date: Mon, 4 Mar 2024 17:22:13 -0500 Subject: [PATCH 02/18] fix: add covered and uncovered lines to XML --- src/helpers/convertToGenericCoverageReport.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/helpers/convertToGenericCoverageReport.ts b/src/helpers/convertToGenericCoverageReport.ts index 8ed81c7..eb5fe13 100644 --- a/src/helpers/convertToGenericCoverageReport.ts +++ b/src/helpers/convertToGenericCoverageReport.ts @@ -16,10 +16,7 @@ export function convertToGenericCoverageReport(data: CoverageData, dxDirectory: if (Object.hasOwn(classInfo.s, lineNumber)) { const count = classInfo.s[lineNumber]; const covered = count > 0 ? 'true' : 'false'; - // only add uncovered lines - if (covered === 'false') { - xml += `\t\t\n`; - } + xml += `\t\t\n`; } } xml += '\t\n'; From 3b7f37aa3c82682d1c962f2c4eb9f356c018f5bf Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 4 Mar 2024 22:23:59 +0000 Subject: [PATCH 03/18] chore(release): 1.4.1-beta.1 [skip ci] ## [1.4.1-beta.1](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.0...v1.4.1-beta.1) (2024-03-04) ### Bug Fixes * add covered and uncovered lines to XML ([9e8f102](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/9e8f102e9e5c848f5bd604fb2755ae7ea2172cc9)) --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9651264..cfe28ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.4.1-beta.1](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.0...v1.4.1-beta.1) (2024-03-04) + +### Bug Fixes + +- add covered and uncovered lines to XML ([9e8f102](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/9e8f102e9e5c848f5bd604fb2755ae7ea2172cc9)) + # [1.4.0](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.3.1...v1.4.0) (2024-02-27) ### Features diff --git a/package.json b/package.json index cd2c3d9..6390478 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "apex-code-coverage-transformer", "description": "Transforms the Apex Code Coverage JSON into the Generic Test Data Report.", - "version": "1.4.0", + "version": "1.4.1-beta.1", "dependencies": { "@oclif/core": "^3.18.1", "@salesforce/core": "^6.4.7", From 71f416306c69de18d7e99c62acc840352c659b31 Mon Sep 17 00:00:00 2001 From: Matt Carvin <90224411+mcarvin8@users.noreply.github.com> Date: Mon, 4 Mar 2024 17:34:01 -0500 Subject: [PATCH 04/18] chore: readme and package description update --- README.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 406e4a5..27cd007 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ This will create a coverage JSON in this relative path - `coverage/coverage/cove This JSON isn't accepted by SonarQube automatically and needs to be converted using this plugin. +After this plugin creates the XML, you can pass the XML file-path to SonarQube using the `sonar.coverageReportPaths` flag. + **Note**: This has been tested and confirmed on code which meets 100% coverage. ## Install diff --git a/package.json b/package.json index 6390478..40dffa8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "apex-code-coverage-transformer", - "description": "Transforms the Apex Code Coverage JSON into the Generic Test Data Report.", + "description": "Transforms the Apex Code Coverage JSON into the Generic Test Coverage Format.", "version": "1.4.1-beta.1", "dependencies": { "@oclif/core": "^3.18.1", From 794a9e7813db182e47f46c2275a8064b8d92e261 Mon Sep 17 00:00:00 2001 From: Matt Carvin <90224411+mcarvin8@users.noreply.github.com> Date: Mon, 4 Mar 2024 19:53:57 -0500 Subject: [PATCH 05/18] fix: get total number of lines in each file and assume line is covered if it's not listed as "uncovered" in JSON --- README.md | 643 ++++++--- coverage_no_file_exts.json | 1219 ++++++++++++++--- coverage_with_file_exts.json | 1219 ++++++++++++++--- .../main/default/classes/PrepareMySandbox.cls | 72 + .../main/default/flows/Get_Info.flow-meta.xml | 343 +++++ .../default/triggers/AccountTrigger.trigger | 18 + src/helpers/convertToGenericCoverageReport.ts | 26 +- src/helpers/findFilePath.ts | 4 +- test/commands/transformer/unit.test.ts | 21 - 9 files changed, 2927 insertions(+), 638 deletions(-) create mode 100644 force-app/main/default/classes/PrepareMySandbox.cls create mode 100644 force-app/main/default/flows/Get_Info.flow-meta.xml create mode 100644 force-app/main/default/triggers/AccountTrigger.trigger diff --git a/README.md b/README.md index 27cd007..cfb444b 100644 --- a/README.md +++ b/README.md @@ -59,223 +59,356 @@ A JSON created by the Salesforce CLI : ```json { - "no-map/AccountTrigger": { + "no-map/PrepareMySandbox": { "fnMap": {}, "branchMap": {}, - "path": "no-map/AccountTrigger", + "path": "no-map/PrepareMySandbox", "f": {}, "b": {}, "s": { - "52": 0, - "53": 0, - "54": 1, - "55": 1, - "56": 1, - "57": 1, - "58": 1, - "59": 0, - "60": 0, - "61": 1, - "62": 1, - "63": 1, - "64": 1, - "65": 1, - "66": 1, - "67": 1, - "68": 1, - "69": 1, - "70": 1, - "71": 1, - "72": 1, - "73": 1, - "74": 1, - "75": 1, - "76": 1, - "77": 1, - "78": 1, - "79": 1, - "80": 1, - "81": 1, - "82": 1 + "7": 0, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 0, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1, + "21": 1, + "22": 1, + "23": 1, + "24": 1, + "25": 1, + "26": 1, + "27": 1, + "28": 1, + "29": 1, + "30": 1, + "31": 1, + "32": 1, + "33": 1, + "34": 1, + "35": 1, + "36": 1, + "37": 1 }, "statementMap": { - "52": { "start": { "line": 52, "column": 0 }, "end": { "line": 52, "column": 0 } }, - "53": { "start": { "line": 53, "column": 0 }, "end": { "line": 53, "column": 0 } }, - "54": { "start": { "line": 54, "column": 0 }, "end": { "line": 54, "column": 0 } }, - "55": { "start": { "line": 55, "column": 0 }, "end": { "line": 55, "column": 0 } }, - "56": { "start": { "line": 56, "column": 0 }, "end": { "line": 56, "column": 0 } }, - "57": { "start": { "line": 57, "column": 0 }, "end": { "line": 57, "column": 0 } }, - "58": { "start": { "line": 58, "column": 0 }, "end": { "line": 58, "column": 0 } }, - "59": { "start": { "line": 59, "column": 0 }, "end": { "line": 59, "column": 0 } }, - "60": { "start": { "line": 60, "column": 0 }, "end": { "line": 60, "column": 0 } }, - "61": { "start": { "line": 61, "column": 0 }, "end": { "line": 61, "column": 0 } }, - "62": { "start": { "line": 62, "column": 0 }, "end": { "line": 62, "column": 0 } }, - "63": { "start": { "line": 63, "column": 0 }, "end": { "line": 63, "column": 0 } }, - "64": { "start": { "line": 64, "column": 0 }, "end": { "line": 64, "column": 0 } }, - "65": { "start": { "line": 65, "column": 0 }, "end": { "line": 65, "column": 0 } }, - "66": { "start": { "line": 66, "column": 0 }, "end": { "line": 66, "column": 0 } }, - "67": { "start": { "line": 67, "column": 0 }, "end": { "line": 67, "column": 0 } }, - "68": { "start": { "line": 68, "column": 0 }, "end": { "line": 68, "column": 0 } }, - "69": { "start": { "line": 69, "column": 0 }, "end": { "line": 69, "column": 0 } }, - "70": { "start": { "line": 70, "column": 0 }, "end": { "line": 70, "column": 0 } }, - "71": { "start": { "line": 71, "column": 0 }, "end": { "line": 71, "column": 0 } }, - "72": { "start": { "line": 72, "column": 0 }, "end": { "line": 72, "column": 0 } }, - "73": { "start": { "line": 73, "column": 0 }, "end": { "line": 73, "column": 0 } }, - "74": { "start": { "line": 74, "column": 0 }, "end": { "line": 74, "column": 0 } }, - "75": { "start": { "line": 75, "column": 0 }, "end": { "line": 75, "column": 0 } }, - "76": { "start": { "line": 76, "column": 0 }, "end": { "line": 76, "column": 0 } }, - "77": { "start": { "line": 77, "column": 0 }, "end": { "line": 77, "column": 0 } }, - "78": { "start": { "line": 78, "column": 0 }, "end": { "line": 78, "column": 0 } }, - "79": { "start": { "line": 79, "column": 0 }, "end": { "line": 79, "column": 0 } }, - "80": { "start": { "line": 80, "column": 0 }, "end": { "line": 80, "column": 0 } }, - "81": { "start": { "line": 81, "column": 0 }, "end": { "line": 81, "column": 0 } }, - "82": { "start": { "line": 82, "column": 0 }, "end": { "line": 82, "column": 0 } } - } - }, - "no-map/AccountProfile": { - "fnMap": {}, - "branchMap": {}, - "path": "no-map/AccountProfile", - "f": {}, - "b": {}, - "s": { - "52": 0, - "53": 0, - "54": 1, - "55": 1, - "56": 1, - "57": 1, - "58": 1, - "59": 0, - "60": 0, - "61": 1, - "62": 1, - "63": 1, - "64": 1, - "65": 1, - "66": 1, - "67": 1, - "68": 1, - "69": 1, - "70": 1, - "71": 1, - "72": 1, - "73": 1, - "74": 1, - "75": 1, - "76": 1, - "77": 1, - "78": 1, - "79": 1, - "80": 1, - "81": 1, - "82": 1 - }, - "statementMap": { - "52": { "start": { "line": 52, "column": 0 }, "end": { "line": 52, "column": 0 } }, - "53": { "start": { "line": 53, "column": 0 }, "end": { "line": 53, "column": 0 } }, - "54": { "start": { "line": 54, "column": 0 }, "end": { "line": 54, "column": 0 } }, - "55": { "start": { "line": 55, "column": 0 }, "end": { "line": 55, "column": 0 } }, - "56": { "start": { "line": 56, "column": 0 }, "end": { "line": 56, "column": 0 } }, - "57": { "start": { "line": 57, "column": 0 }, "end": { "line": 57, "column": 0 } }, - "58": { "start": { "line": 58, "column": 0 }, "end": { "line": 58, "column": 0 } }, - "59": { "start": { "line": 59, "column": 0 }, "end": { "line": 59, "column": 0 } }, - "60": { "start": { "line": 60, "column": 0 }, "end": { "line": 60, "column": 0 } }, - "61": { "start": { "line": 61, "column": 0 }, "end": { "line": 61, "column": 0 } }, - "62": { "start": { "line": 62, "column": 0 }, "end": { "line": 62, "column": 0 } }, - "63": { "start": { "line": 63, "column": 0 }, "end": { "line": 63, "column": 0 } }, - "64": { "start": { "line": 64, "column": 0 }, "end": { "line": 64, "column": 0 } }, - "65": { "start": { "line": 65, "column": 0 }, "end": { "line": 65, "column": 0 } }, - "66": { "start": { "line": 66, "column": 0 }, "end": { "line": 66, "column": 0 } }, - "67": { "start": { "line": 67, "column": 0 }, "end": { "line": 67, "column": 0 } }, - "68": { "start": { "line": 68, "column": 0 }, "end": { "line": 68, "column": 0 } }, - "69": { "start": { "line": 69, "column": 0 }, "end": { "line": 69, "column": 0 } }, - "70": { "start": { "line": 70, "column": 0 }, "end": { "line": 70, "column": 0 } }, - "71": { "start": { "line": 71, "column": 0 }, "end": { "line": 71, "column": 0 } }, - "72": { "start": { "line": 72, "column": 0 }, "end": { "line": 72, "column": 0 } }, - "73": { "start": { "line": 73, "column": 0 }, "end": { "line": 73, "column": 0 } }, - "74": { "start": { "line": 74, "column": 0 }, "end": { "line": 74, "column": 0 } }, - "75": { "start": { "line": 75, "column": 0 }, "end": { "line": 75, "column": 0 } }, - "76": { "start": { "line": 76, "column": 0 }, "end": { "line": 76, "column": 0 } }, - "77": { "start": { "line": 77, "column": 0 }, "end": { "line": 77, "column": 0 } }, - "78": { "start": { "line": 78, "column": 0 }, "end": { "line": 78, "column": 0 } }, - "79": { "start": { "line": 79, "column": 0 }, "end": { "line": 79, "column": 0 } }, - "80": { "start": { "line": 80, "column": 0 }, "end": { "line": 80, "column": 0 } }, - "81": { "start": { "line": 81, "column": 0 }, "end": { "line": 81, "column": 0 } }, - "82": { "start": { "line": 82, "column": 0 }, "end": { "line": 82, "column": 0 } } - } - }, - "no-map/Get_Info": { - "fnMap": {}, - "branchMap": {}, - "path": "no-map/Get_Info", - "f": {}, - "b": {}, - "s": { - "52": 0, - "53": 0, - "54": 1, - "55": 1, - "56": 1, - "57": 1, - "58": 1, - "59": 0, - "60": 0, - "61": 1, - "62": 1, - "63": 1, - "64": 1, - "65": 1, - "66": 1, - "67": 1, - "68": 1, - "69": 1, - "70": 1, - "71": 1, - "72": 1, - "73": 1, - "74": 1, - "75": 1, - "76": 1, - "77": 1, - "78": 1, - "79": 1, - "80": 1, - "81": 1, - "82": 1 - }, - "statementMap": { - "52": { "start": { "line": 52, "column": 0 }, "end": { "line": 52, "column": 0 } }, - "53": { "start": { "line": 53, "column": 0 }, "end": { "line": 53, "column": 0 } }, - "54": { "start": { "line": 54, "column": 0 }, "end": { "line": 54, "column": 0 } }, - "55": { "start": { "line": 55, "column": 0 }, "end": { "line": 55, "column": 0 } }, - "56": { "start": { "line": 56, "column": 0 }, "end": { "line": 56, "column": 0 } }, - "57": { "start": { "line": 57, "column": 0 }, "end": { "line": 57, "column": 0 } }, - "58": { "start": { "line": 58, "column": 0 }, "end": { "line": 58, "column": 0 } }, - "59": { "start": { "line": 59, "column": 0 }, "end": { "line": 59, "column": 0 } }, - "60": { "start": { "line": 60, "column": 0 }, "end": { "line": 60, "column": 0 } }, - "61": { "start": { "line": 61, "column": 0 }, "end": { "line": 61, "column": 0 } }, - "62": { "start": { "line": 62, "column": 0 }, "end": { "line": 62, "column": 0 } }, - "63": { "start": { "line": 63, "column": 0 }, "end": { "line": 63, "column": 0 } }, - "64": { "start": { "line": 64, "column": 0 }, "end": { "line": 64, "column": 0 } }, - "65": { "start": { "line": 65, "column": 0 }, "end": { "line": 65, "column": 0 } }, - "66": { "start": { "line": 66, "column": 0 }, "end": { "line": 66, "column": 0 } }, - "67": { "start": { "line": 67, "column": 0 }, "end": { "line": 67, "column": 0 } }, - "68": { "start": { "line": 68, "column": 0 }, "end": { "line": 68, "column": 0 } }, - "69": { "start": { "line": 69, "column": 0 }, "end": { "line": 69, "column": 0 } }, - "70": { "start": { "line": 70, "column": 0 }, "end": { "line": 70, "column": 0 } }, - "71": { "start": { "line": 71, "column": 0 }, "end": { "line": 71, "column": 0 } }, - "72": { "start": { "line": 72, "column": 0 }, "end": { "line": 72, "column": 0 } }, - "73": { "start": { "line": 73, "column": 0 }, "end": { "line": 73, "column": 0 } }, - "74": { "start": { "line": 74, "column": 0 }, "end": { "line": 74, "column": 0 } }, - "75": { "start": { "line": 75, "column": 0 }, "end": { "line": 75, "column": 0 } }, - "76": { "start": { "line": 76, "column": 0 }, "end": { "line": 76, "column": 0 } }, - "77": { "start": { "line": 77, "column": 0 }, "end": { "line": 77, "column": 0 } }, - "78": { "start": { "line": 78, "column": 0 }, "end": { "line": 78, "column": 0 } }, - "79": { "start": { "line": 79, "column": 0 }, "end": { "line": 79, "column": 0 } }, - "80": { "start": { "line": 80, "column": 0 }, "end": { "line": 80, "column": 0 } }, - "81": { "start": { "line": 81, "column": 0 }, "end": { "line": 81, "column": 0 } }, - "82": { "start": { "line": 82, "column": 0 }, "end": { "line": 82, "column": 0 } } + "7": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 0 + } + }, + "8": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + }, + "9": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 0 + } + }, + "10": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 0 + } + }, + "11": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + }, + "12": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 0 + } + }, + "13": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 0 + } + }, + "14": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 0 + } + }, + "15": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 0 + } + }, + "16": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 0 + } + }, + "17": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 0 + } + }, + "18": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 0 + } + }, + "19": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 0 + } + }, + "20": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 0 + } + }, + "21": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 0 + } + }, + "22": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 0 + } + }, + "23": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 0 + } + }, + "24": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 0 + } + }, + "25": { + "start": { + "line": 25, + "column": 0 + }, + "end": { + "line": 25, + "column": 0 + } + }, + "26": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 0 + } + }, + "27": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 0 + } + }, + "28": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 0 + } + }, + "29": { + "start": { + "line": 29, + "column": 0 + }, + "end": { + "line": 29, + "column": 0 + } + }, + "30": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 30, + "column": 0 + } + }, + "31": { + "start": { + "line": 31, + "column": 0 + }, + "end": { + "line": 31, + "column": 0 + } + }, + "32": { + "start": { + "line": 32, + "column": 0 + }, + "end": { + "line": 32, + "column": 0 + } + }, + "33": { + "start": { + "line": 33, + "column": 0 + }, + "end": { + "line": 33, + "column": 0 + } + }, + "34": { + "start": { + "line": 34, + "column": 0 + }, + "end": { + "line": 34, + "column": 0 + } + }, + "35": { + "start": { + "line": 35, + "column": 0 + }, + "end": { + "line": 35, + "column": 0 + } + }, + "36": { + "start": { + "line": 36, + "column": 0 + }, + "end": { + "line": 36, + "column": 0 + } + }, + "37": { + "start": { + "line": 37, + "column": 0 + }, + "end": { + "line": 37, + "column": 0 + } + } } } } @@ -286,23 +419,79 @@ will be converted to: ```xml - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` diff --git a/coverage_no_file_exts.json b/coverage_no_file_exts.json index 630a2c9..4ea963a 100644 --- a/coverage_no_file_exts.json +++ b/coverage_no_file_exts.json @@ -1,148 +1,706 @@ { - "no-map/AccountTrigger": { + "no-map/PrepareMySandbox": { "fnMap": {}, "branchMap": {}, - "path": "no-map/AccountTrigger", + "path": "no-map/PrepareMySandbox", "f": {}, "b": {}, "s": { - "52": 0, - "53": 0, - "54": 1, - "55": 1, - "56": 1, - "57": 1, - "58": 1, - "59": 0, - "60": 0, - "61": 1, - "62": 1, - "63": 1, - "64": 1, - "65": 1, - "66": 1, - "67": 1, - "68": 1, - "69": 1, - "70": 1, - "71": 1, - "72": 1, - "73": 1, - "74": 1, - "75": 1, - "76": 1, - "77": 1, - "78": 1, - "79": 1, - "80": 1, - "81": 1, - "82": 1 + "7": 0, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 0, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1, + "21": 1, + "22": 1, + "23": 1, + "24": 1, + "25": 1, + "26": 1, + "27": 1, + "28": 1, + "29": 1, + "30": 1, + "31": 1, + "32": 1, + "33": 1, + "34": 1, + "35": 1, + "36": 1, + "37": 1 }, "statementMap": { - "52": { "start": { "line": 52, "column": 0 }, "end": { "line": 52, "column": 0 } }, - "53": { "start": { "line": 53, "column": 0 }, "end": { "line": 53, "column": 0 } }, - "54": { "start": { "line": 54, "column": 0 }, "end": { "line": 54, "column": 0 } }, - "55": { "start": { "line": 55, "column": 0 }, "end": { "line": 55, "column": 0 } }, - "56": { "start": { "line": 56, "column": 0 }, "end": { "line": 56, "column": 0 } }, - "57": { "start": { "line": 57, "column": 0 }, "end": { "line": 57, "column": 0 } }, - "58": { "start": { "line": 58, "column": 0 }, "end": { "line": 58, "column": 0 } }, - "59": { "start": { "line": 59, "column": 0 }, "end": { "line": 59, "column": 0 } }, - "60": { "start": { "line": 60, "column": 0 }, "end": { "line": 60, "column": 0 } }, - "61": { "start": { "line": 61, "column": 0 }, "end": { "line": 61, "column": 0 } }, - "62": { "start": { "line": 62, "column": 0 }, "end": { "line": 62, "column": 0 } }, - "63": { "start": { "line": 63, "column": 0 }, "end": { "line": 63, "column": 0 } }, - "64": { "start": { "line": 64, "column": 0 }, "end": { "line": 64, "column": 0 } }, - "65": { "start": { "line": 65, "column": 0 }, "end": { "line": 65, "column": 0 } }, - "66": { "start": { "line": 66, "column": 0 }, "end": { "line": 66, "column": 0 } }, - "67": { "start": { "line": 67, "column": 0 }, "end": { "line": 67, "column": 0 } }, - "68": { "start": { "line": 68, "column": 0 }, "end": { "line": 68, "column": 0 } }, - "69": { "start": { "line": 69, "column": 0 }, "end": { "line": 69, "column": 0 } }, - "70": { "start": { "line": 70, "column": 0 }, "end": { "line": 70, "column": 0 } }, - "71": { "start": { "line": 71, "column": 0 }, "end": { "line": 71, "column": 0 } }, - "72": { "start": { "line": 72, "column": 0 }, "end": { "line": 72, "column": 0 } }, - "73": { "start": { "line": 73, "column": 0 }, "end": { "line": 73, "column": 0 } }, - "74": { "start": { "line": 74, "column": 0 }, "end": { "line": 74, "column": 0 } }, - "75": { "start": { "line": 75, "column": 0 }, "end": { "line": 75, "column": 0 } }, - "76": { "start": { "line": 76, "column": 0 }, "end": { "line": 76, "column": 0 } }, - "77": { "start": { "line": 77, "column": 0 }, "end": { "line": 77, "column": 0 } }, - "78": { "start": { "line": 78, "column": 0 }, "end": { "line": 78, "column": 0 } }, - "79": { "start": { "line": 79, "column": 0 }, "end": { "line": 79, "column": 0 } }, - "80": { "start": { "line": 80, "column": 0 }, "end": { "line": 80, "column": 0 } }, - "81": { "start": { "line": 81, "column": 0 }, "end": { "line": 81, "column": 0 } }, - "82": { "start": { "line": 82, "column": 0 }, "end": { "line": 82, "column": 0 } } + "7": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 0 + } + }, + "8": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + }, + "9": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 0 + } + }, + "10": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 0 + } + }, + "11": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + }, + "12": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 0 + } + }, + "13": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 0 + } + }, + "14": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 0 + } + }, + "15": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 0 + } + }, + "16": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 0 + } + }, + "17": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 0 + } + }, + "18": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 0 + } + }, + "19": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 0 + } + }, + "20": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 0 + } + }, + "21": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 0 + } + }, + "22": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 0 + } + }, + "23": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 0 + } + }, + "24": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 0 + } + }, + "25": { + "start": { + "line": 25, + "column": 0 + }, + "end": { + "line": 25, + "column": 0 + } + }, + "26": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 0 + } + }, + "27": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 0 + } + }, + "28": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 0 + } + }, + "29": { + "start": { + "line": 29, + "column": 0 + }, + "end": { + "line": 29, + "column": 0 + } + }, + "30": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 30, + "column": 0 + } + }, + "31": { + "start": { + "line": 31, + "column": 0 + }, + "end": { + "line": 31, + "column": 0 + } + }, + "32": { + "start": { + "line": 32, + "column": 0 + }, + "end": { + "line": 32, + "column": 0 + } + }, + "33": { + "start": { + "line": 33, + "column": 0 + }, + "end": { + "line": 33, + "column": 0 + } + }, + "34": { + "start": { + "line": 34, + "column": 0 + }, + "end": { + "line": 34, + "column": 0 + } + }, + "35": { + "start": { + "line": 35, + "column": 0 + }, + "end": { + "line": 35, + "column": 0 + } + }, + "36": { + "start": { + "line": 36, + "column": 0 + }, + "end": { + "line": 36, + "column": 0 + } + }, + "37": { + "start": { + "line": 37, + "column": 0 + }, + "end": { + "line": 37, + "column": 0 + } + } } }, - "no-map/AccountProfile": { + "no-map/AccountTrigger": { "fnMap": {}, "branchMap": {}, - "path": "no-map/AccountProfile", + "path": "no-map/AccountTrigger", "f": {}, "b": {}, "s": { - "52": 0, - "53": 0, - "54": 1, - "55": 1, - "56": 1, - "57": 1, - "58": 1, - "59": 0, - "60": 0, - "61": 1, - "62": 1, - "63": 1, - "64": 1, - "65": 1, - "66": 1, - "67": 1, - "68": 1, - "69": 1, - "70": 1, - "71": 1, - "72": 1, - "73": 1, - "74": 1, - "75": 1, - "76": 1, - "77": 1, - "78": 1, - "79": 1, - "80": 1, - "81": 1, - "82": 1 + "7": 0, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 0, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1, + "21": 1, + "22": 1, + "23": 1, + "24": 1, + "25": 1, + "26": 1, + "27": 1, + "28": 1, + "29": 1, + "30": 1, + "31": 1, + "32": 1, + "33": 1, + "34": 1, + "35": 1, + "36": 1, + "37": 1 }, "statementMap": { - "52": { "start": { "line": 52, "column": 0 }, "end": { "line": 52, "column": 0 } }, - "53": { "start": { "line": 53, "column": 0 }, "end": { "line": 53, "column": 0 } }, - "54": { "start": { "line": 54, "column": 0 }, "end": { "line": 54, "column": 0 } }, - "55": { "start": { "line": 55, "column": 0 }, "end": { "line": 55, "column": 0 } }, - "56": { "start": { "line": 56, "column": 0 }, "end": { "line": 56, "column": 0 } }, - "57": { "start": { "line": 57, "column": 0 }, "end": { "line": 57, "column": 0 } }, - "58": { "start": { "line": 58, "column": 0 }, "end": { "line": 58, "column": 0 } }, - "59": { "start": { "line": 59, "column": 0 }, "end": { "line": 59, "column": 0 } }, - "60": { "start": { "line": 60, "column": 0 }, "end": { "line": 60, "column": 0 } }, - "61": { "start": { "line": 61, "column": 0 }, "end": { "line": 61, "column": 0 } }, - "62": { "start": { "line": 62, "column": 0 }, "end": { "line": 62, "column": 0 } }, - "63": { "start": { "line": 63, "column": 0 }, "end": { "line": 63, "column": 0 } }, - "64": { "start": { "line": 64, "column": 0 }, "end": { "line": 64, "column": 0 } }, - "65": { "start": { "line": 65, "column": 0 }, "end": { "line": 65, "column": 0 } }, - "66": { "start": { "line": 66, "column": 0 }, "end": { "line": 66, "column": 0 } }, - "67": { "start": { "line": 67, "column": 0 }, "end": { "line": 67, "column": 0 } }, - "68": { "start": { "line": 68, "column": 0 }, "end": { "line": 68, "column": 0 } }, - "69": { "start": { "line": 69, "column": 0 }, "end": { "line": 69, "column": 0 } }, - "70": { "start": { "line": 70, "column": 0 }, "end": { "line": 70, "column": 0 } }, - "71": { "start": { "line": 71, "column": 0 }, "end": { "line": 71, "column": 0 } }, - "72": { "start": { "line": 72, "column": 0 }, "end": { "line": 72, "column": 0 } }, - "73": { "start": { "line": 73, "column": 0 }, "end": { "line": 73, "column": 0 } }, - "74": { "start": { "line": 74, "column": 0 }, "end": { "line": 74, "column": 0 } }, - "75": { "start": { "line": 75, "column": 0 }, "end": { "line": 75, "column": 0 } }, - "76": { "start": { "line": 76, "column": 0 }, "end": { "line": 76, "column": 0 } }, - "77": { "start": { "line": 77, "column": 0 }, "end": { "line": 77, "column": 0 } }, - "78": { "start": { "line": 78, "column": 0 }, "end": { "line": 78, "column": 0 } }, - "79": { "start": { "line": 79, "column": 0 }, "end": { "line": 79, "column": 0 } }, - "80": { "start": { "line": 80, "column": 0 }, "end": { "line": 80, "column": 0 } }, - "81": { "start": { "line": 81, "column": 0 }, "end": { "line": 81, "column": 0 } }, - "82": { "start": { "line": 82, "column": 0 }, "end": { "line": 82, "column": 0 } } + "7": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 0 + } + }, + "8": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + }, + "9": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 0 + } + }, + "10": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 0 + } + }, + "11": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + }, + "12": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 0 + } + }, + "13": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 0 + } + }, + "14": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 0 + } + }, + "15": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 0 + } + }, + "16": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 0 + } + }, + "17": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 0 + } + }, + "18": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 0 + } + }, + "19": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 0 + } + }, + "20": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 0 + } + }, + "21": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 0 + } + }, + "22": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 0 + } + }, + "23": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 0 + } + }, + "24": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 0 + } + }, + "25": { + "start": { + "line": 25, + "column": 0 + }, + "end": { + "line": 25, + "column": 0 + } + }, + "26": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 0 + } + }, + "27": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 0 + } + }, + "28": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 0 + } + }, + "29": { + "start": { + "line": 29, + "column": 0 + }, + "end": { + "line": 29, + "column": 0 + } + }, + "30": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 30, + "column": 0 + } + }, + "31": { + "start": { + "line": 31, + "column": 0 + }, + "end": { + "line": 31, + "column": 0 + } + }, + "32": { + "start": { + "line": 32, + "column": 0 + }, + "end": { + "line": 32, + "column": 0 + } + }, + "33": { + "start": { + "line": 33, + "column": 0 + }, + "end": { + "line": 33, + "column": 0 + } + }, + "34": { + "start": { + "line": 34, + "column": 0 + }, + "end": { + "line": 34, + "column": 0 + } + }, + "35": { + "start": { + "line": 35, + "column": 0 + }, + "end": { + "line": 35, + "column": 0 + } + }, + "36": { + "start": { + "line": 36, + "column": 0 + }, + "end": { + "line": 36, + "column": 0 + } + }, + "37": { + "start": { + "line": 37, + "column": 0 + }, + "end": { + "line": 37, + "column": 0 + } + } } }, "no-map/Get_Info": { @@ -152,70 +710,349 @@ "f": {}, "b": {}, "s": { - "52": 0, - "53": 0, - "54": 1, - "55": 1, - "56": 1, - "57": 1, - "58": 1, - "59": 0, - "60": 0, - "61": 1, - "62": 1, - "63": 1, - "64": 1, - "65": 1, - "66": 1, - "67": 1, - "68": 1, - "69": 1, - "70": 1, - "71": 1, - "72": 1, - "73": 1, - "74": 1, - "75": 1, - "76": 1, - "77": 1, - "78": 1, - "79": 1, - "80": 1, - "81": 1, - "82": 1 + "7": 0, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 0, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1, + "21": 1, + "22": 1, + "23": 1, + "24": 1, + "25": 1, + "26": 1, + "27": 1, + "28": 1, + "29": 1, + "30": 1, + "31": 1, + "32": 1, + "33": 1, + "34": 1, + "35": 1, + "36": 1, + "37": 1 }, "statementMap": { - "52": { "start": { "line": 52, "column": 0 }, "end": { "line": 52, "column": 0 } }, - "53": { "start": { "line": 53, "column": 0 }, "end": { "line": 53, "column": 0 } }, - "54": { "start": { "line": 54, "column": 0 }, "end": { "line": 54, "column": 0 } }, - "55": { "start": { "line": 55, "column": 0 }, "end": { "line": 55, "column": 0 } }, - "56": { "start": { "line": 56, "column": 0 }, "end": { "line": 56, "column": 0 } }, - "57": { "start": { "line": 57, "column": 0 }, "end": { "line": 57, "column": 0 } }, - "58": { "start": { "line": 58, "column": 0 }, "end": { "line": 58, "column": 0 } }, - "59": { "start": { "line": 59, "column": 0 }, "end": { "line": 59, "column": 0 } }, - "60": { "start": { "line": 60, "column": 0 }, "end": { "line": 60, "column": 0 } }, - "61": { "start": { "line": 61, "column": 0 }, "end": { "line": 61, "column": 0 } }, - "62": { "start": { "line": 62, "column": 0 }, "end": { "line": 62, "column": 0 } }, - "63": { "start": { "line": 63, "column": 0 }, "end": { "line": 63, "column": 0 } }, - "64": { "start": { "line": 64, "column": 0 }, "end": { "line": 64, "column": 0 } }, - "65": { "start": { "line": 65, "column": 0 }, "end": { "line": 65, "column": 0 } }, - "66": { "start": { "line": 66, "column": 0 }, "end": { "line": 66, "column": 0 } }, - "67": { "start": { "line": 67, "column": 0 }, "end": { "line": 67, "column": 0 } }, - "68": { "start": { "line": 68, "column": 0 }, "end": { "line": 68, "column": 0 } }, - "69": { "start": { "line": 69, "column": 0 }, "end": { "line": 69, "column": 0 } }, - "70": { "start": { "line": 70, "column": 0 }, "end": { "line": 70, "column": 0 } }, - "71": { "start": { "line": 71, "column": 0 }, "end": { "line": 71, "column": 0 } }, - "72": { "start": { "line": 72, "column": 0 }, "end": { "line": 72, "column": 0 } }, - "73": { "start": { "line": 73, "column": 0 }, "end": { "line": 73, "column": 0 } }, - "74": { "start": { "line": 74, "column": 0 }, "end": { "line": 74, "column": 0 } }, - "75": { "start": { "line": 75, "column": 0 }, "end": { "line": 75, "column": 0 } }, - "76": { "start": { "line": 76, "column": 0 }, "end": { "line": 76, "column": 0 } }, - "77": { "start": { "line": 77, "column": 0 }, "end": { "line": 77, "column": 0 } }, - "78": { "start": { "line": 78, "column": 0 }, "end": { "line": 78, "column": 0 } }, - "79": { "start": { "line": 79, "column": 0 }, "end": { "line": 79, "column": 0 } }, - "80": { "start": { "line": 80, "column": 0 }, "end": { "line": 80, "column": 0 } }, - "81": { "start": { "line": 81, "column": 0 }, "end": { "line": 81, "column": 0 } }, - "82": { "start": { "line": 82, "column": 0 }, "end": { "line": 82, "column": 0 } } + "7": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 0 + } + }, + "8": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + }, + "9": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 0 + } + }, + "10": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 0 + } + }, + "11": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + }, + "12": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 0 + } + }, + "13": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 0 + } + }, + "14": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 0 + } + }, + "15": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 0 + } + }, + "16": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 0 + } + }, + "17": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 0 + } + }, + "18": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 0 + } + }, + "19": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 0 + } + }, + "20": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 0 + } + }, + "21": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 0 + } + }, + "22": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 0 + } + }, + "23": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 0 + } + }, + "24": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 0 + } + }, + "25": { + "start": { + "line": 25, + "column": 0 + }, + "end": { + "line": 25, + "column": 0 + } + }, + "26": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 0 + } + }, + "27": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 0 + } + }, + "28": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 0 + } + }, + "29": { + "start": { + "line": 29, + "column": 0 + }, + "end": { + "line": 29, + "column": 0 + } + }, + "30": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 30, + "column": 0 + } + }, + "31": { + "start": { + "line": 31, + "column": 0 + }, + "end": { + "line": 31, + "column": 0 + } + }, + "32": { + "start": { + "line": 32, + "column": 0 + }, + "end": { + "line": 32, + "column": 0 + } + }, + "33": { + "start": { + "line": 33, + "column": 0 + }, + "end": { + "line": 33, + "column": 0 + } + }, + "34": { + "start": { + "line": 34, + "column": 0 + }, + "end": { + "line": 34, + "column": 0 + } + }, + "35": { + "start": { + "line": 35, + "column": 0 + }, + "end": { + "line": 35, + "column": 0 + } + }, + "36": { + "start": { + "line": 36, + "column": 0 + }, + "end": { + "line": 36, + "column": 0 + } + }, + "37": { + "start": { + "line": 37, + "column": 0 + }, + "end": { + "line": 37, + "column": 0 + } + } } } -} +} \ No newline at end of file diff --git a/coverage_with_file_exts.json b/coverage_with_file_exts.json index bb047d2..ff74d54 100644 --- a/coverage_with_file_exts.json +++ b/coverage_with_file_exts.json @@ -1,148 +1,706 @@ { - "no-map/AccountTrigger.trigger": { + "no-map/PrepareMySandbox.cls": { "fnMap": {}, "branchMap": {}, - "path": "no-map/AccountTrigger.trigger", + "path": "no-map/PrepareMySandbox.cls", "f": {}, "b": {}, "s": { - "52": 0, - "53": 0, - "54": 1, - "55": 1, - "56": 1, - "57": 1, - "58": 1, - "59": 0, - "60": 0, - "61": 1, - "62": 1, - "63": 1, - "64": 1, - "65": 1, - "66": 1, - "67": 1, - "68": 1, - "69": 1, - "70": 1, - "71": 1, - "72": 1, - "73": 1, - "74": 1, - "75": 1, - "76": 1, - "77": 1, - "78": 1, - "79": 1, - "80": 1, - "81": 1, - "82": 1 + "7": 0, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 0, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1, + "21": 1, + "22": 1, + "23": 1, + "24": 1, + "25": 1, + "26": 1, + "27": 1, + "28": 1, + "29": 1, + "30": 1, + "31": 1, + "32": 1, + "33": 1, + "34": 1, + "35": 1, + "36": 1, + "37": 1 }, "statementMap": { - "52": { "start": { "line": 52, "column": 0 }, "end": { "line": 52, "column": 0 } }, - "53": { "start": { "line": 53, "column": 0 }, "end": { "line": 53, "column": 0 } }, - "54": { "start": { "line": 54, "column": 0 }, "end": { "line": 54, "column": 0 } }, - "55": { "start": { "line": 55, "column": 0 }, "end": { "line": 55, "column": 0 } }, - "56": { "start": { "line": 56, "column": 0 }, "end": { "line": 56, "column": 0 } }, - "57": { "start": { "line": 57, "column": 0 }, "end": { "line": 57, "column": 0 } }, - "58": { "start": { "line": 58, "column": 0 }, "end": { "line": 58, "column": 0 } }, - "59": { "start": { "line": 59, "column": 0 }, "end": { "line": 59, "column": 0 } }, - "60": { "start": { "line": 60, "column": 0 }, "end": { "line": 60, "column": 0 } }, - "61": { "start": { "line": 61, "column": 0 }, "end": { "line": 61, "column": 0 } }, - "62": { "start": { "line": 62, "column": 0 }, "end": { "line": 62, "column": 0 } }, - "63": { "start": { "line": 63, "column": 0 }, "end": { "line": 63, "column": 0 } }, - "64": { "start": { "line": 64, "column": 0 }, "end": { "line": 64, "column": 0 } }, - "65": { "start": { "line": 65, "column": 0 }, "end": { "line": 65, "column": 0 } }, - "66": { "start": { "line": 66, "column": 0 }, "end": { "line": 66, "column": 0 } }, - "67": { "start": { "line": 67, "column": 0 }, "end": { "line": 67, "column": 0 } }, - "68": { "start": { "line": 68, "column": 0 }, "end": { "line": 68, "column": 0 } }, - "69": { "start": { "line": 69, "column": 0 }, "end": { "line": 69, "column": 0 } }, - "70": { "start": { "line": 70, "column": 0 }, "end": { "line": 70, "column": 0 } }, - "71": { "start": { "line": 71, "column": 0 }, "end": { "line": 71, "column": 0 } }, - "72": { "start": { "line": 72, "column": 0 }, "end": { "line": 72, "column": 0 } }, - "73": { "start": { "line": 73, "column": 0 }, "end": { "line": 73, "column": 0 } }, - "74": { "start": { "line": 74, "column": 0 }, "end": { "line": 74, "column": 0 } }, - "75": { "start": { "line": 75, "column": 0 }, "end": { "line": 75, "column": 0 } }, - "76": { "start": { "line": 76, "column": 0 }, "end": { "line": 76, "column": 0 } }, - "77": { "start": { "line": 77, "column": 0 }, "end": { "line": 77, "column": 0 } }, - "78": { "start": { "line": 78, "column": 0 }, "end": { "line": 78, "column": 0 } }, - "79": { "start": { "line": 79, "column": 0 }, "end": { "line": 79, "column": 0 } }, - "80": { "start": { "line": 80, "column": 0 }, "end": { "line": 80, "column": 0 } }, - "81": { "start": { "line": 81, "column": 0 }, "end": { "line": 81, "column": 0 } }, - "82": { "start": { "line": 82, "column": 0 }, "end": { "line": 82, "column": 0 } } + "7": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 0 + } + }, + "8": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + }, + "9": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 0 + } + }, + "10": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 0 + } + }, + "11": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + }, + "12": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 0 + } + }, + "13": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 0 + } + }, + "14": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 0 + } + }, + "15": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 0 + } + }, + "16": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 0 + } + }, + "17": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 0 + } + }, + "18": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 0 + } + }, + "19": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 0 + } + }, + "20": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 0 + } + }, + "21": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 0 + } + }, + "22": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 0 + } + }, + "23": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 0 + } + }, + "24": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 0 + } + }, + "25": { + "start": { + "line": 25, + "column": 0 + }, + "end": { + "line": 25, + "column": 0 + } + }, + "26": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 0 + } + }, + "27": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 0 + } + }, + "28": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 0 + } + }, + "29": { + "start": { + "line": 29, + "column": 0 + }, + "end": { + "line": 29, + "column": 0 + } + }, + "30": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 30, + "column": 0 + } + }, + "31": { + "start": { + "line": 31, + "column": 0 + }, + "end": { + "line": 31, + "column": 0 + } + }, + "32": { + "start": { + "line": 32, + "column": 0 + }, + "end": { + "line": 32, + "column": 0 + } + }, + "33": { + "start": { + "line": 33, + "column": 0 + }, + "end": { + "line": 33, + "column": 0 + } + }, + "34": { + "start": { + "line": 34, + "column": 0 + }, + "end": { + "line": 34, + "column": 0 + } + }, + "35": { + "start": { + "line": 35, + "column": 0 + }, + "end": { + "line": 35, + "column": 0 + } + }, + "36": { + "start": { + "line": 36, + "column": 0 + }, + "end": { + "line": 36, + "column": 0 + } + }, + "37": { + "start": { + "line": 37, + "column": 0 + }, + "end": { + "line": 37, + "column": 0 + } + } } }, - "no-map/AccountProfile.cls": { + "no-map/AccountTrigger.trigger": { "fnMap": {}, "branchMap": {}, - "path": "no-map/AccountProfile.cls", + "path": "no-map/AccountTrigger.trigger", "f": {}, "b": {}, "s": { - "52": 0, - "53": 0, - "54": 1, - "55": 1, - "56": 1, - "57": 1, - "58": 1, - "59": 0, - "60": 0, - "61": 1, - "62": 1, - "63": 1, - "64": 1, - "65": 1, - "66": 1, - "67": 1, - "68": 1, - "69": 1, - "70": 1, - "71": 1, - "72": 1, - "73": 1, - "74": 1, - "75": 1, - "76": 1, - "77": 1, - "78": 1, - "79": 1, - "80": 1, - "81": 1, - "82": 1 + "7": 0, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 0, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1, + "21": 1, + "22": 1, + "23": 1, + "24": 1, + "25": 1, + "26": 1, + "27": 1, + "28": 1, + "29": 1, + "30": 1, + "31": 1, + "32": 1, + "33": 1, + "34": 1, + "35": 1, + "36": 1, + "37": 1 }, "statementMap": { - "52": { "start": { "line": 52, "column": 0 }, "end": { "line": 52, "column": 0 } }, - "53": { "start": { "line": 53, "column": 0 }, "end": { "line": 53, "column": 0 } }, - "54": { "start": { "line": 54, "column": 0 }, "end": { "line": 54, "column": 0 } }, - "55": { "start": { "line": 55, "column": 0 }, "end": { "line": 55, "column": 0 } }, - "56": { "start": { "line": 56, "column": 0 }, "end": { "line": 56, "column": 0 } }, - "57": { "start": { "line": 57, "column": 0 }, "end": { "line": 57, "column": 0 } }, - "58": { "start": { "line": 58, "column": 0 }, "end": { "line": 58, "column": 0 } }, - "59": { "start": { "line": 59, "column": 0 }, "end": { "line": 59, "column": 0 } }, - "60": { "start": { "line": 60, "column": 0 }, "end": { "line": 60, "column": 0 } }, - "61": { "start": { "line": 61, "column": 0 }, "end": { "line": 61, "column": 0 } }, - "62": { "start": { "line": 62, "column": 0 }, "end": { "line": 62, "column": 0 } }, - "63": { "start": { "line": 63, "column": 0 }, "end": { "line": 63, "column": 0 } }, - "64": { "start": { "line": 64, "column": 0 }, "end": { "line": 64, "column": 0 } }, - "65": { "start": { "line": 65, "column": 0 }, "end": { "line": 65, "column": 0 } }, - "66": { "start": { "line": 66, "column": 0 }, "end": { "line": 66, "column": 0 } }, - "67": { "start": { "line": 67, "column": 0 }, "end": { "line": 67, "column": 0 } }, - "68": { "start": { "line": 68, "column": 0 }, "end": { "line": 68, "column": 0 } }, - "69": { "start": { "line": 69, "column": 0 }, "end": { "line": 69, "column": 0 } }, - "70": { "start": { "line": 70, "column": 0 }, "end": { "line": 70, "column": 0 } }, - "71": { "start": { "line": 71, "column": 0 }, "end": { "line": 71, "column": 0 } }, - "72": { "start": { "line": 72, "column": 0 }, "end": { "line": 72, "column": 0 } }, - "73": { "start": { "line": 73, "column": 0 }, "end": { "line": 73, "column": 0 } }, - "74": { "start": { "line": 74, "column": 0 }, "end": { "line": 74, "column": 0 } }, - "75": { "start": { "line": 75, "column": 0 }, "end": { "line": 75, "column": 0 } }, - "76": { "start": { "line": 76, "column": 0 }, "end": { "line": 76, "column": 0 } }, - "77": { "start": { "line": 77, "column": 0 }, "end": { "line": 77, "column": 0 } }, - "78": { "start": { "line": 78, "column": 0 }, "end": { "line": 78, "column": 0 } }, - "79": { "start": { "line": 79, "column": 0 }, "end": { "line": 79, "column": 0 } }, - "80": { "start": { "line": 80, "column": 0 }, "end": { "line": 80, "column": 0 } }, - "81": { "start": { "line": 81, "column": 0 }, "end": { "line": 81, "column": 0 } }, - "82": { "start": { "line": 82, "column": 0 }, "end": { "line": 82, "column": 0 } } + "7": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 0 + } + }, + "8": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + }, + "9": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 0 + } + }, + "10": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 0 + } + }, + "11": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + }, + "12": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 0 + } + }, + "13": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 0 + } + }, + "14": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 0 + } + }, + "15": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 0 + } + }, + "16": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 0 + } + }, + "17": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 0 + } + }, + "18": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 0 + } + }, + "19": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 0 + } + }, + "20": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 0 + } + }, + "21": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 0 + } + }, + "22": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 0 + } + }, + "23": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 0 + } + }, + "24": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 0 + } + }, + "25": { + "start": { + "line": 25, + "column": 0 + }, + "end": { + "line": 25, + "column": 0 + } + }, + "26": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 0 + } + }, + "27": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 0 + } + }, + "28": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 0 + } + }, + "29": { + "start": { + "line": 29, + "column": 0 + }, + "end": { + "line": 29, + "column": 0 + } + }, + "30": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 30, + "column": 0 + } + }, + "31": { + "start": { + "line": 31, + "column": 0 + }, + "end": { + "line": 31, + "column": 0 + } + }, + "32": { + "start": { + "line": 32, + "column": 0 + }, + "end": { + "line": 32, + "column": 0 + } + }, + "33": { + "start": { + "line": 33, + "column": 0 + }, + "end": { + "line": 33, + "column": 0 + } + }, + "34": { + "start": { + "line": 34, + "column": 0 + }, + "end": { + "line": 34, + "column": 0 + } + }, + "35": { + "start": { + "line": 35, + "column": 0 + }, + "end": { + "line": 35, + "column": 0 + } + }, + "36": { + "start": { + "line": 36, + "column": 0 + }, + "end": { + "line": 36, + "column": 0 + } + }, + "37": { + "start": { + "line": 37, + "column": 0 + }, + "end": { + "line": 37, + "column": 0 + } + } } }, "no-map/Get_Info.flow-meta.xml": { @@ -152,70 +710,349 @@ "f": {}, "b": {}, "s": { - "52": 0, - "53": 0, - "54": 1, - "55": 1, - "56": 1, - "57": 1, - "58": 1, - "59": 0, - "60": 0, - "61": 1, - "62": 1, - "63": 1, - "64": 1, - "65": 1, - "66": 1, - "67": 1, - "68": 1, - "69": 1, - "70": 1, - "71": 1, - "72": 1, - "73": 1, - "74": 1, - "75": 1, - "76": 1, - "77": 1, - "78": 1, - "79": 1, - "80": 1, - "81": 1, - "82": 1 + "7": 0, + "8": 1, + "9": 1, + "10": 1, + "11": 1, + "12": 0, + "13": 1, + "14": 1, + "15": 1, + "16": 1, + "17": 1, + "18": 1, + "19": 1, + "20": 1, + "21": 1, + "22": 1, + "23": 1, + "24": 1, + "25": 1, + "26": 1, + "27": 1, + "28": 1, + "29": 1, + "30": 1, + "31": 1, + "32": 1, + "33": 1, + "34": 1, + "35": 1, + "36": 1, + "37": 1 }, "statementMap": { - "52": { "start": { "line": 52, "column": 0 }, "end": { "line": 52, "column": 0 } }, - "53": { "start": { "line": 53, "column": 0 }, "end": { "line": 53, "column": 0 } }, - "54": { "start": { "line": 54, "column": 0 }, "end": { "line": 54, "column": 0 } }, - "55": { "start": { "line": 55, "column": 0 }, "end": { "line": 55, "column": 0 } }, - "56": { "start": { "line": 56, "column": 0 }, "end": { "line": 56, "column": 0 } }, - "57": { "start": { "line": 57, "column": 0 }, "end": { "line": 57, "column": 0 } }, - "58": { "start": { "line": 58, "column": 0 }, "end": { "line": 58, "column": 0 } }, - "59": { "start": { "line": 59, "column": 0 }, "end": { "line": 59, "column": 0 } }, - "60": { "start": { "line": 60, "column": 0 }, "end": { "line": 60, "column": 0 } }, - "61": { "start": { "line": 61, "column": 0 }, "end": { "line": 61, "column": 0 } }, - "62": { "start": { "line": 62, "column": 0 }, "end": { "line": 62, "column": 0 } }, - "63": { "start": { "line": 63, "column": 0 }, "end": { "line": 63, "column": 0 } }, - "64": { "start": { "line": 64, "column": 0 }, "end": { "line": 64, "column": 0 } }, - "65": { "start": { "line": 65, "column": 0 }, "end": { "line": 65, "column": 0 } }, - "66": { "start": { "line": 66, "column": 0 }, "end": { "line": 66, "column": 0 } }, - "67": { "start": { "line": 67, "column": 0 }, "end": { "line": 67, "column": 0 } }, - "68": { "start": { "line": 68, "column": 0 }, "end": { "line": 68, "column": 0 } }, - "69": { "start": { "line": 69, "column": 0 }, "end": { "line": 69, "column": 0 } }, - "70": { "start": { "line": 70, "column": 0 }, "end": { "line": 70, "column": 0 } }, - "71": { "start": { "line": 71, "column": 0 }, "end": { "line": 71, "column": 0 } }, - "72": { "start": { "line": 72, "column": 0 }, "end": { "line": 72, "column": 0 } }, - "73": { "start": { "line": 73, "column": 0 }, "end": { "line": 73, "column": 0 } }, - "74": { "start": { "line": 74, "column": 0 }, "end": { "line": 74, "column": 0 } }, - "75": { "start": { "line": 75, "column": 0 }, "end": { "line": 75, "column": 0 } }, - "76": { "start": { "line": 76, "column": 0 }, "end": { "line": 76, "column": 0 } }, - "77": { "start": { "line": 77, "column": 0 }, "end": { "line": 77, "column": 0 } }, - "78": { "start": { "line": 78, "column": 0 }, "end": { "line": 78, "column": 0 } }, - "79": { "start": { "line": 79, "column": 0 }, "end": { "line": 79, "column": 0 } }, - "80": { "start": { "line": 80, "column": 0 }, "end": { "line": 80, "column": 0 } }, - "81": { "start": { "line": 81, "column": 0 }, "end": { "line": 81, "column": 0 } }, - "82": { "start": { "line": 82, "column": 0 }, "end": { "line": 82, "column": 0 } } + "7": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 0 + } + }, + "8": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + }, + "9": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 0 + } + }, + "10": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 0 + } + }, + "11": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + }, + "12": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 0 + } + }, + "13": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 0 + } + }, + "14": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 0 + } + }, + "15": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 0 + } + }, + "16": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 0 + } + }, + "17": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 17, + "column": 0 + } + }, + "18": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 0 + } + }, + "19": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 0 + } + }, + "20": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 0 + } + }, + "21": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 0 + } + }, + "22": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 0 + } + }, + "23": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 0 + } + }, + "24": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 0 + } + }, + "25": { + "start": { + "line": 25, + "column": 0 + }, + "end": { + "line": 25, + "column": 0 + } + }, + "26": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 0 + } + }, + "27": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 0 + } + }, + "28": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 0 + } + }, + "29": { + "start": { + "line": 29, + "column": 0 + }, + "end": { + "line": 29, + "column": 0 + } + }, + "30": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 30, + "column": 0 + } + }, + "31": { + "start": { + "line": 31, + "column": 0 + }, + "end": { + "line": 31, + "column": 0 + } + }, + "32": { + "start": { + "line": 32, + "column": 0 + }, + "end": { + "line": 32, + "column": 0 + } + }, + "33": { + "start": { + "line": 33, + "column": 0 + }, + "end": { + "line": 33, + "column": 0 + } + }, + "34": { + "start": { + "line": 34, + "column": 0 + }, + "end": { + "line": 34, + "column": 0 + } + }, + "35": { + "start": { + "line": 35, + "column": 0 + }, + "end": { + "line": 35, + "column": 0 + } + }, + "36": { + "start": { + "line": 36, + "column": 0 + }, + "end": { + "line": 36, + "column": 0 + } + }, + "37": { + "start": { + "line": 37, + "column": 0 + }, + "end": { + "line": 37, + "column": 0 + } + } } } -} +} \ No newline at end of file diff --git a/force-app/main/default/classes/PrepareMySandbox.cls b/force-app/main/default/classes/PrepareMySandbox.cls new file mode 100644 index 0000000..9b0951e --- /dev/null +++ b/force-app/main/default/classes/PrepareMySandbox.cls @@ -0,0 +1,72 @@ +global class PrepareMySandbox implements SandboxPostCopy { + global PrepareMySandbox() { + // Implementations of SandboxPostCopy must have a no-arg constructor. + // This constructor is used during the sandbox copy process. + } + + global void runApexClass(SandboxContext context) { + System.debug('Org ID: ' + context.organizationId()); + System.debug('Sandbox ID: ' + context.sandboxId()); + System.debug('Sandbox Name: ' + context.sandboxName()); + + updateProfilesAndResetPasswordsForPublicGroupMembers(); + // Additional logic to prepare the sandbox for use can be added here. + } + + public void updateProfilesAndResetPasswordsForPublicGroupMembers() { + String publicGroupId = '00G5a000003ji0R'; + String newProfileId = '00e0b000001KWuY'; + + Group publicGroup = getPublicGroup(publicGroupId); + + if (publicGroup != null) { + List usersToUpdate = getUsersToUpdate(publicGroup, newProfileId); + + if (!usersToUpdate.isEmpty()) { + update usersToUpdate; + System.debug('Profile updated for ' + usersToUpdate.size() + ' users.'); + + // Reset passwords for updated users + resetPasswords(usersToUpdate); + } else { + System.debug('No eligible active users found in the Public Group.'); + } + } else { + System.debug('Public Group not found.'); + } + } + + private Group getPublicGroup(String groupId) { + return [SELECT Id FROM Group WHERE Id = :groupId LIMIT 1]; + } + + private List getUsersToUpdate(Group publicGroup, String newProfileId) { + List usersToUpdate = new List(); + Set userIds = new Set(); + + // Get the current running User's Id + Id currentUserId = UserInfo.getUserId(); + + for (GroupMember member : [SELECT UserOrGroupId FROM GroupMember WHERE GroupId = :publicGroup.Id]) { + Id userOrGroupId = member.UserOrGroupId; + if (userOrGroupId != null && userOrGroupId.getSObjectType() == User.SObjectType && userOrGroupId != currentUserId) { + userIds.add(userOrGroupId); + } + } + + // Query and update active User profiles + for (User user : [SELECT Id, ProfileId FROM User WHERE Id IN :userIds AND IsActive = true]) { + user.ProfileId = newProfileId; + usersToUpdate.add(user); + } + + return usersToUpdate; + } + + private void resetPasswords(List users) { + for (User u : users) { + System.resetPassword(u.Id, true); // The second parameter generates a new password and sends an email + } + System.debug('Passwords reset for ' + users.size() + ' users.'); + } +} \ No newline at end of file diff --git a/force-app/main/default/flows/Get_Info.flow-meta.xml b/force-app/main/default/flows/Get_Info.flow-meta.xml new file mode 100644 index 0000000..b1dab05 --- /dev/null +++ b/force-app/main/default/flows/Get_Info.flow-meta.xml @@ -0,0 +1,343 @@ + + + + Get_Info + + 380 + 242 + GetFirstFromCollection + apex + + Update_If_Existing + + + T__inputCollection + Account + + + U__outputMember + Account + + CurrentTransaction + + inputCollection + + accts.accounts + + + GetFirstFromCollection + true + 1 + + + Post_to_Contact_s_Feed + + 50 + 890 + chatterPost + chatterPost + + Confirm + + CurrentTransaction + + text + + chatterMessage + + + + subjectNameOrId + + contact.Id + + + chatterPost + true + 1 + + + Set_Contact_ID + + 50 + 674 + + contact.Id + Assign + + existingId + + + + Update_Contact + + + + Update_If_Existing + + 380 + 350 + + true + Create_Contact + + No + + Update_Yes + and + + updateExisting + EqualTo + + true + + + + Find_a_Match + + + + + + Update_or_Create + + 182 + 566 + + Create_Contact + + Create New + + Update_Existing + and + + existingId + IsNull + + false + + + + Set_Contact_ID + + + + + + accounts + String + Name + Account + + contact.AccountId + Id + + Id + + + created_or_updated + String + IF({!Create_Contact}, "created", "updated") + + 49.0 + Default + New Contact {!$Flow.CurrentDateTime} + true + true + + Flow + Draft + + BuilderType + + LightningFlowBuilder + + + + CanvasMode + + AUTO_LAYOUT_CANVAS + + + + OriginBuilderType + + LightningFlowBuilder + + + + Create_Contact + + 314 + 674 + + true + Post_to_Contact_s_Feed + + contact + + + Find_a_Match + + 182 + 458 + true + + Update_or_Create + + and + + FirstName + EqualTo + + contact.FirstName + + + + LastName + EqualTo + + contact.LastName + + + Contact + + existingId + Id + + + + Update_Contact + + 50 + 782 + + Post_to_Contact_s_Feed + + contact + + + Confirm + + 50 + 998 + false + true + true + + confirmation_message + Thanks! <a href="/{!contact.Id}">The contact</a> was {!created_or_updated}. + DisplayText + + true + true + + + Contact_Info + + 380 + 134 + true + true + true + + Get_Info + + + contactName + flowruntime:name + ComponentInstance + UseStoredValues + true + + contact.FirstName + firstName + + + contact.LastName + lastName + + + + Account + accounts + String + Account + DropdownBox + true + + + update_toggle + flowruntime:toggle + ComponentInstance + + label + + If this contact already exists, update the existing record. + + + + messageToggleActive + + Update existing + + + + messageToggleInactive + + Create other contact + + + UseStoredValues + true + + updateExisting + value + + + true + true + + + 254 + 0 + + Contact_Info + + + + chatterMessage + false + The contact was {!created_or_updated}. + + + accts + ComplexObjectExample + Apex + false + false + false + + + contact + SObject + false + false + false + Contact + + + existingId + String + false + false + false + + + updateExisting + Boolean + false + false + false + + \ No newline at end of file diff --git a/force-app/main/default/triggers/AccountTrigger.trigger b/force-app/main/default/triggers/AccountTrigger.trigger new file mode 100644 index 0000000..a73a94f --- /dev/null +++ b/force-app/main/default/triggers/AccountTrigger.trigger @@ -0,0 +1,18 @@ +trigger helloWorldAccountTrigger on Account (before insert) { + + Account[] accs = Trigger.new; + + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); +} diff --git a/src/helpers/convertToGenericCoverageReport.ts b/src/helpers/convertToGenericCoverageReport.ts index eb5fe13..0b34c3d 100644 --- a/src/helpers/convertToGenericCoverageReport.ts +++ b/src/helpers/convertToGenericCoverageReport.ts @@ -1,4 +1,6 @@ 'use strict'; +import * as fs from 'node:fs'; + import { CoverageData } from './types.js'; import { findFilePath } from './findFilePath.js'; @@ -10,14 +12,21 @@ export function convertToGenericCoverageReport(data: CoverageData, dxDirectory: const classInfo = data[className]; const formattedClassName = className.replace('no-map/', ''); const filePath = findFilePath(formattedClassName, dxDirectory); + if (filePath === undefined) { + throw Error(`The file name ${formattedClassName} was not found in the classes, triggers, or flows directory.`); + } + // Extract the "uncovered lines" from the JSON data + const uncoveredLines = Object.keys(classInfo.s) + .filter(lineNumber => classInfo.s[lineNumber] === 0) + .map(Number); + const totalLines = getTotalLines(filePath); + xml += `\t\n`; - for (const lineNumber in classInfo.s) { - if (Object.hasOwn(classInfo.s, lineNumber)) { - const count = classInfo.s[lineNumber]; - const covered = count > 0 ? 'true' : 'false'; - xml += `\t\t\n`; - } + for (let lineNumber = 1; lineNumber <= totalLines; lineNumber++) { + // Mark the line as covered if it is not listed as "uncovered" in the JSON + const covered = uncoveredLines.includes(lineNumber) ? 'false' : 'true'; + xml += `\t\t\n`; } xml += '\t\n'; } @@ -25,3 +34,8 @@ export function convertToGenericCoverageReport(data: CoverageData, dxDirectory: xml += ''; return xml; } + +function getTotalLines(filePath: string): number { + const fileContent = fs.readFileSync(filePath, 'utf8'); + return fileContent.split(/\r\n|\r|\n/).length; +} diff --git a/src/helpers/findFilePath.ts b/src/helpers/findFilePath.ts index 0a495b0..094ba6e 100644 --- a/src/helpers/findFilePath.ts +++ b/src/helpers/findFilePath.ts @@ -2,7 +2,7 @@ import * as fs from 'node:fs'; import * as path from 'node:path'; -export function findFilePath(fileName: string, dxDirectory: string): string | null { +export function findFilePath(fileName: string, dxDirectory: string): string | undefined { const fileExtension = fileName.split('.').slice(1).join('.'); let relativeClassPath = ''; let relativeTriggerPath = ''; @@ -46,5 +46,5 @@ export function findFilePath(fileName: string, dxDirectory: string): string | nu } else if (fs.existsSync(absoluteFlowPath)) { return relativeFlowPath; } - throw Error(`The file name ${fileName} was not found in the classes, triggers, or flows directory.`); + return undefined; } diff --git a/test/commands/transformer/unit.test.ts b/test/commands/transformer/unit.test.ts index be97a69..ef44f80 100644 --- a/test/commands/transformer/unit.test.ts +++ b/test/commands/transformer/unit.test.ts @@ -19,21 +19,6 @@ describe('transform the code coverage json', () => { testXmlPath1 = path.resolve(testXmlPath1); testXmlPath2 = path.resolve(testXmlPath2); - // Mock file contents - const mockClassContent = '// Test Apex Class'; - const mockTriggerContent = '// Test Apex Trigger'; - const mockFlowContent = ''; - - // Create mock files - before(() => { - fs.mkdirSync('force-app/main/default/classes', { recursive: true }); - fs.mkdirSync('force-app/main/default/triggers', { recursive: true }); - fs.mkdirSync('force-app/main/default/flows', { recursive: true }); - fs.writeFileSync('force-app/main/default/classes/AccountProfile.cls', mockClassContent); - fs.writeFileSync('force-app/main/default/triggers/AccountTrigger.trigger', mockTriggerContent); - fs.writeFileSync('force-app/main/default/flows/Get_Info.flow-meta.xml', mockFlowContent); - }); - beforeEach(() => { sfCommandStubs = stubSfCommandUx($$.SANDBOX); }); @@ -44,12 +29,6 @@ describe('transform the code coverage json', () => { // Cleanup mock files after(() => { - fs.unlinkSync('force-app/main/default/classes/AccountProfile.cls'); - fs.unlinkSync('force-app/main/default/triggers/AccountTrigger.trigger'); - fs.unlinkSync('force-app/main/default/flows/Get_Info.flow-meta.xml'); - fs.rmdirSync('force-app/main/default/classes'); - fs.rmdirSync('force-app/main/default/triggers'); - fs.rmdirSync('force-app/main/default/flows'); fs.rmSync(testXmlPath1); fs.rmSync(testXmlPath2); }); From fcf7d4c873daa862b588605b9f417c9a252d3161 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 5 Mar 2024 00:55:06 +0000 Subject: [PATCH 06/18] chore(release): 1.4.1-beta.2 [skip ci] ## [1.4.1-beta.2](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.1...v1.4.1-beta.2) (2024-03-05) ### Bug Fixes * get total number of lines in each file and assume line is covered if it's not listed as "uncovered" in JSON ([794a9e7](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/794a9e7813db182e47f46c2275a8064b8d92e261)) --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfe28ec..b1bd788 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.4.1-beta.2](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.1...v1.4.1-beta.2) (2024-03-05) + +### Bug Fixes + +- get total number of lines in each file and assume line is covered if it's not listed as "uncovered" in JSON ([794a9e7](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/794a9e7813db182e47f46c2275a8064b8d92e261)) + ## [1.4.1-beta.1](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.0...v1.4.1-beta.1) (2024-03-04) ### Bug Fixes diff --git a/package.json b/package.json index 40dffa8..45abde5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "apex-code-coverage-transformer", "description": "Transforms the Apex Code Coverage JSON into the Generic Test Coverage Format.", - "version": "1.4.1-beta.1", + "version": "1.4.1-beta.2", "dependencies": { "@oclif/core": "^3.18.1", "@salesforce/core": "^6.4.7", From 594e7cb47b6acf0823a02fb67a3cc681980e8e0f Mon Sep 17 00:00:00 2001 From: Matt Carvin <90224411+mcarvin8@users.noreply.github.com> Date: Tue, 5 Mar 2024 18:33:33 -0500 Subject: [PATCH 07/18] fix: print uncovered lines first, then covered lines, ensuring out-of-range lines are replaced with a random unused line --- .../default/triggers/AccountTrigger.trigger | 22 +++++++++++++++++ src/helpers/convertToGenericCoverageReport.ts | 24 +++++++++++++++---- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/force-app/main/default/triggers/AccountTrigger.trigger b/force-app/main/default/triggers/AccountTrigger.trigger index a73a94f..cd99f1a 100644 --- a/force-app/main/default/triggers/AccountTrigger.trigger +++ b/force-app/main/default/triggers/AccountTrigger.trigger @@ -15,4 +15,26 @@ trigger helloWorldAccountTrigger on Account (before insert) { MyHelloWorld.addHelloWorld(accs); MyHelloWorld.addHelloWorld(accs); MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); + MyHelloWorld.addHelloWorld(accs); } diff --git a/src/helpers/convertToGenericCoverageReport.ts b/src/helpers/convertToGenericCoverageReport.ts index 0b34c3d..ab2604e 100644 --- a/src/helpers/convertToGenericCoverageReport.ts +++ b/src/helpers/convertToGenericCoverageReport.ts @@ -19,15 +19,31 @@ export function convertToGenericCoverageReport(data: CoverageData, dxDirectory: const uncoveredLines = Object.keys(classInfo.s) .filter(lineNumber => classInfo.s[lineNumber] === 0) .map(Number); + const coveredLines = Object.keys(classInfo.s) + .filter(lineNumber => classInfo.s[lineNumber] === 1) + .map(Number); + const randomLines: number[] = []; const totalLines = getTotalLines(filePath); xml += `\t\n`; - for (let lineNumber = 1; lineNumber <= totalLines; lineNumber++) { - // Mark the line as covered if it is not listed as "uncovered" in the JSON - const covered = uncoveredLines.includes(lineNumber) ? 'false' : 'true'; - xml += `\t\t\n`; + for (const uncoveredLine of uncoveredLines) { + xml += `\t\t\n`; + } + + for (const coveredLine of coveredLines) { + if (coveredLine > totalLines) { + let randomLineNumber; + do { + randomLineNumber = Math.floor(Math.random() * totalLines) + 1; + } while (coveredLines.includes(randomLineNumber) || uncoveredLines.includes(randomLineNumber) || randomLines.includes(randomLineNumber)); + randomLines.push(randomLineNumber); + xml += `\t\t\n`; + } else { + xml += `\t\t\n`; + } } + xml += '\t\n'; } } From 8bc11e55564f85297a2db7573f10573733f0c2b5 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 5 Mar 2024 23:42:46 +0000 Subject: [PATCH 08/18] chore(release): 1.4.1-beta.3 [skip ci] ## [1.4.1-beta.3](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.2...v1.4.1-beta.3) (2024-03-05) ### Bug Fixes * print uncovered lines first, then covered lines, ensuring out-of-range lines are replaced with a random unused line ([594e7cb](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/594e7cb47b6acf0823a02fb67a3cc681980e8e0f)) --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1bd788..38a0fe4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.4.1-beta.3](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.2...v1.4.1-beta.3) (2024-03-05) + +### Bug Fixes + +- print uncovered lines first, then covered lines, ensuring out-of-range lines are replaced with a random unused line ([594e7cb](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/594e7cb47b6acf0823a02fb67a3cc681980e8e0f)) + ## [1.4.1-beta.2](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.1...v1.4.1-beta.2) (2024-03-05) ### Bug Fixes diff --git a/package.json b/package.json index 45abde5..b8d0b53 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "apex-code-coverage-transformer", "description": "Transforms the Apex Code Coverage JSON into the Generic Test Coverage Format.", - "version": "1.4.1-beta.2", + "version": "1.4.1-beta.3", "dependencies": { "@oclif/core": "^3.18.1", "@salesforce/core": "^6.4.7", From 1c293238e059d47eace1fd395d230e51bb399315 Mon Sep 17 00:00:00 2001 From: Matt Carvin <90224411+mcarvin8@users.noreply.github.com> Date: Wed, 6 Mar 2024 09:21:23 -0500 Subject: [PATCH 09/18] fix: switch do statement to a for statement and start random number count at 1 --- src/helpers/convertToGenericCoverageReport.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/helpers/convertToGenericCoverageReport.ts b/src/helpers/convertToGenericCoverageReport.ts index ab2604e..6559bee 100644 --- a/src/helpers/convertToGenericCoverageReport.ts +++ b/src/helpers/convertToGenericCoverageReport.ts @@ -33,12 +33,16 @@ export function convertToGenericCoverageReport(data: CoverageData, dxDirectory: for (const coveredLine of coveredLines) { if (coveredLine > totalLines) { - let randomLineNumber; - do { - randomLineNumber = Math.floor(Math.random() * totalLines) + 1; - } while (coveredLines.includes(randomLineNumber) || uncoveredLines.includes(randomLineNumber) || randomLines.includes(randomLineNumber)); - randomLines.push(randomLineNumber); - xml += `\t\t\n`; + for (let randomLineNumber = 1; randomLineNumber <= totalLines; randomLineNumber++) { + if ( + !uncoveredLines.includes(randomLineNumber) && + !coveredLines.includes(randomLineNumber) && + !randomLines.includes(randomLineNumber) + ) { + xml += `\t\t\n`; + randomLines.push(randomLineNumber); + } + } } else { xml += `\t\t\n`; } From dca97687d52f0088f4be83d03c16663c246e6c69 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 6 Mar 2024 14:22:28 +0000 Subject: [PATCH 10/18] chore(release): 1.4.1-beta.4 [skip ci] ## [1.4.1-beta.4](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.3...v1.4.1-beta.4) (2024-03-06) ### Bug Fixes * switch do statement to a for statement and start random number count at 1 ([1c29323](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/1c293238e059d47eace1fd395d230e51bb399315)) --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38a0fe4..3ebeb37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.4.1-beta.4](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.3...v1.4.1-beta.4) (2024-03-06) + +### Bug Fixes + +- switch do statement to a for statement and start random number count at 1 ([1c29323](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/1c293238e059d47eace1fd395d230e51bb399315)) + ## [1.4.1-beta.3](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.2...v1.4.1-beta.3) (2024-03-05) ### Bug Fixes diff --git a/package.json b/package.json index b8d0b53..69bba7b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "apex-code-coverage-transformer", "description": "Transforms the Apex Code Coverage JSON into the Generic Test Coverage Format.", - "version": "1.4.1-beta.3", + "version": "1.4.1-beta.4", "dependencies": { "@oclif/core": "^3.18.1", "@salesforce/core": "^6.4.7", From 2c6e6bb022924a5b04775a3076d24f24bb6ecc4b Mon Sep 17 00:00:00 2001 From: Matt Carvin <90224411+mcarvin8@users.noreply.github.com> Date: Wed, 6 Mar 2024 11:55:53 -0500 Subject: [PATCH 11/18] fix: ensure covered lines in XML match JSON total --- src/helpers/convertToGenericCoverageReport.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/helpers/convertToGenericCoverageReport.ts b/src/helpers/convertToGenericCoverageReport.ts index 6559bee..bbd5a01 100644 --- a/src/helpers/convertToGenericCoverageReport.ts +++ b/src/helpers/convertToGenericCoverageReport.ts @@ -17,11 +17,11 @@ export function convertToGenericCoverageReport(data: CoverageData, dxDirectory: } // Extract the "uncovered lines" from the JSON data const uncoveredLines = Object.keys(classInfo.s) - .filter(lineNumber => classInfo.s[lineNumber] === 0) - .map(Number); + .filter(lineNumber => classInfo.s[lineNumber] === 0) + .map(Number); const coveredLines = Object.keys(classInfo.s) - .filter(lineNumber => classInfo.s[lineNumber] === 1) - .map(Number); + .filter(lineNumber => classInfo.s[lineNumber] === 1) + .map(Number); const randomLines: number[] = []; const totalLines = getTotalLines(filePath); @@ -30,6 +30,7 @@ export function convertToGenericCoverageReport(data: CoverageData, dxDirectory: for (const uncoveredLine of uncoveredLines) { xml += `\t\t\n`; } + let totalCoveredLinesInXML = 0; for (const coveredLine of coveredLines) { if (coveredLine > totalLines) { @@ -37,14 +38,17 @@ export function convertToGenericCoverageReport(data: CoverageData, dxDirectory: if ( !uncoveredLines.includes(randomLineNumber) && !coveredLines.includes(randomLineNumber) && - !randomLines.includes(randomLineNumber) + !randomLines.includes(randomLineNumber) && + totalCoveredLinesInXML < coveredLines.length ) { xml += `\t\t\n`; randomLines.push(randomLineNumber); + totalCoveredLinesInXML++; } } } else { xml += `\t\t\n`; + totalCoveredLinesInXML++; } } @@ -55,6 +59,7 @@ export function convertToGenericCoverageReport(data: CoverageData, dxDirectory: return xml; } + function getTotalLines(filePath: string): number { const fileContent = fs.readFileSync(filePath, 'utf8'); return fileContent.split(/\r\n|\r|\n/).length; From 1cd06d0db67f184104644e674d26be8e359bc096 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 6 Mar 2024 16:56:53 +0000 Subject: [PATCH 12/18] chore(release): 1.4.1-beta.5 [skip ci] ## [1.4.1-beta.5](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.4...v1.4.1-beta.5) (2024-03-06) ### Bug Fixes * ensure covered lines in XML match JSON total ([2c6e6bb](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/2c6e6bb022924a5b04775a3076d24f24bb6ecc4b)) --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ebeb37..7f2addc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.4.1-beta.5](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.4...v1.4.1-beta.5) (2024-03-06) + +### Bug Fixes + +- ensure covered lines in XML match JSON total ([2c6e6bb](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/2c6e6bb022924a5b04775a3076d24f24bb6ecc4b)) + ## [1.4.1-beta.4](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.3...v1.4.1-beta.4) (2024-03-06) ### Bug Fixes diff --git a/package.json b/package.json index 69bba7b..8d63462 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "apex-code-coverage-transformer", "description": "Transforms the Apex Code Coverage JSON into the Generic Test Coverage Format.", - "version": "1.4.1-beta.4", + "version": "1.4.1-beta.5", "dependencies": { "@oclif/core": "^3.18.1", "@salesforce/core": "^6.4.7", From 6e1d5270ef5eeae0fe843e7ec5de0f2f5f0a535e Mon Sep 17 00:00:00 2001 From: Matt Carvin <90224411+mcarvin8@users.noreply.github.com> Date: Wed, 6 Mar 2024 12:12:05 -0500 Subject: [PATCH 13/18] fix: add break condition --- src/helpers/convertToGenericCoverageReport.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/helpers/convertToGenericCoverageReport.ts b/src/helpers/convertToGenericCoverageReport.ts index bbd5a01..03bfb62 100644 --- a/src/helpers/convertToGenericCoverageReport.ts +++ b/src/helpers/convertToGenericCoverageReport.ts @@ -45,6 +45,9 @@ export function convertToGenericCoverageReport(data: CoverageData, dxDirectory: randomLines.push(randomLineNumber); totalCoveredLinesInXML++; } + else if (totalCoveredLinesInXML === coveredLines.length) { + break; + } } } else { xml += `\t\t\n`; @@ -59,7 +62,6 @@ export function convertToGenericCoverageReport(data: CoverageData, dxDirectory: return xml; } - function getTotalLines(filePath: string): number { const fileContent = fs.readFileSync(filePath, 'utf8'); return fileContent.split(/\r\n|\r|\n/).length; From 69eb2d203b1b53bbadf2f8b7de2b678c4718debb Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 6 Mar 2024 17:12:59 +0000 Subject: [PATCH 14/18] chore(release): 1.4.1-beta.6 [skip ci] ## [1.4.1-beta.6](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.5...v1.4.1-beta.6) (2024-03-06) ### Bug Fixes * add break condition ([6e1d527](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/6e1d5270ef5eeae0fe843e7ec5de0f2f5f0a535e)) --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f2addc..d9ec972 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.4.1-beta.6](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.5...v1.4.1-beta.6) (2024-03-06) + +### Bug Fixes + +- add break condition ([6e1d527](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/6e1d5270ef5eeae0fe843e7ec5de0f2f5f0a535e)) + ## [1.4.1-beta.5](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.4...v1.4.1-beta.5) (2024-03-06) ### Bug Fixes diff --git a/package.json b/package.json index 8d63462..114ea20 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "apex-code-coverage-transformer", "description": "Transforms the Apex Code Coverage JSON into the Generic Test Coverage Format.", - "version": "1.4.1-beta.5", + "version": "1.4.1-beta.6", "dependencies": { "@oclif/core": "^3.18.1", "@salesforce/core": "^6.4.7", From da2f8daff06782650ae79ab0cbf5c3194ccee471 Mon Sep 17 00:00:00 2001 From: Matt Carvin <90224411+mcarvin8@users.noreply.github.com> Date: Wed, 6 Mar 2024 12:24:11 -0500 Subject: [PATCH 15/18] fix: move break --- src/helpers/convertToGenericCoverageReport.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/helpers/convertToGenericCoverageReport.ts b/src/helpers/convertToGenericCoverageReport.ts index 03bfb62..3950ccb 100644 --- a/src/helpers/convertToGenericCoverageReport.ts +++ b/src/helpers/convertToGenericCoverageReport.ts @@ -44,8 +44,6 @@ export function convertToGenericCoverageReport(data: CoverageData, dxDirectory: xml += `\t\t\n`; randomLines.push(randomLineNumber); totalCoveredLinesInXML++; - } - else if (totalCoveredLinesInXML === coveredLines.length) { break; } } From 09e6b12c14d4704ae601090afca73bcbd7c3eadd Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 6 Mar 2024 17:37:06 +0000 Subject: [PATCH 16/18] chore(release): 1.4.1-beta.7 [skip ci] ## [1.4.1-beta.7](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.6...v1.4.1-beta.7) (2024-03-06) ### Bug Fixes * move break ([da2f8da](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/da2f8daff06782650ae79ab0cbf5c3194ccee471)) --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9ec972..b868c11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.4.1-beta.7](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.6...v1.4.1-beta.7) (2024-03-06) + +### Bug Fixes + +- move break ([da2f8da](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/da2f8daff06782650ae79ab0cbf5c3194ccee471)) + ## [1.4.1-beta.6](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.5...v1.4.1-beta.6) (2024-03-06) ### Bug Fixes diff --git a/package.json b/package.json index 114ea20..aa39f53 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "apex-code-coverage-transformer", "description": "Transforms the Apex Code Coverage JSON into the Generic Test Coverage Format.", - "version": "1.4.1-beta.6", + "version": "1.4.1-beta.7", "dependencies": { "@oclif/core": "^3.18.1", "@salesforce/core": "^6.4.7", From bc14f0c98de1d1c22fb5e6df4f3d91b41ee4336b Mon Sep 17 00:00:00 2001 From: Matt Carvin <90224411+mcarvin8@users.noreply.github.com> Date: Wed, 6 Mar 2024 12:43:04 -0500 Subject: [PATCH 17/18] fix: don't need to track total covered lines in XML after adding break --- src/helpers/convertToGenericCoverageReport.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/helpers/convertToGenericCoverageReport.ts b/src/helpers/convertToGenericCoverageReport.ts index 3950ccb..866a084 100644 --- a/src/helpers/convertToGenericCoverageReport.ts +++ b/src/helpers/convertToGenericCoverageReport.ts @@ -30,7 +30,6 @@ export function convertToGenericCoverageReport(data: CoverageData, dxDirectory: for (const uncoveredLine of uncoveredLines) { xml += `\t\t\n`; } - let totalCoveredLinesInXML = 0; for (const coveredLine of coveredLines) { if (coveredLine > totalLines) { @@ -38,18 +37,15 @@ export function convertToGenericCoverageReport(data: CoverageData, dxDirectory: if ( !uncoveredLines.includes(randomLineNumber) && !coveredLines.includes(randomLineNumber) && - !randomLines.includes(randomLineNumber) && - totalCoveredLinesInXML < coveredLines.length + !randomLines.includes(randomLineNumber) ) { xml += `\t\t\n`; randomLines.push(randomLineNumber); - totalCoveredLinesInXML++; break; } } } else { xml += `\t\t\n`; - totalCoveredLinesInXML++; } } From 1f5ac57a795c0b899f721e49b8fb5c6920bd748b Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 6 Mar 2024 17:44:03 +0000 Subject: [PATCH 18/18] chore(release): 1.4.1-beta.8 [skip ci] ## [1.4.1-beta.8](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.7...v1.4.1-beta.8) (2024-03-06) ### Bug Fixes * don't need to track total covered lines in XML after adding break ([bc14f0c](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/bc14f0c98de1d1c22fb5e6df4f3d91b41ee4336b)) --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b868c11..92887f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.4.1-beta.8](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.7...v1.4.1-beta.8) (2024-03-06) + +### Bug Fixes + +- don't need to track total covered lines in XML after adding break ([bc14f0c](https://github.com/mcarvin8/apex-code-coverage-transformer/commit/bc14f0c98de1d1c22fb5e6df4f3d91b41ee4336b)) + ## [1.4.1-beta.7](https://github.com/mcarvin8/apex-code-coverage-transformer/compare/v1.4.1-beta.6...v1.4.1-beta.7) (2024-03-06) ### Bug Fixes diff --git a/package.json b/package.json index aa39f53..2ff9d59 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "apex-code-coverage-transformer", "description": "Transforms the Apex Code Coverage JSON into the Generic Test Coverage Format.", - "version": "1.4.1-beta.7", + "version": "1.4.1-beta.8", "dependencies": { "@oclif/core": "^3.18.1", "@salesforce/core": "^6.4.7",