accessibility-checker 4.0.0 → 4.0.1

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 (217) hide show
  1. package/bin/achecker.js +262 -213
  2. package/bin/achecker.js.map +1 -1
  3. package/index.js +63 -21
  4. package/index.js.map +1 -1
  5. package/lib/ACBrowserManager.js +203 -138
  6. package/lib/ACBrowserManager.js.map +1 -1
  7. package/lib/ACEngineManager.js +402 -395
  8. package/lib/ACEngineManager.js.map +1 -1
  9. package/lib/ACHelper.js +642 -581
  10. package/lib/ACHelper.js.map +1 -1
  11. package/lib/common/api-ext/Fetch.js +78 -58
  12. package/lib/common/api-ext/Fetch.js.map +1 -1
  13. package/lib/common/config/ACConfigManager.d.ts +1 -1
  14. package/lib/common/config/ACConfigManager.js +295 -285
  15. package/lib/common/config/ACConfigManager.js.map +1 -1
  16. package/lib/common/config/ACConstants.js +4 -38
  17. package/lib/common/config/ACConstants.js.map +1 -1
  18. package/lib/common/config/IConfig.d.ts +1 -1
  19. package/lib/common/engine/IChecker.d.ts +2 -2
  20. package/lib/common/engine/IEngine.d.ts +1 -1
  21. package/lib/common/engine/IGuideline.d.ts +1 -1
  22. package/lib/common/engine/IMapper.d.ts +1 -1
  23. package/lib/common/engine/IReport.d.ts +4 -4
  24. package/lib/common/engine/IRule.d.ts +4 -4
  25. package/lib/common/engine/IRuleset.d.ts +1 -1
  26. package/lib/common/report/ACReporterCSV.js +77 -42
  27. package/lib/common/report/ACReporterCSV.js.map +1 -1
  28. package/lib/common/report/ACReporterHTML.js +48 -15
  29. package/lib/common/report/ACReporterHTML.js.map +1 -1
  30. package/lib/common/report/ACReporterJSON.js +94 -59
  31. package/lib/common/report/ACReporterJSON.js.map +1 -1
  32. package/lib/common/report/ACReporterMetrics.js +108 -45
  33. package/lib/common/report/ACReporterMetrics.js.map +1 -1
  34. package/lib/common/report/ACReporterXLSX.js +300 -282
  35. package/lib/common/report/ACReporterXLSX.js.map +1 -1
  36. package/lib/common/report/BaselineManager.js +56 -82
  37. package/lib/common/report/BaselineManager.js.map +1 -1
  38. package/lib/common/report/ReporterManager.js +190 -125
  39. package/lib/common/report/ReporterManager.js.map +1 -1
  40. package/lib/common/report/genReport.js +2 -2
  41. package/package.json +4 -10
  42. package/cjs/bin/achecker.d.ts +0 -2
  43. package/cjs/bin/achecker.js +0 -306
  44. package/cjs/bin/achecker.js.map +0 -1
  45. package/cjs/index.d.ts +0 -319
  46. package/cjs/index.js +0 -402
  47. package/cjs/index.js.map +0 -1
  48. package/cjs/lib/ACBrowserManager.d.ts +0 -22
  49. package/cjs/lib/ACBrowserManager.js +0 -172
  50. package/cjs/lib/ACBrowserManager.js.map +0 -1
  51. package/cjs/lib/ACEngineManager.d.ts +0 -19
  52. package/cjs/lib/ACEngineManager.js +0 -457
  53. package/cjs/lib/ACEngineManager.js.map +0 -1
  54. package/cjs/lib/ACHelper.d.ts +0 -2
  55. package/cjs/lib/ACHelper.js +0 -678
  56. package/cjs/lib/ACHelper.js.map +0 -1
  57. package/cjs/lib/api/IChecker.d.ts +0 -28
  58. package/cjs/lib/api/IChecker.js +0 -11
  59. package/cjs/lib/api/IChecker.js.map +0 -1
  60. package/cjs/lib/api/IMapper.d.ts +0 -37
  61. package/cjs/lib/api/IMapper.js +0 -18
  62. package/cjs/lib/api/IMapper.js.map +0 -1
  63. package/cjs/lib/common/api-ext/Fetch.d.ts +0 -17
  64. package/cjs/lib/common/api-ext/Fetch.js +0 -95
  65. package/cjs/lib/common/api-ext/Fetch.js.map +0 -1
  66. package/cjs/lib/common/api-ext/IAbstractAPI.d.ts +0 -33
  67. package/cjs/lib/common/api-ext/IAbstractAPI.js +0 -18
  68. package/cjs/lib/common/api-ext/IAbstractAPI.js.map +0 -1
  69. package/cjs/lib/common/config/ACConfigManager.d.ts +0 -13
  70. package/cjs/lib/common/config/ACConfigManager.js +0 -483
  71. package/cjs/lib/common/config/ACConfigManager.js.map +0 -1
  72. package/cjs/lib/common/config/ACConstants.d.ts +0 -17
  73. package/cjs/lib/common/config/ACConstants.js +0 -111
  74. package/cjs/lib/common/config/ACConstants.js.map +0 -1
  75. package/cjs/lib/common/config/IArchive.d.ts +0 -37
  76. package/cjs/lib/common/config/IArchive.js +0 -18
  77. package/cjs/lib/common/config/IArchive.js.map +0 -1
  78. package/cjs/lib/common/config/IConfig.d.ts +0 -152
  79. package/cjs/lib/common/config/IConfig.js +0 -36
  80. package/cjs/lib/common/config/IConfig.js.map +0 -1
  81. package/cjs/lib/common/engine/IBounds.d.ts +0 -21
  82. package/cjs/lib/common/engine/IBounds.js +0 -18
  83. package/cjs/lib/common/engine/IBounds.js.map +0 -1
  84. package/cjs/lib/common/engine/IChecker.d.ts +0 -23
  85. package/cjs/lib/common/engine/IChecker.js +0 -18
  86. package/cjs/lib/common/engine/IChecker.js.map +0 -1
  87. package/cjs/lib/common/engine/IEngine.d.ts +0 -39
  88. package/cjs/lib/common/engine/IEngine.js +0 -18
  89. package/cjs/lib/common/engine/IEngine.js.map +0 -1
  90. package/cjs/lib/common/engine/IGuideline.d.ts +0 -53
  91. package/cjs/lib/common/engine/IGuideline.js +0 -37
  92. package/cjs/lib/common/engine/IGuideline.js.map +0 -1
  93. package/cjs/lib/common/engine/IMapper.d.ts +0 -32
  94. package/cjs/lib/common/engine/IMapper.js +0 -18
  95. package/cjs/lib/common/engine/IMapper.js.map +0 -1
  96. package/cjs/lib/common/engine/IReport.d.ts +0 -143
  97. package/cjs/lib/common/engine/IReport.js +0 -44
  98. package/cjs/lib/common/engine/IReport.js.map +0 -1
  99. package/cjs/lib/common/engine/IRule.d.ts +0 -100
  100. package/cjs/lib/common/engine/IRule.js +0 -87
  101. package/cjs/lib/common/engine/IRule.js.map +0 -1
  102. package/cjs/lib/common/engine/IRuleset.d.ts +0 -20
  103. package/cjs/lib/common/engine/IRuleset.js +0 -18
  104. package/cjs/lib/common/engine/IRuleset.js.map +0 -1
  105. package/cjs/lib/common/report/ACReporterCSV.d.ts +0 -28
  106. package/cjs/lib/common/report/ACReporterCSV.js +0 -75
  107. package/cjs/lib/common/report/ACReporterCSV.js.map +0 -1
  108. package/cjs/lib/common/report/ACReporterHTML.d.ts +0 -27
  109. package/cjs/lib/common/report/ACReporterHTML.js +0 -61
  110. package/cjs/lib/common/report/ACReporterHTML.js.map +0 -1
  111. package/cjs/lib/common/report/ACReporterJSON.d.ts +0 -36
  112. package/cjs/lib/common/report/ACReporterJSON.js +0 -109
  113. package/cjs/lib/common/report/ACReporterJSON.js.map +0 -1
  114. package/cjs/lib/common/report/ACReporterMetrics.d.ts +0 -78
  115. package/cjs/lib/common/report/ACReporterMetrics.js +0 -135
  116. package/cjs/lib/common/report/ACReporterMetrics.js.map +0 -1
  117. package/cjs/lib/common/report/ACReporterXLSX.d.ts +0 -38
  118. package/cjs/lib/common/report/ACReporterXLSX.js +0 -996
  119. package/cjs/lib/common/report/ACReporterXLSX.js.map +0 -1
  120. package/cjs/lib/common/report/BaselineManager.d.ts +0 -169
  121. package/cjs/lib/common/report/BaselineManager.js +0 -382
  122. package/cjs/lib/common/report/BaselineManager.js.map +0 -1
  123. package/cjs/lib/common/report/ReporterManager.d.ts +0 -79
  124. package/cjs/lib/common/report/ReporterManager.js +0 -469
  125. package/cjs/lib/common/report/ReporterManager.js.map +0 -1
  126. package/cjs/lib/common/report/genReport.d.ts +0 -1
  127. package/cjs/lib/common/report/genReport.js +0 -12
  128. package/cjs/lib/common/report/genReport.js.map +0 -1
  129. package/cjs/package.json +0 -3
  130. package/mjs/bin/achecker.d.ts +0 -2
  131. package/mjs/bin/achecker.js +0 -236
  132. package/mjs/bin/achecker.js.map +0 -1
  133. package/mjs/index.d.ts +0 -319
  134. package/mjs/index.js +0 -368
  135. package/mjs/index.js.map +0 -1
  136. package/mjs/lib/ACBrowserManager.d.ts +0 -22
  137. package/mjs/lib/ACBrowserManager.js +0 -121
  138. package/mjs/lib/ACBrowserManager.js.map +0 -1
  139. package/mjs/lib/ACEngineManager.d.ts +0 -19
  140. package/mjs/lib/ACEngineManager.js +0 -397
  141. package/mjs/lib/ACEngineManager.js.map +0 -1
  142. package/mjs/lib/ACHelper.d.ts +0 -2
  143. package/mjs/lib/ACHelper.js +0 -614
  144. package/mjs/lib/ACHelper.js.map +0 -1
  145. package/mjs/lib/api/IChecker.d.ts +0 -28
  146. package/mjs/lib/api/IChecker.js +0 -8
  147. package/mjs/lib/api/IChecker.js.map +0 -1
  148. package/mjs/lib/api/IMapper.d.ts +0 -37
  149. package/mjs/lib/api/IMapper.js +0 -17
  150. package/mjs/lib/api/IMapper.js.map +0 -1
  151. package/mjs/lib/common/api-ext/Fetch.d.ts +0 -17
  152. package/mjs/lib/common/api-ext/Fetch.js +0 -45
  153. package/mjs/lib/common/api-ext/Fetch.js.map +0 -1
  154. package/mjs/lib/common/api-ext/IAbstractAPI.d.ts +0 -33
  155. package/mjs/lib/common/api-ext/IAbstractAPI.js +0 -17
  156. package/mjs/lib/common/api-ext/IAbstractAPI.js.map +0 -1
  157. package/mjs/lib/common/config/ACConfigManager.d.ts +0 -13
  158. package/mjs/lib/common/config/ACConfigManager.js +0 -421
  159. package/mjs/lib/common/config/ACConfigManager.js.map +0 -1
  160. package/mjs/lib/common/config/ACConstants.d.ts +0 -17
  161. package/mjs/lib/common/config/ACConstants.js +0 -75
  162. package/mjs/lib/common/config/ACConstants.js.map +0 -1
  163. package/mjs/lib/common/config/IArchive.d.ts +0 -37
  164. package/mjs/lib/common/config/IArchive.js +0 -17
  165. package/mjs/lib/common/config/IArchive.js.map +0 -1
  166. package/mjs/lib/common/config/IConfig.d.ts +0 -152
  167. package/mjs/lib/common/config/IConfig.js +0 -33
  168. package/mjs/lib/common/config/IConfig.js.map +0 -1
  169. package/mjs/lib/common/engine/IBounds.d.ts +0 -21
  170. package/mjs/lib/common/engine/IBounds.js +0 -17
  171. package/mjs/lib/common/engine/IBounds.js.map +0 -1
  172. package/mjs/lib/common/engine/IChecker.d.ts +0 -23
  173. package/mjs/lib/common/engine/IChecker.js +0 -17
  174. package/mjs/lib/common/engine/IChecker.js.map +0 -1
  175. package/mjs/lib/common/engine/IEngine.d.ts +0 -39
  176. package/mjs/lib/common/engine/IEngine.js +0 -17
  177. package/mjs/lib/common/engine/IEngine.js.map +0 -1
  178. package/mjs/lib/common/engine/IGuideline.d.ts +0 -53
  179. package/mjs/lib/common/engine/IGuideline.js +0 -34
  180. package/mjs/lib/common/engine/IGuideline.js.map +0 -1
  181. package/mjs/lib/common/engine/IMapper.d.ts +0 -32
  182. package/mjs/lib/common/engine/IMapper.js +0 -17
  183. package/mjs/lib/common/engine/IMapper.js.map +0 -1
  184. package/mjs/lib/common/engine/IReport.d.ts +0 -143
  185. package/mjs/lib/common/engine/IReport.js +0 -36
  186. package/mjs/lib/common/engine/IReport.js.map +0 -1
  187. package/mjs/lib/common/engine/IRule.d.ts +0 -100
  188. package/mjs/lib/common/engine/IRule.js +0 -79
  189. package/mjs/lib/common/engine/IRule.js.map +0 -1
  190. package/mjs/lib/common/engine/IRuleset.d.ts +0 -20
  191. package/mjs/lib/common/engine/IRuleset.js +0 -17
  192. package/mjs/lib/common/engine/IRuleset.js.map +0 -1
  193. package/mjs/lib/common/report/ACReporterCSV.d.ts +0 -28
  194. package/mjs/lib/common/report/ACReporterCSV.js +0 -60
  195. package/mjs/lib/common/report/ACReporterCSV.js.map +0 -1
  196. package/mjs/lib/common/report/ACReporterHTML.d.ts +0 -27
  197. package/mjs/lib/common/report/ACReporterHTML.js +0 -46
  198. package/mjs/lib/common/report/ACReporterHTML.js.map +0 -1
  199. package/mjs/lib/common/report/ACReporterJSON.d.ts +0 -36
  200. package/mjs/lib/common/report/ACReporterJSON.js +0 -94
  201. package/mjs/lib/common/report/ACReporterJSON.js.map +0 -1
  202. package/mjs/lib/common/report/ACReporterMetrics.d.ts +0 -78
  203. package/mjs/lib/common/report/ACReporterMetrics.js +0 -122
  204. package/mjs/lib/common/report/ACReporterMetrics.js.map +0 -1
  205. package/mjs/lib/common/report/ACReporterXLSX.d.ts +0 -38
  206. package/mjs/lib/common/report/ACReporterXLSX.js +0 -948
  207. package/mjs/lib/common/report/ACReporterXLSX.js.map +0 -1
  208. package/mjs/lib/common/report/BaselineManager.d.ts +0 -169
  209. package/mjs/lib/common/report/BaselineManager.js +0 -348
  210. package/mjs/lib/common/report/BaselineManager.js.map +0 -1
  211. package/mjs/lib/common/report/ReporterManager.d.ts +0 -79
  212. package/mjs/lib/common/report/ReporterManager.js +0 -469
  213. package/mjs/lib/common/report/ReporterManager.js.map +0 -1
  214. package/mjs/lib/common/report/genReport.d.ts +0 -1
  215. package/mjs/lib/common/report/genReport.js +0 -9
  216. package/mjs/lib/common/report/genReport.js.map +0 -1
  217. package/mjs/package.json +0 -3
