accessibility-checker 3.1.49 → 3.1.51

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.
Files changed (94) hide show
  1. package/README.md +75 -67
  2. package/bin/achecker.js +14 -17
  3. package/bin/achecker.js.map +1 -1
  4. package/index.d.ts +6 -4
  5. package/index.js +9 -8
  6. package/index.js.map +1 -1
  7. package/lib/ACBrowserManager.d.ts +2 -2
  8. package/lib/ACBrowserManager.js +2 -3
  9. package/lib/ACBrowserManager.js.map +1 -1
  10. package/lib/ACEngineManager.d.ts +1 -12
  11. package/lib/ACEngineManager.js +72 -40
  12. package/lib/ACEngineManager.js.map +1 -1
  13. package/lib/ACHelper.js +126 -137
  14. package/lib/ACHelper.js.map +1 -1
  15. package/lib/api/IChecker.d.ts +3 -114
  16. package/lib/api/IChecker.js +1 -1
  17. package/lib/api/IChecker.js.map +1 -1
  18. package/lib/common/api-ext/Fetch.d.ts +16 -0
  19. package/lib/common/api-ext/Fetch.js +83 -0
  20. package/lib/common/api-ext/Fetch.js.map +1 -0
  21. package/lib/common/api-ext/IAbstractAPI.d.ts +34 -0
  22. package/lib/common/api-ext/IAbstractAPI.js +18 -0
  23. package/lib/common/api-ext/IAbstractAPI.js.map +1 -0
  24. package/lib/common/config/ACConfigManager.d.ts +7 -0
  25. package/lib/{ACConfigManager.js → common/config/ACConfigManager.js} +28 -19
  26. package/lib/common/config/ACConfigManager.js.map +1 -0
  27. package/lib/{ACConstants.d.ts → common/config/ACConstants.d.ts} +2 -2
  28. package/lib/{ACConstants.js → common/config/ACConstants.js} +7 -5
  29. package/lib/common/config/ACConstants.js.map +1 -0
  30. package/lib/common/config/IArchive.d.ts +37 -0
  31. package/lib/{reporters/multiScanReportUtil.d.ts → common/config/IArchive.js} +4 -5
  32. package/lib/common/config/IArchive.js.map +1 -0
  33. package/lib/common/config/IConfig.d.ts +146 -0
  34. package/lib/common/config/IConfig.js +36 -0
  35. package/lib/common/config/IConfig.js.map +1 -0
  36. package/lib/common/report/ACReporterCSV.d.ts +27 -0
  37. package/lib/common/report/ACReporterCSV.js +105 -0
  38. package/lib/common/report/ACReporterCSV.js.map +1 -0
  39. package/lib/common/report/ACReporterHTML.d.ts +26 -0
  40. package/lib/common/report/ACReporterHTML.js +94 -0
  41. package/lib/common/report/ACReporterHTML.js.map +1 -0
  42. package/lib/common/report/ACReporterJSON.d.ts +46 -0
  43. package/lib/common/report/ACReporterJSON.js +140 -0
  44. package/lib/common/report/ACReporterJSON.js.map +1 -0
  45. package/lib/{log/ACMetricsLogger.d.ts → common/report/ACReporterMetrics.d.ts} +11 -6
  46. package/lib/{log/ACMetricsLogger.js → common/report/ACReporterMetrics.js} +85 -70
  47. package/lib/common/report/ACReporterMetrics.js.map +1 -0
  48. package/lib/common/report/ACReporterXLSX.d.ts +37 -0
  49. package/lib/common/report/ACReporterXLSX.js +1004 -0
  50. package/lib/common/report/ACReporterXLSX.js.map +1 -0
  51. package/lib/common/report/BaselineManager.d.ts +169 -0
  52. package/lib/common/report/BaselineManager.js +355 -0
  53. package/lib/common/report/BaselineManager.js.map +1 -0
  54. package/lib/common/report/ReporterManager.d.ts +79 -0
  55. package/lib/common/report/ReporterManager.js +552 -0
  56. package/lib/common/report/ReporterManager.js.map +1 -0
  57. package/lib/common/report/genReport.js.map +1 -0
  58. package/package.json +1 -1
  59. package/lib/ACConfigManager.d.ts +0 -7
  60. package/lib/ACConfigManager.js.map +0 -1
  61. package/lib/ACConstants.js.map +0 -1
  62. package/lib/ACReportManager.d.ts +0 -590
  63. package/lib/ACReportManager.js +0 -1201
  64. package/lib/ACReportManager.js.map +0 -1
  65. package/lib/api/IEngine.d.ts +0 -129
  66. package/lib/api/IEngine.js +0 -110
  67. package/lib/api/IEngine.js.map +0 -1
  68. package/lib/log/ACMetricsLogger.js.map +0 -1
  69. package/lib/reporters/ACReporterCSV.d.ts +0 -103
  70. package/lib/reporters/ACReporterCSV.js +0 -193
  71. package/lib/reporters/ACReporterCSV.js.map +0 -1
  72. package/lib/reporters/ACReporterHTML.d.ts +0 -114
  73. package/lib/reporters/ACReporterHTML.js +0 -360
  74. package/lib/reporters/ACReporterHTML.js.map +0 -1
  75. package/lib/reporters/ACReporterJSON.d.ts +0 -114
  76. package/lib/reporters/ACReporterJSON.js +0 -277
  77. package/lib/reporters/ACReporterJSON.js.map +0 -1
  78. package/lib/reporters/ACReporterXLSX.d.ts +0 -109
  79. package/lib/reporters/ACReporterXLSX.js +0 -405
  80. package/lib/reporters/ACReporterXLSX.js.map +0 -1
  81. package/lib/reporters/ReportUtil.d.ts +0 -33
  82. package/lib/reporters/ReportUtil.js +0 -65
  83. package/lib/reporters/ReportUtil.js.map +0 -1
  84. package/lib/reporters/genReport.js.map +0 -1
  85. package/lib/reporters/multiScanData.d.ts +0 -27
  86. package/lib/reporters/multiScanData.js +0 -190
  87. package/lib/reporters/multiScanData.js.map +0 -1
  88. package/lib/reporters/multiScanReport.d.ts +0 -25
  89. package/lib/reporters/multiScanReport.js +0 -1729
  90. package/lib/reporters/multiScanReport.js.map +0 -1
  91. package/lib/reporters/multiScanReportUtil.js +0 -49
  92. package/lib/reporters/multiScanReportUtil.js.map +0 -1
  93. /package/lib/{reporters → common/report}/genReport.d.ts +0 -0
  94. /package/lib/{reporters → common/report}/genReport.js +0 -0
