@govtechsg/oobee 0.10.47 → 0.10.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/mergeAxeResults.ts +7 -1
package/package.json
CHANGED
package/src/mergeAxeResults.ts
CHANGED
@@ -1533,6 +1533,7 @@ function populateScanPagesDetail(allIssues: AllIssues): void {
|
|
1533
1533
|
// Send WCAG criteria breakdown to Sentry
|
1534
1534
|
const sendWcagBreakdownToSentry = async (
|
1535
1535
|
wcagBreakdown: Map<string, number>,
|
1536
|
+
ruleIdJson: any,
|
1536
1537
|
scanInfo: {
|
1537
1538
|
entryUrl: string;
|
1538
1539
|
scanType: string;
|
@@ -1662,6 +1663,7 @@ const sendWcagBreakdownToSentry = async (
|
|
1662
1663
|
...(userData && userData.userId ? { id: userData.userId } : {}),
|
1663
1664
|
},
|
1664
1665
|
extra: {
|
1666
|
+
additionalScanMetadata: ruleIdJson != null ? JSON.stringify(ruleIdJson) : "{}",
|
1665
1667
|
wcagBreakdown: wcagCriteriaBreakdown,
|
1666
1668
|
reportCounts: allIssues
|
1667
1669
|
? {
|
@@ -2013,12 +2015,16 @@ const generateArtifacts = async (
|
|
2013
2015
|
printMessage([`Error in zipping results: ${error}`]);
|
2014
2016
|
});
|
2015
2017
|
|
2018
|
+
// Generate scrubbed HTML Code Snippets
|
2019
|
+
const ruleIdJson = createRuleIdJson(allIssues);
|
2020
|
+
|
2016
2021
|
// At the end of the function where results are generated, add:
|
2017
2022
|
try {
|
2018
2023
|
// Always send WCAG breakdown to Sentry, even if no violations were found
|
2019
2024
|
// This ensures that all criteria are reported, including those with 0 occurrences
|
2020
2025
|
await sendWcagBreakdownToSentry(
|
2021
2026
|
wcagOccurrencesMap,
|
2027
|
+
ruleIdJson,
|
2022
2028
|
{
|
2023
2029
|
entryUrl: urlScanned,
|
2024
2030
|
scanType,
|
@@ -2033,7 +2039,7 @@ const generateArtifacts = async (
|
|
2033
2039
|
console.error('Error sending WCAG data to Sentry:', error);
|
2034
2040
|
}
|
2035
2041
|
|
2036
|
-
return
|
2042
|
+
return ruleIdJson;
|
2037
2043
|
};
|
2038
2044
|
|
2039
2045
|
export default generateArtifacts;
|