@@ -1,143 +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 { eRuleLevel } from "../config/IConfig";
17
- import { Guideline, eGuidelineCategory } from "./IGuideline";
18
- import { Issue, eRulePolicy as eRulePolicyNew, eRuleConfidence as eRuleConfidenceNew } from "./IRule";
19
- import { Bounds as BoundsNew } from "./IBounds";
20
- /**
21
- * @deprecated See ./IRule
22
- */
23
- export { eRuleConfidence } from "./IRule";
24
- /**
25
- * @deprecated See ./IRule
26
- */
27
- export { eRulePolicy } from "./IRule";
28
- /**
29
- * @deprecated See ./IGuideline
30
- */
31
- export { eToolkitLevel } from "./IGuideline";
32
- /**
33
- * @deprecated See ./IGuideline::eGuidelineCategory
34
- */
35
- export { eGuidelineCategory as eRuleCategory } from "./IGuideline";
36
- /**
37
- * @deprecated See ./IGuideline::eGuidelineType
38
- */
39
- export { eGuidelineType as eRuleType } from "./IGuideline";
40
- /**
41
- * @deprecated See ./IBounds
42
- */
43
- export type Bounds = BoundsNew;
44
- /**
45
- * @deprecated See ./IGuidline
46
- */
47
- export type IRuleset = Guideline;
48
- export type IEngineReport = {
49
- results: Issue[];
50
- numExecuted: number;
51
- ruleTime: number;
52
- totalTime?: number;
53
- screenshot?: string;
54
- nls?: {
55
- [ruleId: string]: {
56
- [reasonId: string]: string;
57
- };
58
- };
59
- summary?: {
60
- counts?: EngineSummaryCounts;
61
- };
62
- };
63
- export type IEngineResult = Issue;
64
- export type IBaselineResult = IEngineResult & {
65
- ignored: boolean;
66
- help: string;
67
- level: eRuleLevel;
68
- };
69
- export type EngineSummaryCounts = {
70
- violation: number;
71
- potentialviolation: number;
72
- recommendation: number;
73
- potentialrecommendation: number;
74
- manual: number;
75
- pass: number;
76
- };
77
- export type SummaryCounts = {
78
- violation: number;
79
- potentialviolation: number;
80
- recommendation: number;
81
- potentialrecommendation: number;
82
- manual: number;
83
- pass: number;
84
- ignored: number;
85
- elements: number;
86
- elementsViolation: number;
87
- elementsViolationReview: number;
88
- };
89
- export type IBaselineReport = {
90
- results: IBaselineResult[];
91
- numExecuted: number;
92
- nls: {
93
- [ruleId: string]: {
94
- [reasonId: string]: string;
95
- };
96
- };
97
- summary: {
98
- counts: SummaryCounts;
99
- scanTime: number;
100
- ruleArchive: string;
101
- policies: string[];
102
- reportLevels: string[];
103
- startScan: number;
104
- URL: string;
105
- };
106
- scanID: string;
107
- toolID: string;
108
- label: string;
109
- };
110
- export type CompressedReport = [
111
- number,
112
- string,
113
- string,
114
- string,
115
- string,
116
- number,
117
- number,
118
- string,
119
- string[],
120
- string[],
121
- CompressedIssue[],
122
- SummaryCounts
123
- ];
124
- export type CompressedIssue = [
125
- // results
126
- eGuidelineCategory | undefined,
127
- string,
128
- [
129
- eRulePolicyNew,
130
- eRuleConfidenceNew
131
- ],
132
- // value
133
- number | string | undefined,
134
- string[],
135
- {
136
- [ns: string]: string;
137
- },
138
- number,
139
- string,
140
- string,
141
- boolean,
142
- string
143
- ];
@@ -1,44 +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
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.eRuleType = exports.eRuleCategory = exports.eToolkitLevel = exports.eRulePolicy = exports.eRuleConfidence = void 0;
19
- /**
20
- * @deprecated See ./IRule
21
- */
22
- var IRule_1 = require("./IRule");
23
- Object.defineProperty(exports, "eRuleConfidence", { enumerable: true, get: function () { return IRule_1.eRuleConfidence; } });
24
- /**
25
- * @deprecated See ./IRule
26
- */
27
- var IRule_2 = require("./IRule");
28
- Object.defineProperty(exports, "eRulePolicy", { enumerable: true, get: function () { return IRule_2.eRulePolicy; } });
29
- /**
30
- * @deprecated See ./IGuideline
31
- */
32
- var IGuideline_1 = require("./IGuideline");
33
- Object.defineProperty(exports, "eToolkitLevel", { enumerable: true, get: function () { return IGuideline_1.eToolkitLevel; } });
34
- /**
35
- * @deprecated See ./IGuideline::eGuidelineCategory
36
- */
37
- var IGuideline_2 = require("./IGuideline");
38
- Object.defineProperty(exports, "eRuleCategory", { enumerable: true, get: function () { return IGuideline_2.eGuidelineCategory; } });
39
- /**
40
- * @deprecated See ./IGuideline::eGuidelineType
41
- */
42
- var IGuideline_3 = require("./IGuideline");
43
- Object.defineProperty(exports, "eRuleType", { enumerable: true, get: function () { return IGuideline_3.eGuidelineType; } });
44
- //# sourceMappingURL=IReport.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IReport.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/engine/IReport.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;+EAc+E;;;AAO/E;;GAEG;AACH,iCAA0C;AAAjC,wGAAA,eAAe,OAAA;AAExB;;GAEG;AACH,iCAAsC;AAA7B,oGAAA,WAAW,OAAA;AAEpB;;GAEG;AACH,2CAA6C;AAApC,2GAAA,aAAa,OAAA;AAEtB;;GAEG;AACH,2CAAmE;AAA1D,2GAAA,kBAAkB,OAAiB;AAE5C;;GAEG;AACH,2CAA2D;AAAlD,uGAAA,cAAc,OAAa"}
@@ -1,100 +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 { eGuidelineCategory } from "./IGuideline";
17
- import { IMapResult } from "./IMapper";
18
- import { eToolkitLevel as eToolkitLevelNew } from "./IGuideline";
19
- import { Bounds } from "./IBounds";
20
- export declare enum eRuleConfidence {
21
- PASS = "PASS",
22
- FAIL = "FAIL",
23
- POTENTIAL = "POTENTIAL",
24
- MANUAL = "MANUAL"
25
- }
26
- export declare enum eRulePolicy {
27
- VIOLATION = "VIOLATION",
28
- RECOMMENDATION = "RECOMMENDATION",
29
- INFORMATION = "INFORMATION"
30
- }
31
- export declare function RulePass(reasonId: number | string, messageArgs?: string[], apiArgs?: any[]): RuleResult;
32
- export declare function RuleRender(reasonId: number | string, messageArgs?: string[], apiArgs?: any[]): RuleResult;
33
- export declare function RuleFail(reasonId: number | string, messageArgs?: string[], apiArgs?: any[]): RuleResult;
34
- export declare function RulePotential(reasonId: number | string, messageArgs?: string[], apiArgs?: any[]): RuleResult;
35
- export declare function RuleManual(reasonId: number | string, messageArgs?: string[], apiArgs?: any[]): RuleResult;
36
- export type RuleResult = {
37
- value: [eRulePolicy, eRuleConfidence];
38
- reasonId?: number | string;
39
- messageArgs?: string[];
40
- apiArgs?: any[];
41
- };
42
- export type Issue = RuleResult & {
43
- ruleId: string;
44
- node: Node;
45
- category?: eGuidelineCategory;
46
- path: {
47
- [ns: string]: string;
48
- };
49
- ruleTime: number;
50
- message: string;
51
- bounds?: Bounds;
52
- snippet: string;
53
- level?: string;
54
- };
55
- export type RuleContextHierarchy = {
56
- [namespace: string]: IMapResult[];
57
- };
58
- export type RuleContext = {
59
- [namespace: string]: IMapResult;
60
- };
61
- export type Rule = {
62
- id: string;
63
- rulesets: Array<{
64
- id: string | string[];
65
- num: string | string[];
66
- level: eRulePolicy;
67
- toolkitLevel: eToolkitLevelNew;
68
- reasonCodes?: string[];
69
- }>;
70
- refactor?: {
71
- [oldRuleId: string]: {
72
- [oldReasonCode: string]: string;
73
- };
74
- };
75
- messages: {
76
- [locale: string]: {
77
- [reasonId: string]: string;
78
- };
79
- };
80
- help: {
81
- [locale: string]: {
82
- [reasonId: string]: string;
83
- };
84
- };
85
- /**
86
- * How this rule maps to ACT rules, if any (https://act-rules.github.io/rules/)
87
- *
88
- * string: For a single rule mapping that matches exactly to the rule (Pass -> pass, Potential -> cantTell, Fail -> fail, unlisted => inapplicable)
89
- * Array<>: Custom mapping of rule to ACT results
90
- */
91
- act?: string | string[] | Array<string | {
92
- [actRuleId: string]: {
93
- [reasonId: string]: "pass" | "fail" | "cantTell" | "inapplicable";
94
- };
95
- }>;
96
- context: string;
97
- dependencies?: string[];
98
- run: (context: RuleContext, options?: {}, contextHierarchies?: RuleContextHierarchy) => RuleResult | RuleResult[] | null;
99
- enabled?: boolean;
100
- };
@@ -1,87 +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
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.eRulePolicy = exports.eRuleConfidence = void 0;
19
- exports.RulePass = RulePass;
20
- exports.RuleRender = RuleRender;
21
- exports.RuleFail = RuleFail;
22
- exports.RulePotential = RulePotential;
23
- exports.RuleManual = RuleManual;
24
- var eRuleConfidence;
25
- (function (eRuleConfidence) {
26
- eRuleConfidence["PASS"] = "PASS";
27
- eRuleConfidence["FAIL"] = "FAIL";
28
- eRuleConfidence["POTENTIAL"] = "POTENTIAL";
29
- eRuleConfidence["MANUAL"] = "MANUAL";
30
- })(eRuleConfidence || (exports.eRuleConfidence = eRuleConfidence = {}));
31
- var eRulePolicy;
32
- (function (eRulePolicy) {
33
- eRulePolicy["VIOLATION"] = "VIOLATION";
34
- eRulePolicy["RECOMMENDATION"] = "RECOMMENDATION";
35
- eRulePolicy["INFORMATION"] = "INFORMATION";
36
- })(eRulePolicy || (exports.eRulePolicy = eRulePolicy = {}));
37
- function RulePass(reasonId, messageArgs, apiArgs) {
38
- if (typeof reasonId === "undefined" || reasonId === null)
39
- throw new Error("Reason ID must be defined");
40
- return {
41
- value: [eRulePolicy.INFORMATION, eRuleConfidence.PASS],
42
- reasonId: reasonId,
43
- messageArgs: messageArgs || [],
44
- apiArgs: apiArgs || []
45
- };
46
- }
47
- function RuleRender(reasonId, messageArgs, apiArgs) {
48
- if (typeof reasonId === "undefined" || reasonId === null)
49
- throw new Error("Reason ID must be defined");
50
- return {
51
- value: [eRulePolicy.INFORMATION, eRuleConfidence.PASS],
52
- reasonId: 0,
53
- messageArgs: messageArgs || [],
54
- apiArgs: apiArgs || []
55
- };
56
- }
57
- function RuleFail(reasonId, messageArgs, apiArgs) {
58
- if (typeof reasonId === "undefined" || reasonId === null)
59
- throw new Error("Reason ID must be defined");
60
- return {
61
- value: [eRulePolicy.INFORMATION, eRuleConfidence.FAIL],
62
- reasonId: reasonId,
63
- messageArgs: messageArgs || [],
64
- apiArgs: apiArgs || []
65
- };
66
- }
67
- function RulePotential(reasonId, messageArgs, apiArgs) {
68
- if (typeof reasonId === "undefined" || reasonId === null)
69
- throw new Error("Reason ID must be defined");
70
- return {
71
- value: [eRulePolicy.INFORMATION, eRuleConfidence.POTENTIAL],
72
- reasonId: reasonId,
73
- messageArgs: messageArgs || [],
74
- apiArgs: apiArgs || []
75
- };
76
- }
77
- function RuleManual(reasonId, messageArgs, apiArgs) {
78
- if (typeof reasonId === "undefined" || reasonId === null)
79
- throw new Error("Reason ID must be defined");
80
- return {
81
- value: [eRulePolicy.INFORMATION, eRuleConfidence.MANUAL],
82
- reasonId: reasonId,
83
- messageArgs: messageArgs || [],
84
- apiArgs: apiArgs || []
85
- };
86
- }
87
- //# sourceMappingURL=IRule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IRule.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/engine/IRule.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;+EAc+E;;;AAoB/E,4BAQC;AAED,gCAQC;AACD,4BAQC;AAED,sCAQC;AAED,gCAQC;AA5DD,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,gCAAa,CAAA;IACb,0CAAuB,CAAA;IACvB,oCAAiB,CAAA;AACrB,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B;AAED,IAAY,WAIX;AAJD,WAAY,WAAW;IACnB,sCAAuB,CAAA;IACvB,gDAAiC,CAAA;IACjC,0CAA2B,CAAA;AAC/B,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAED,SAAgB,QAAQ,CAAC,QAAyB,EAAE,WAAuB,EAAE,OAAgB;IACzF,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,QAAQ,KAAK,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACvG,OAAO;QACH,KAAK,EAAE,CAAC,WAAW,CAAC,WAAW,EAAE,eAAe,CAAC,IAAI,CAAC;QACtD,QAAQ,EAAE,QAAQ;QAClB,WAAW,EAAE,WAAW,IAAI,EAAE;QAC9B,OAAO,EAAE,OAAO,IAAI,EAAE;KACzB,CAAA;AACL,CAAC;AAED,SAAgB,UAAU,CAAC,QAAyB,EAAE,WAAuB,EAAE,OAAgB;IAC3F,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,QAAQ,KAAK,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACvG,OAAO;QACH,KAAK,EAAE,CAAC,WAAW,CAAC,WAAW,EAAE,eAAe,CAAC,IAAI,CAAC;QACtD,QAAQ,EAAE,CAAC;QACX,WAAW,EAAE,WAAW,IAAI,EAAE;QAC9B,OAAO,EAAE,OAAO,IAAI,EAAE;KACzB,CAAA;AACL,CAAC;AACD,SAAgB,QAAQ,CAAC,QAAyB,EAAE,WAAuB,EAAE,OAAgB;IACzF,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,QAAQ,KAAK,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACvG,OAAO;QACH,KAAK,EAAE,CAAC,WAAW,CAAC,WAAW,EAAE,eAAe,CAAC,IAAI,CAAC;QACtD,QAAQ,EAAE,QAAQ;QAClB,WAAW,EAAE,WAAW,IAAI,EAAE;QAC9B,OAAO,EAAE,OAAO,IAAI,EAAE;KACzB,CAAA;AACL,CAAC;AAED,SAAgB,aAAa,CAAC,QAAyB,EAAE,WAAuB,EAAE,OAAgB;IAC9F,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,QAAQ,KAAK,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACvG,OAAO;QACH,KAAK,EAAE,CAAC,WAAW,CAAC,WAAW,EAAE,eAAe,CAAC,SAAS,CAAC;QAC3D,QAAQ,EAAE,QAAQ;QAClB,WAAW,EAAE,WAAW,IAAI,EAAE;QAC9B,OAAO,EAAE,OAAO,IAAI,EAAE;KACzB,CAAA;AACL,CAAC;AAED,SAAgB,UAAU,CAAC,QAAyB,EAAE,WAAuB,EAAE,OAAgB;IAC3F,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,QAAQ,KAAK,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACvG,OAAO;QACH,KAAK,EAAE,CAAC,WAAW,CAAC,WAAW,EAAE,eAAe,CAAC,MAAM,CAAC;QACxD,QAAQ,EAAE,QAAQ;QAClB,WAAW,EAAE,WAAW,IAAI,EAAE;QAC9B,OAAO,EAAE,OAAO,IAAI,EAAE;KACzB,CAAA;AACL,CAAC"}
@@ -1,20 +0,0 @@
1
- /******************************************************************************
2
- Copyright:: 2023- 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 { Guideline } from "./IGuideline";
17
- /**
18
- * @deprecated
19
- */
20
- export type IRuleset = Guideline;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- /******************************************************************************
3
- Copyright:: 2023- 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
- Object.defineProperty(exports, "__esModule", { value: true });
18
- //# sourceMappingURL=IRuleset.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IRuleset.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/engine/IRuleset.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;8EAc8E"}
@@ -1,28 +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 { IConfigInternal } from "../config/IConfig.js";
17
- import { Guideline } from "../engine/IGuideline.js";
18
- import { CompressedReport } from "../engine/IReport.js";
19
- import { GenSummReturn, IReporter } from "./ReporterManager.js";
20
- export declare class ACReporterCSV implements IReporter {
21
- name(): string;
22
- private static toCSV;
23
- generateReport(_reportData: any): {
24
- reportPath: string;
25
- report: string;
26
- } | void;
27
- generateSummary(config: IConfigInternal, _rulesets: Guideline[], endReport: number, compressedReports: CompressedReport[]): Promise<GenSummReturn>;
28
- }
@@ -1,75 +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
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.ACReporterCSV = void 0;
28
- const ReporterManager_js_1 = require("./ReporterManager.js");
29
- class ACReporterCSV {
30
- name() {
31
- return "csv";
32
- }
33
- generateReport(_reportData) {
34
- }
35
- generateSummary(config, _rulesets, endReport, compressedReports) {
36
- return __awaiter(this, void 0, void 0, function* () {
37
- let toCSV = ACReporterCSV.toCSV;
38
- let resultStr = `Label,Level,RuleId,Message,Xpath,Help\n`;
39
- let startScan = 0;
40
- for (const compressedReport of compressedReports) {
41
- let reportStored = ReporterManager_js_1.ReporterManager.uncompressReport(compressedReport);
42
- if (startScan === 0) {
43
- startScan = reportStored.engineReport.summary.startScan;
44
- }
45
- let report = reportStored.engineReport;
46
- for (const result of report.results) {
47
- resultStr += `${toCSV(reportStored.label)},${toCSV(result.level)},${toCSV(result.ruleId)},${toCSV(result.message)},${toCSV(result.path.dom)},${toCSV(result.help)}\n`;
48
- }
49
- }
50
- let startScanD = new Date(startScan);
51
- let reportFilename = `results_${startScanD.toISOString().replace(/:/g, "-")}.csv`;
52
- if (config.outputFilenameTimestamp === false) {
53
- reportFilename = `results.csv`;
54
- }
55
- return {
56
- summaryPath: reportFilename,
57
- summary: resultStr
58
- };
59
- });
60
- }
61
- }
62
- exports.ACReporterCSV = ACReporterCSV;
63
- ACReporterCSV.toCSV = function (str) {
64
- if (str === null) {
65
- return '"null"';
66
- }
67
- else if (!str || str.length == 0) {
68
- return '""';
69
- }
70
- else {
71
- str = str.replace(/"/g, '""');
72
- return `"${str}"`;
73
- }
74
- };
75
- //# sourceMappingURL=ACReporterCSV.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ACReporterCSV.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/report/ACReporterCSV.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;gFAcgF;;;;;;;;;;;;AAKhF,6DAAiF;AAEjF,MAAa,aAAa;IACf,IAAI;QACP,OAAO,KAAK,CAAC;IACjB,CAAC;IAYM,cAAc,CAAC,WAAW;IACjC,CAAC;IACY,eAAe,CAAC,MAAuB,EAAE,SAAsB,EAAE,SAAiB,EAAE,iBAAqC;;YAClI,IAAI,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC;YAChC,IAAI,SAAS,GAAG,yCAAyC,CAAC;YAC1D,IAAI,SAAS,GAAG,CAAC,CAAC;YAClB,KAAK,MAAM,gBAAgB,IAAI,iBAAiB,EAAE,CAAC;gBAC/C,IAAI,YAAY,GAAG,oCAAe,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;gBACtE,IAAI,SAAS,KAAK,CAAC,EAAE,CAAC;oBAClB,SAAS,GAAG,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC;gBAC5D,CAAC;gBACD,IAAI,MAAM,GAAG,YAAY,CAAC,YAAY,CAAC;gBACvC,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;oBAClC,SAAS,IAAI,GAAG,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAA;gBACzK,CAAC;YACL,CAAC;YACD,IAAI,UAAU,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;YACrC,IAAI,cAAc,GAAG,WAAW,UAAU,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAC,GAAG,CAAC,MAAM,CAAC;YACjF,IAAI,MAAM,CAAC,uBAAuB,KAAK,KAAK,EAAE,CAAC;gBAC3C,cAAc,GAAG,aAAa,CAAC;YACnC,CAAC;YACD,OAAO;gBACH,WAAW,EAAE,cAAc;gBAC3B,OAAO,EAAE,SAAS;aACrB,CAAA;QACL,CAAC;KAAA;;AAxCL,sCAyCC;AArCkB,mBAAK,GAAG,UAAS,GAAG;IAC/B,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QACf,OAAO,QAAQ,CAAC;IACpB,CAAC;SAAM,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC;IAChB,CAAC;SAAM,CAAC;QACJ,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9B,OAAO,IAAI,GAAG,GAAG,CAAC;IACtB,CAAC;AACL,CAAC,CAAA"}
@@ -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 { IConfigInternal } from "../config/IConfig.js";
17
- import { Guideline } from "../engine/IGuideline.js";
18
- import { CompressedReport } from "../engine/IReport.js";
19
- import { GenSummReturn, IReporter, IReporterStored } from "./ReporterManager.js";
20
- export declare class ACReporterHTML implements IReporter {
21
- name(): string;
22
- generateReport(config: IConfigInternal, rulesets: Guideline[], storedReport: IReporterStored): {
23
- reportPath: string;
24
- report: string;
25
- } | void;
26
- generateSummary(_config: IConfigInternal, rulesets: Guideline[], _endReport: number, _summaryData: CompressedReport[]): Promise<GenSummReturn>;
27
- }
@@ -1,61 +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
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.ACReporterHTML = void 0;
28
- const genReport_js_1 = require("./genReport.js");
29
- class ACReporterHTML {
30
- name() {
31
- return "html";
32
- }
33
- generateReport(config, rulesets, storedReport) {
34
- let cloneReport = JSON.parse(JSON.stringify(storedReport.engineReport));
35
- let outReport = {
36
- report: {
37
- timestamp: storedReport.startScan,
38
- nls: cloneReport.nls,
39
- results: cloneReport.results.filter((issue) => issue.value[1] !== "PASS"),
40
- passUniqueElements: Array.from(new Set(cloneReport.results.map(result => result.path.dom))),
41
- counts: {
42
- total: {
43
- All: 0
44
- }
45
- }
46
- },
47
- rulesets: rulesets,
48
- tabURL: storedReport.url
49
- };
50
- return {
51
- reportPath: `${storedReport.label.replace(/[:?&=]/g, "_")}.html`,
52
- report: (0, genReport_js_1.genReport)(outReport)
53
- };
54
- }
55
- generateSummary(_config, rulesets, _endReport, _summaryData) {
56
- return __awaiter(this, void 0, void 0, function* () {
57
- });
58
- }
59
- }
60
- exports.ACReporterHTML = ACReporterHTML;
61
- //# sourceMappingURL=ACReporterHTML.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ACReporterHTML.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/report/ACReporterHTML.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;gFAcgF;;;;;;;;;;;;AAMhF,iDAA2C;AAE3C,MAAa,cAAc;IAChB,IAAI;QACP,OAAO,MAAM,CAAC;IAClB,CAAC;IAEM,cAAc,CAAC,MAAuB,EAAE,QAAqB,EAAE,YAA6B;QAC/F,IAAI,WAAW,GAAoB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC;QAEzF,IAAI,SAAS,GAAG;YACZ,MAAM,EAAE;gBACJ,SAAS,EAAE,YAAY,CAAC,SAAS;gBACjC,GAAG,EAAE,WAAW,CAAC,GAAG;gBACpB,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;gBAC9E,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;gBAC3F,MAAM,EAAE;oBACJ,KAAK,EAAE;wBACH,GAAG,EAAE,CAAC;qBACT;iBACJ;aACJ;YACD,QAAQ,EAAE,QAAQ;YAClB,MAAM,EAAE,YAAY,CAAC,GAAG;SAC3B,CAAA;QAED,OAAO;YACH,UAAU,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,EAAC,GAAG,CAAC,OAAO;YAC/D,MAAM,EAAE,IAAA,wBAAS,EAAC,SAAS,CAAC;SAC/B,CAAC;IACN,CAAC;IACY,eAAe,CAAC,OAAwB,EAAE,QAAqB,EAAE,UAAkB,EAAE,YAAgC;;QAClI,CAAC;KAAA;CACJ;AA/BD,wCA+BC"}
@@ -1,36 +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 { IConfigInternal } from "../config/IConfig.js";
17
- import { Guideline } from "../engine/IGuideline.js";
18
- import { CompressedReport } from "../engine/IReport.js";
19
- import { GenSummReturn, IReporter, IReporterStored } from "./ReporterManager.js";
20
- export declare class ACReporterJSON implements IReporter {
21
- name(): string;
22
- generateReport(config: IConfigInternal, rulesets: Guideline[], storedReport: IReporterStored): {
23
- reportPath: string;
24
- report: string;
25
- } | void;
26
- generateSummary(config: IConfigInternal, _rulesets: Guideline[], endReport: number, compressedReports: CompressedReport[]): Promise<GenSummReturn>;
27
- static generateReportSummary(config: IConfigInternal, rulesets: Guideline[], storedReport: IReporterStored): {
28
- counts: import("../engine/IReport.js").SummaryCounts;
29
- scanTime: any;
30
- ruleArchive: string;
31
- policies: string[];
32
- reportLevels: import("../config/IConfig.js").eRuleLevel[];
33
- startScan: number;
34
- URL: string;
35
- };
36
- }