@@ -1,405 +0,0 @@
1
- "use strict";
2
- /******************************************************************************
3
- Copyright:: 2020- IBM, Inc
4
-
5
- Licensed under the Apache License, Version 2.0 (the "License");
6
- you may not use this file except in compliance with the License.
7
- You may obtain a copy of the License at
8
-
9
- http://www.apache.org/licenses/LICENSE-2.0
10
-
11
- Unless required by applicable law or agreed to in writing, software
12
- distributed under the License is distributed on an "AS IS" BASIS,
13
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- See the License for the specific language governing permissions and
15
- limitations under the License.
16
- *****************************************************************************/
17
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
- return new (P || (P = Promise))(function (resolve, reject) {
20
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
- step((generator = generator.apply(thisArg, _arguments || [])).next());
24
- });
25
- };
26
- var __generator = (this && this.__generator) || function (thisArg, body) {
27
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
- function verb(n) { return function (v) { return step([n, v]); }; }
30
- function step(op) {
31
- if (f) throw new TypeError("Generator is already executing.");
32
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
- if (y = 0, t) op = [op[0] & 2, t.value];
35
- switch (op[0]) {
36
- case 0: case 1: t = op; break;
37
- case 4: _.label++; return { value: op[1], done: false };
38
- case 5: _.label++; y = op[1]; op = [0]; continue;
39
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
- default:
41
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
- if (t[2]) _.ops.pop();
46
- _.trys.pop(); continue;
47
- }
48
- op = body.call(thisArg, _);
49
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
- }
52
- };
53
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
54
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
55
- if (ar || !(i in from)) {
56
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
57
- ar[i] = from[i];
58
- }
59
- }
60
- return to.concat(ar || Array.prototype.slice.call(from));
61
- };
62
- Object.defineProperty(exports, "__esModule", { value: true });
63
- exports.ACReporterXLSX = void 0;
64
- // Load all the modules that are needed
65
- var pathLib = require("path");
66
- var fs = require("fs");
67
- var ACEngineManager_1 = require("../ACEngineManager");
68
- var ACConfigManager_1 = require("../ACConfigManager");
69
- var multiScanData_1 = require("./multiScanData");
70
- var multiScanReport_1 = require("./multiScanReport");
71
- var toCSV = function (str) {
72
- if (str === null) {
73
- return '"null"';
74
- }
75
- else if (str.length == 0) {
76
- return '""';
77
- }
78
- else {
79
- str = str.replace(/"/g, '""');
80
- return "\"".concat(str, "\"");
81
- }
82
- };
83
- /**
84
- * This function is responsible for constructing the aChecker Reporter which will be used to, report
85
- * the scan results, such as writing the page results and the summary to a JSON file. This reporter function
86
- * is registered with Karma server and triggered based on events that are triggered by the karma communication.
87
- *
88
- * @param {Object} baseReporterDecorator - the base karma reporter, which had the base functions which we override
89
- * @param {Object} this.Config - All the Karma this.Configuration, we will extract what we need from this over
90
- * all object, we need the entire object so that we detect any changes in the object
91
- * as other plugins are loaded and the object is updated dynamically.
92
- * @param {Object} logger - logger object which is used to log debug/error/info messages
93
- * @param {Object} emitter - emitter object which allows to listem on any event that is triggered and allow to execute
94
- * custom code, to handle the event that was triggered.
95
- *
96
- * @return - N/A
97
- *
98
- * @memberOf this
99
- */
100
- var ACReporterXLSX = /** @class */ (function () {
101
- // helpPath:string = ""
102
- function ACReporterXLSX(config, scanSummary) {
103
- this.storedScans = [];
104
- this.resultStr = "Label,Level,RuleId,Message,Xpath,Help\n";
105
- this.deploymentDate = "latest";
106
- this.accessibilityGuidelines = "IBM_Accessibility";
107
- this.Config = config;
108
- this.Config.DEBUG && console.log("START ACReporter Constructor");
109
- var myThis = this;
110
- if (typeof (after) !== "undefined") {
111
- after(function (done) {
112
- myThis.onRunComplete();
113
- done && done();
114
- });
115
- }
116
- else {
117
- process.on('beforeExit', function () {
118
- myThis.onRunComplete();
119
- });
120
- }
121
- this.Config.DEBUG && console.log("END ACReporter Constructor");
122
- }
123
- ACReporterXLSX.prototype.preprocessReport = function (report, filter, scroll) {
124
- var valueMap = {
125
- "VIOLATION": {
126
- "POTENTIAL": "Needs review",
127
- "FAIL": "Violation",
128
- "PASS": "Pass",
129
- "MANUAL": "Needs review"
130
- },
131
- "RECOMMENDATION": {
132
- "POTENTIAL": "Recommendation",
133
- "FAIL": "Recommendation",
134
- "PASS": "Pass",
135
- "MANUAL": "Recommendation"
136
- },
137
- "INFORMATION": {
138
- "POTENTIAL": "Needs review",
139
- "FAIL": "Violation",
140
- "PASS": "Pass",
141
- "MANUAL": "Recommendation"
142
- }
143
- };
144
- if (scroll === true) {
145
- }
146
- report.counts = {
147
- "total": {},
148
- "filtered": {}
149
- };
150
- report.counts.total["All"] = 0;
151
- for (var _i = 0, _a = report.results; _i < _a.length; _i++) {
152
- var item = _a[_i];
153
- var filtVal = "";
154
- item.selected = false;
155
- item.selectedChild = false;
156
- item.scrollTo = false;
157
- if (!filter) {
158
- filtVal = "X";
159
- }
160
- else {
161
- var xpath = item.path.dom;
162
- if (xpath === filter) {
163
- filtVal = "=";
164
- item.selected = true;
165
- if (item.value[1] !== "PASS") {
166
- item.scrollTo = false;
167
- }
168
- }
169
- else if (xpath.startsWith(filter)) {
170
- item.selectedChild = true;
171
- filtVal = "^";
172
- if (item.value[1] !== "PASS") {
173
- item.scrollTo = false;
174
- }
175
- }
176
- }
177
- // let val = valueMap[item.value[0]][item.value[1]] || item.value[0] + "_" + item.value[1];
178
- var val = valueMap[item.value[0]][item.value[1]] || item.value[0] + "_" + item.value[1];
179
- // report.counts.total[val] = (report.counts.total[val] || 0) + 1;
180
- report.counts.total[val] = (report.counts.total[val] || 0) + 1;
181
- report.counts.total["All"] = report.counts.total["All"] + 1;
182
- item.help = ACEngineManager_1.ACEngineManager.getHelpURL(item);
183
- if (filtVal !== "") {
184
- report.counts.filtered[val] = (report.counts.filtered[val] || 0) + 1;
185
- }
186
- }
187
- return report;
188
- };
189
- // This emitter function is responsible for calling this function when the info event is detected
190
- ACReporterXLSX.prototype.report = function (report1) {
191
- return __awaiter(this, void 0, void 0, function () {
192
- var report, myConfig, ruleArchiveSet, myRulesets, helpPath, helpPathLatest, xlsx_props, myScanData, scanData, violation, needsReview, recommendation, all, element_no_failures, element_no_violations, scanLabel, currentScan;
193
- var _a;
194
- var _this = this;
195
- return __generator(this, function (_b) {
196
- switch (_b.label) {
197
- case 0:
198
- this.Config.DEBUG && console.log("START 'info' emitter function");
199
- // get values from user config
200
- if (this.Config.hasOwnProperty('ruleArchive')) {
201
- this.deploymentDate = this.Config.ruleArchive;
202
- }
203
- if (this.Config.hasOwnProperty('policies')) { // TODO should this always be 0?
204
- this.accessibilityGuidelines = this.Config.policies[0];
205
- }
206
- report = this.preprocessReport(report1, null, false);
207
- report.timestamp = new Date().getTime();
208
- return [4 /*yield*/, ACConfigManager_1.ACConfigManager.getConfig()];
209
- case 1:
210
- myConfig = (_b.sent());
211
- ruleArchiveSet = myConfig.ruleArchiveSet;
212
- this.ruleArchiveSet = ruleArchiveSet;
213
- return [4 /*yield*/, ACEngineManager_1.ACEngineManager.getRuleset(this.accessibilityGuidelines)];
214
- case 2:
215
- myRulesets = _b.sent();
216
- report.ruleset = myRulesets;
217
- helpPath = "";
218
- helpPathLatest = "";
219
- ruleArchiveSet.forEach(function (element) {
220
- if (element.id === _this.deploymentDate) {
221
- if (element.hasOwnProperty('helpPath')) { // The preview rules do no have a helpPath associated with them so we need to check
222
- helpPath = element.helpPath;
223
- }
224
- }
225
- if (element.id === "latest") { // This is to default to a known helpPath when we cant find them othere wise. Like in the case of preview rules.
226
- if (element.hasOwnProperty('helpPath')) {
227
- helpPathLatest = element.helpPath;
228
- }
229
- }
230
- });
231
- helpPath = (helpPath !== "") ? helpPath : helpPathLatest;
232
- _a = {
233
- report: report
234
- };
235
- return [4 /*yield*/, ACEngineManager_1.ACEngineManager.getRulesets()];
236
- case 3:
237
- xlsx_props = (_a.rulesets = _b.sent(),
238
- _a.tabTitle = "",
239
- _a.tabURL = report.summary.URL,
240
- _a.helpPath = helpPath + "en-US/",
241
- _a);
242
- myScanData = new multiScanData_1.MultiScanData(this.Config);
243
- scanData = myScanData.issues_sheet_rows(xlsx_props);
244
- violation = (report === null || report === void 0 ? void 0 : report.counts.total["Violation"]) ? report === null || report === void 0 ? void 0 : report.counts.total["Violation"] : 0;
245
- needsReview = (report === null || report === void 0 ? void 0 : report.counts.total["Needs review"]) ? report === null || report === void 0 ? void 0 : report.counts.total["Needs review"] : 0;
246
- recommendation = (report === null || report === void 0 ? void 0 : report.counts.total["Recommendation"]) ? report === null || report === void 0 ? void 0 : report.counts.total["Recommendation"] : 0;
247
- all = violation + needsReview + recommendation // not using report?.counts.total["All"] here on purpose. This calculation matches the excel sheet produced by the extension.
248
- ;
249
- if (all !== 0) {
250
- element_no_failures = parseInt((((all - recommendation) / all) * 100).toFixed(0));
251
- element_no_violations = parseInt((((all - violation) / all) * 100).toFixed(0));
252
- }
253
- else {
254
- element_no_failures = 0;
255
- element_no_violations = 0;
256
- }
257
- scanLabel = report.label;
258
- currentScan = {
259
- actualStoredScan: true,
260
- isSelected: false,
261
- url: report.summary.URL,
262
- pageTitle: "",
263
- dateTime: Date.now(),
264
- scanLabel: scanLabel,
265
- userScanLabel: scanLabel,
266
- ruleSet: this.deploymentDate,
267
- guidelines: this.accessibilityGuidelines,
268
- reportDate: new Date().toJSON(),
269
- violations: violation,
270
- needsReviews: needsReview,
271
- recommendations: recommendation,
272
- elementsNoViolations: element_no_violations,
273
- elementsNoFailures: element_no_failures,
274
- storedScan: scanLabel,
275
- screenShot: null,
276
- storedScanData: scanData,
277
- };
278
- this.toolID = report.toolID;
279
- this.storedScans = __spreadArray(__spreadArray([], this.storedScans, true), [currentScan], false);
280
- // Save the results of a single scan to a JSON file based on the label provided
281
- this.savePageResults(report);
282
- // Update the overall summary object count object to include the new scan that was performed
283
- this.addToSummaryCount(report.summary.counts);
284
- // Save the summary of this scan into global space of this reporter, to be logged
285
- // once the whole scan is done.
286
- this.addResultsToGlobal(report);
287
- this.Config.DEBUG && console.log("END 'info' emitter function");
288
- return [2 /*return*/];
289
- }
290
- });
291
- });
292
- };
293
- ;
294
- /**
295
- * This function is responsible for performing any action when the entire karma run is done.
296
- * Overrides onRunComplete function from baseReporterDecorator
297
- *
298
- * @override
299
- *
300
- * @memberOf this
301
- */
302
- ACReporterXLSX.prototype.onRunComplete = function () {
303
- this.Config.DEBUG && console.log("START 'ACReporterCSV::onRunComplete' function");
304
- // Save summary object to a JSON file.
305
- this.saveSummary();
306
- this.Config.DEBUG && console.log("END 'ACReporterCSV::onRunComplete' function");
307
- };
308
- ;
309
- /**
310
- * This function is responsible for saving a single scans results to a file as JSON. On a side note
311
- * this function will also extract the label which will be the file names where the results will be
312
- * saved.
313
- *
314
- * @param {Object} this.Config - Karma this.Config object, used to extrat the outputFolder from the ACthis.Config.
315
- * @param {Object} results - Provide the scan results for a single page that should be saved.
316
- *
317
- * @memberOf this
318
- */
319
- ACReporterXLSX.prototype.savePageResults = function (report) {
320
- this.Config.DEBUG && console.log("START 'savePageResults' function");
321
- for (var _i = 0, _a = report.results; _i < _a.length; _i++) {
322
- var result = _a[_i];
323
- this.resultStr += "".concat(toCSV(report.label), ",").concat(toCSV(result.level), ",").concat(toCSV(result.ruleId), ",").concat(toCSV(result.message), ",").concat(toCSV(result.path.dom), ",").concat(toCSV(ACEngineManager_1.ACEngineManager.getHelpURL(result)), "\n");
324
- }
325
- this.Config.DEBUG && console.log("END 'savePageResults' function");
326
- };
327
- /**
328
- * This function is responsible for converting a javascript object into JSON and then writing that to a
329
- * json file.
330
- *
331
- * @param {String} fileName - Full path of file where the JSON object should be stored
332
- * @param {String} content - The javascript object which should be converted and saved to file as JSON.
333
- *
334
- * @memberOf this
335
- */
336
- ACReporterXLSX.prototype.writeObjectToFile = function (fileName, content) {
337
- this.Config.DEBUG && console.log("START 'writeObjectToFileAsCSV' function");
338
- fileName = pathLib.join(this.Config.outputFolder, fileName);
339
- // Extract the parent directory of the file name that is provided
340
- var parentDir = pathLib.dirname(fileName);
341
- this.Config.DEBUG && console.log("Parent Directoy: \"" + parentDir + "\"");
342
- // In the case that the parent directoy does not exist, create the directories
343
- if (!fs.existsSync(parentDir)) {
344
- // Create the parent directory recerseivly if it does not exist.
345
- fs.mkdirSync(parentDir, { recursive: true });
346
- }
347
- this.Config.DEBUG && console.log("Object will be written to file: \"" + fileName + "\"");
348
- // Convert the Object into JSON string and write that to the file
349
- // Make sure to use utf-8 encoding to avoid an issues specify to OS.
350
- // In terms of the JSON string that is constructed use 4 spaces to format the JSON object, before
351
- // writing it to the file.
352
- fs.writeFileSync(fileName, content, { encoding: 'utf-8' });
353
- this.Config.DEBUG && console.log("END 'writeObjectToFileAsCSV' function");
354
- };
355
- /**
356
- * This function is responsible for saving the summary object of the while scan to a summary file.
357
- *
358
- * @param {Object} summary - The summary object that needs to be written to the summary file.
359
- *
360
- * @memberOf this
361
- */
362
- ACReporterXLSX.prototype.saveSummary = function () {
363
- this.Config.DEBUG && console.log("START 'saveSummary' function");
364
- if (this.Config.outputFormat.indexOf("xlsx") === -1) {
365
- return;
366
- }
367
- // this.writeObjectToFile("results.xlsx", this.resultStr);
368
- var fileName = pathLib.join(this.Config.outputFolder, "results.xlsx");
369
- multiScanReport_1.default.multiScanXlsxDownload(this.storedScans, "all", this.storedScans.length, this.ruleArchiveSet, this.toolID, fileName);
370
- this.Config.DEBUG && console.log("END 'saveSummary' function");
371
- };
372
- /**
373
- * This function is responsible for indexing the results into global spaces based on label.
374
- *
375
- * @param {Object} results - Results object which will be provided to the user/wroten to the file.
376
- * Refer to aChecker.buildReport function's return to figure out what the object
377
- * will look like.
378
- *
379
- * @return - N/A - Global object is updated with the results
380
- *
381
- * @memberOf this
382
- */
383
- ACReporterXLSX.prototype.addResultsToGlobal = function (results) {
384
- this.Config.DEBUG && console.log("START 'addResultsToGlobal' function");
385
- this.Config.DEBUG && console.log("END 'addResultsToGlobal' function");
386
- };
387
- /**
388
- * This function is responsible for updating/creating the global violation summary for the engine karma run
389
- * for browser that it is running on. Will take the pageCount object which is part of the page object and
390
- * add extract the values for each of the levels and add them to the global object. This will provide an overall
391
- * summary of violations for all testcases run and all scans done.
392
- *
393
- * @param {Object} pageCount - Provide the page count object, in the following format:
394
- *
395
- * @return N/A - Global summary object is updated with the counts
396
- *
397
- * @memberOf this
398
- */
399
- ACReporterXLSX.prototype.addToSummaryCount = function (pageCount) {
400
- };
401
- return ACReporterXLSX;
402
- }());
403
- exports.ACReporterXLSX = ACReporterXLSX;
404
- ;
405
- //# sourceMappingURL=ACReporterXLSX.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ACReporterXLSX.js","sourceRoot":"","sources":["../../../src-ts/lib/reporters/ACReporterXLSX.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;8EAc8E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE9E,uCAAuC;AACvC,8BAAgC;AAChC,uBAAyB;AACzB,sDAAqD;AACrD,sDAAqD;AAGrD,iDAAgD;AAChD,qDAAgD;AAIhD,IAAI,KAAK,GAAG,UAAS,GAAG;IACpB,IAAI,GAAG,KAAK,IAAI,EAAE;QACd,OAAO,QAAQ,CAAC;KACnB;SAAM,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,EAAE;QACxB,OAAO,IAAI,CAAC;KACf;SAAM;QACH,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9B,OAAO,YAAI,GAAG,OAAG,CAAC;KACrB;A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I,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACpI,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;IACnE,CAAC;IAED;;;;;;;;;;OAUG;IACH,2CAAkB,GAAlB,UAAmB,OAAO;QACtB,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;QACxE,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,0CAAiB,GAAjB,UAAkB,SAAS;IAE3B,CAAC;IACL,qBAAC;AAAD,CAAC,AApUD,IAoUC;AApUY,wCAAc;AAoU1B,CAAC"}
@@ -1,33 +0,0 @@
1
- import { IConfigUnsupported } from "../api/IChecker";
2
- export interface IPageScanSummary {
3
- label: string;
4
- }
5
- export interface IScanSummaryCounts {
6
- ignored?: number;
7
- violation?: number;
8
- review?: number;
9
- recommendation?: number;
10
- recommendationreview?: number;
11
- pass?: number;
12
- }
13
- export interface IScanSummary {
14
- counts: IScanSummaryCounts;
15
- startReport: number;
16
- endReport: number;
17
- toolID: string;
18
- policies: string;
19
- reportLevels: string[];
20
- labels: string[];
21
- failLevels: string[];
22
- scanID: string;
23
- pageScanSummary: IPageScanSummary[];
24
- }
25
- /**
26
- * This function is responsible for initializing the summary object which will store all informations about the
27
- * scans that will occurs while karma is still running and running compliance scans.
28
- *
29
- * @return {Object} scanSummary - return the built scan summary object
30
- *
31
- * @memberOf this
32
- */
33
- export declare function initializeSummary(config: IConfigUnsupported): IScanSummary;
@@ -1,65 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initializeSummary = void 0;
4
- /**
5
- * This function is responsible for initializing the summary object which will store all informations about the
6
- * scans that will occurs while karma is still running and running compliance scans.
7
- *
8
- * @return {Object} scanSummary - return the built scan summary object
9
- *
10
- * @memberOf this
11
- */
12
- function initializeSummary(config) {
13
- // Variable Decleration
14
- var scanSummary = {
15
- counts: {
16
- ignored: 0,
17
- violation: undefined,
18
- review: undefined,
19
- recommendation: undefined,
20
- recommendationreview: undefined,
21
- pass: undefined
22
- },
23
- startReport: Date.now(),
24
- endReport: 0,
25
- toolID: config.toolID,
26
- policies: config.policies.join(","),
27
- reportLevels: config.reportLevels,
28
- labels: config.label,
29
- failLevels: config.failLevels,
30
- // Add scanID (UUID) to the scan summary object
31
- scanID: config.scanID,
32
- // Build the paceScanSummary object which will contains all the items that were scanned and a count
33
- // summary for each of the scanned items.
34
- pageScanSummary: []
35
- };
36
- var reportLevels = config.reportLevels;
37
- // In the case that report levels are provided then populate the count object in
38
- // scanSummary.counts object with the levels which were provided in reportLevels
39
- // array.
40
- if (reportLevels) {
41
- // Iterate over the report levels and populate the pageResultsWithCount counts
42
- // object
43
- for (var _i = 0, reportLevels_1 = reportLevels; _i < reportLevels_1.length; _i++) {
44
- var level = reportLevels_1[_i];
45
- scanSummary.counts[level] = 0;
46
- }
47
- ;
48
- scanSummary.counts.ignored = 0;
49
- }
50
- // Populate the scanSummary.counts object with all the levels
51
- else {
52
- scanSummary.counts = {
53
- violation: 0,
54
- review: 0,
55
- recommendation: 0,
56
- recommendationreview: 0,
57
- pass: 0,
58
- ignored: 0
59
- };
60
- }
61
- return scanSummary;
62
- }
63
- exports.initializeSummary = initializeSummary;
64
- ;
65
- //# sourceMappingURL=ReportUtil.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReportUtil.js","sourceRoot":"","sources":["../../../src-ts/lib/reporters/ReportUtil.ts"],"names":[],"mappings":";;;AAiCA;;;;;;;GAOG;AACH,SAAgB,iBAAiB,CAAC,MAA0B;IACxD,uBAAuB;IACvB,IAAI,WAAW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@
1
- {"version":3,"file":"genReport.js","sourceRoot":"","sources":["../../../src-ts/lib/reporters/genReport.ts"],"names":[],"mappings":";;;AACA,2EAA2E;AAC3E,sCAAsC;AACtC,SAAgB,SAAS,CAAC,MAAY;IAClC,IAAI,MAAM,GAAG,uuinBAAuuinB;UAClvinB,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;UAC1C,80hcAA80hc,CAAC;IACj1hc,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC;AALD,8BAKC"}
@@ -1,27 +0,0 @@
1
- /******************************************************************************
2
- Copyright:: 2020- IBM, Inc
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- *****************************************************************************/
16
- import { IConfigUnsupported } from "../api/IChecker";
17
- export declare class MultiScanData {
18
- Config: IConfigUnsupported;
19
- constructor(config: IConfigUnsupported);
20
- issues_sheet_rows(xlsx_props: any): any;
21
- static checkpoints_string(rule_checkpoints_map: any, rule_id: string): string;
22
- static wcag_string(rule_checkpoints_map: any, rule_id: string): string;
23
- static id_rule_map(xlsx_props: any): Map<any, any>;
24
- static ruleId_checkpoints_map(xlsx_props: any): Map<any, any>;
25
- static get_element(code: string): string;
26
- static format_date(timestamp: string): string;
27
- }