accessibility-checker 4.0.1 → 4.0.2
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/bin/achecker.js +213 -262
- package/bin/achecker.js.map +1 -1
- package/cjs/bin/achecker.d.ts +2 -0
- package/cjs/bin/achecker.js +306 -0
- package/cjs/bin/achecker.js.map +1 -0
- package/cjs/index.d.ts +319 -0
- package/cjs/index.js +402 -0
- package/cjs/index.js.map +1 -0
- package/cjs/lib/ACBrowserManager.d.ts +22 -0
- package/cjs/lib/ACBrowserManager.js +172 -0
- package/cjs/lib/ACBrowserManager.js.map +1 -0
- package/cjs/lib/ACEngineManager.d.ts +19 -0
- package/cjs/lib/ACEngineManager.js +457 -0
- package/cjs/lib/ACEngineManager.js.map +1 -0
- package/cjs/lib/ACHelper.d.ts +2 -0
- package/cjs/lib/ACHelper.js +678 -0
- package/cjs/lib/ACHelper.js.map +1 -0
- package/cjs/lib/api/IChecker.d.ts +28 -0
- package/cjs/lib/api/IChecker.js +11 -0
- package/cjs/lib/api/IChecker.js.map +1 -0
- package/cjs/lib/api/IMapper.d.ts +37 -0
- package/cjs/lib/api/IMapper.js +18 -0
- package/cjs/lib/api/IMapper.js.map +1 -0
- package/cjs/lib/common/api-ext/Fetch.d.ts +17 -0
- package/cjs/lib/common/api-ext/Fetch.js +95 -0
- package/cjs/lib/common/api-ext/Fetch.js.map +1 -0
- package/cjs/lib/common/api-ext/IAbstractAPI.d.ts +33 -0
- package/cjs/lib/common/api-ext/IAbstractAPI.js +18 -0
- package/cjs/lib/common/api-ext/IAbstractAPI.js.map +1 -0
- package/cjs/lib/common/config/ACConfigManager.d.ts +13 -0
- package/cjs/lib/common/config/ACConfigManager.js +483 -0
- package/cjs/lib/common/config/ACConfigManager.js.map +1 -0
- package/cjs/lib/common/config/ACConstants.d.ts +17 -0
- package/cjs/lib/common/config/ACConstants.js +111 -0
- package/cjs/lib/common/config/ACConstants.js.map +1 -0
- package/cjs/lib/common/config/IArchive.d.ts +37 -0
- package/cjs/lib/common/config/IArchive.js +18 -0
- package/cjs/lib/common/config/IArchive.js.map +1 -0
- package/cjs/lib/common/config/IConfig.d.ts +152 -0
- package/cjs/lib/common/config/IConfig.js +36 -0
- package/cjs/lib/common/config/IConfig.js.map +1 -0
- package/cjs/lib/common/engine/IBounds.d.ts +21 -0
- package/cjs/lib/common/engine/IBounds.js +18 -0
- package/cjs/lib/common/engine/IBounds.js.map +1 -0
- package/cjs/lib/common/engine/IChecker.d.ts +23 -0
- package/cjs/lib/common/engine/IChecker.js +18 -0
- package/cjs/lib/common/engine/IChecker.js.map +1 -0
- package/cjs/lib/common/engine/IEngine.d.ts +39 -0
- package/cjs/lib/common/engine/IEngine.js +18 -0
- package/cjs/lib/common/engine/IEngine.js.map +1 -0
- package/cjs/lib/common/engine/IGuideline.d.ts +53 -0
- package/cjs/lib/common/engine/IGuideline.js +37 -0
- package/cjs/lib/common/engine/IGuideline.js.map +1 -0
- package/cjs/lib/common/engine/IMapper.d.ts +32 -0
- package/cjs/lib/common/engine/IMapper.js +18 -0
- package/cjs/lib/common/engine/IMapper.js.map +1 -0
- package/cjs/lib/common/engine/IReport.d.ts +143 -0
- package/cjs/lib/common/engine/IReport.js +44 -0
- package/cjs/lib/common/engine/IReport.js.map +1 -0
- package/cjs/lib/common/engine/IRule.d.ts +100 -0
- package/cjs/lib/common/engine/IRule.js +87 -0
- package/cjs/lib/common/engine/IRule.js.map +1 -0
- package/cjs/lib/common/engine/IRuleset.d.ts +20 -0
- package/cjs/lib/common/engine/IRuleset.js +18 -0
- package/cjs/lib/common/engine/IRuleset.js.map +1 -0
- package/cjs/lib/common/report/ACReporterCSV.d.ts +28 -0
- package/cjs/lib/common/report/ACReporterCSV.js +75 -0
- package/cjs/lib/common/report/ACReporterCSV.js.map +1 -0
- package/cjs/lib/common/report/ACReporterHTML.d.ts +27 -0
- package/cjs/lib/common/report/ACReporterHTML.js +61 -0
- package/cjs/lib/common/report/ACReporterHTML.js.map +1 -0
- package/cjs/lib/common/report/ACReporterJSON.d.ts +36 -0
- package/cjs/lib/common/report/ACReporterJSON.js +109 -0
- package/cjs/lib/common/report/ACReporterJSON.js.map +1 -0
- package/cjs/lib/common/report/ACReporterMetrics.d.ts +78 -0
- package/cjs/lib/common/report/ACReporterMetrics.js +135 -0
- package/cjs/lib/common/report/ACReporterMetrics.js.map +1 -0
- package/cjs/lib/common/report/ACReporterXLSX.d.ts +38 -0
- package/cjs/lib/common/report/ACReporterXLSX.js +996 -0
- package/cjs/lib/common/report/ACReporterXLSX.js.map +1 -0
- package/cjs/lib/common/report/BaselineManager.d.ts +169 -0
- package/cjs/lib/common/report/BaselineManager.js +382 -0
- package/cjs/lib/common/report/BaselineManager.js.map +1 -0
- package/cjs/lib/common/report/ReporterManager.d.ts +79 -0
- package/cjs/lib/common/report/ReporterManager.js +469 -0
- package/cjs/lib/common/report/ReporterManager.js.map +1 -0
- package/cjs/lib/common/report/genReport.d.ts +1 -0
- package/cjs/lib/common/report/genReport.js +12 -0
- package/cjs/lib/common/report/genReport.js.map +1 -0
- package/cjs/package.json +3 -0
- package/index.js +21 -63
- package/index.js.map +1 -1
- package/lib/ACBrowserManager.js +138 -203
- package/lib/ACBrowserManager.js.map +1 -1
- package/lib/ACEngineManager.js +395 -402
- package/lib/ACEngineManager.js.map +1 -1
- package/lib/ACHelper.js +581 -642
- package/lib/ACHelper.js.map +1 -1
- package/lib/common/api-ext/Fetch.js +58 -78
- package/lib/common/api-ext/Fetch.js.map +1 -1
- package/lib/common/config/ACConfigManager.js +271 -281
- package/lib/common/config/ACConfigManager.js.map +1 -1
- package/lib/common/config/ACConstants.js +38 -4
- package/lib/common/config/ACConstants.js.map +1 -1
- package/lib/common/config/IConfig.d.ts +1 -1
- package/lib/common/report/ACReporterCSV.js +42 -77
- package/lib/common/report/ACReporterCSV.js.map +1 -1
- package/lib/common/report/ACReporterHTML.js +15 -48
- package/lib/common/report/ACReporterHTML.js.map +1 -1
- package/lib/common/report/ACReporterJSON.js +59 -94
- package/lib/common/report/ACReporterJSON.js.map +1 -1
- package/lib/common/report/ACReporterMetrics.js +45 -108
- package/lib/common/report/ACReporterMetrics.js.map +1 -1
- package/lib/common/report/ACReporterXLSX.js +282 -300
- package/lib/common/report/ACReporterXLSX.js.map +1 -1
- package/lib/common/report/BaselineManager.js +82 -56
- package/lib/common/report/BaselineManager.js.map +1 -1
- package/lib/common/report/ReporterManager.js +125 -190
- package/lib/common/report/ReporterManager.js.map +1 -1
- package/lib/common/report/genReport.js +2 -2
- package/mjs/bin/achecker.d.ts +2 -0
- package/mjs/bin/achecker.js +236 -0
- package/mjs/bin/achecker.js.map +1 -0
- package/mjs/index.d.ts +319 -0
- package/mjs/index.js +368 -0
- package/mjs/index.js.map +1 -0
- package/mjs/lib/ACBrowserManager.d.ts +22 -0
- package/mjs/lib/ACBrowserManager.js +121 -0
- package/mjs/lib/ACBrowserManager.js.map +1 -0
- package/mjs/lib/ACEngineManager.d.ts +19 -0
- package/mjs/lib/ACEngineManager.js +397 -0
- package/mjs/lib/ACEngineManager.js.map +1 -0
- package/mjs/lib/ACHelper.d.ts +2 -0
- package/mjs/lib/ACHelper.js +614 -0
- package/mjs/lib/ACHelper.js.map +1 -0
- package/mjs/lib/api/IChecker.d.ts +28 -0
- package/mjs/lib/api/IChecker.js +8 -0
- package/mjs/lib/api/IChecker.js.map +1 -0
- package/mjs/lib/api/IMapper.d.ts +37 -0
- package/mjs/lib/api/IMapper.js +17 -0
- package/mjs/lib/api/IMapper.js.map +1 -0
- package/mjs/lib/common/api-ext/Fetch.d.ts +17 -0
- package/mjs/lib/common/api-ext/Fetch.js +45 -0
- package/mjs/lib/common/api-ext/Fetch.js.map +1 -0
- package/mjs/lib/common/api-ext/IAbstractAPI.d.ts +33 -0
- package/mjs/lib/common/api-ext/IAbstractAPI.js +17 -0
- package/mjs/lib/common/api-ext/IAbstractAPI.js.map +1 -0
- package/mjs/lib/common/config/ACConfigManager.d.ts +13 -0
- package/mjs/lib/common/config/ACConfigManager.js +421 -0
- package/mjs/lib/common/config/ACConfigManager.js.map +1 -0
- package/mjs/lib/common/config/ACConstants.d.ts +17 -0
- package/mjs/lib/common/config/ACConstants.js +75 -0
- package/mjs/lib/common/config/ACConstants.js.map +1 -0
- package/mjs/lib/common/config/IArchive.d.ts +37 -0
- package/mjs/lib/common/config/IArchive.js +17 -0
- package/mjs/lib/common/config/IArchive.js.map +1 -0
- package/mjs/lib/common/config/IConfig.d.ts +152 -0
- package/mjs/lib/common/config/IConfig.js +33 -0
- package/mjs/lib/common/config/IConfig.js.map +1 -0
- package/mjs/lib/common/engine/IBounds.d.ts +21 -0
- package/mjs/lib/common/engine/IBounds.js +17 -0
- package/mjs/lib/common/engine/IBounds.js.map +1 -0
- package/mjs/lib/common/engine/IChecker.d.ts +23 -0
- package/mjs/lib/common/engine/IChecker.js +17 -0
- package/mjs/lib/common/engine/IChecker.js.map +1 -0
- package/mjs/lib/common/engine/IEngine.d.ts +39 -0
- package/mjs/lib/common/engine/IEngine.js +17 -0
- package/mjs/lib/common/engine/IEngine.js.map +1 -0
- package/mjs/lib/common/engine/IGuideline.d.ts +53 -0
- package/mjs/lib/common/engine/IGuideline.js +34 -0
- package/mjs/lib/common/engine/IGuideline.js.map +1 -0
- package/mjs/lib/common/engine/IMapper.d.ts +32 -0
- package/mjs/lib/common/engine/IMapper.js +17 -0
- package/mjs/lib/common/engine/IMapper.js.map +1 -0
- package/mjs/lib/common/engine/IReport.d.ts +143 -0
- package/mjs/lib/common/engine/IReport.js +36 -0
- package/mjs/lib/common/engine/IReport.js.map +1 -0
- package/mjs/lib/common/engine/IRule.d.ts +100 -0
- package/mjs/lib/common/engine/IRule.js +79 -0
- package/mjs/lib/common/engine/IRule.js.map +1 -0
- package/mjs/lib/common/engine/IRuleset.d.ts +20 -0
- package/mjs/lib/common/engine/IRuleset.js +17 -0
- package/mjs/lib/common/engine/IRuleset.js.map +1 -0
- package/mjs/lib/common/report/ACReporterCSV.d.ts +28 -0
- package/mjs/lib/common/report/ACReporterCSV.js +60 -0
- package/mjs/lib/common/report/ACReporterCSV.js.map +1 -0
- package/mjs/lib/common/report/ACReporterHTML.d.ts +27 -0
- package/mjs/lib/common/report/ACReporterHTML.js +46 -0
- package/mjs/lib/common/report/ACReporterHTML.js.map +1 -0
- package/mjs/lib/common/report/ACReporterJSON.d.ts +36 -0
- package/mjs/lib/common/report/ACReporterJSON.js +94 -0
- package/mjs/lib/common/report/ACReporterJSON.js.map +1 -0
- package/mjs/lib/common/report/ACReporterMetrics.d.ts +78 -0
- package/mjs/lib/common/report/ACReporterMetrics.js +122 -0
- package/mjs/lib/common/report/ACReporterMetrics.js.map +1 -0
- package/mjs/lib/common/report/ACReporterXLSX.d.ts +38 -0
- package/mjs/lib/common/report/ACReporterXLSX.js +948 -0
- package/mjs/lib/common/report/ACReporterXLSX.js.map +1 -0
- package/mjs/lib/common/report/BaselineManager.d.ts +169 -0
- package/mjs/lib/common/report/BaselineManager.js +348 -0
- package/mjs/lib/common/report/BaselineManager.js.map +1 -0
- package/mjs/lib/common/report/ReporterManager.d.ts +79 -0
- package/mjs/lib/common/report/ReporterManager.js +469 -0
- package/mjs/lib/common/report/ReporterManager.js.map +1 -0
- package/mjs/lib/common/report/genReport.d.ts +1 -0
- package/mjs/lib/common/report/genReport.js +9 -0
- package/mjs/lib/common/report/genReport.js.map +1 -0
- package/mjs/package.json +3 -0
- package/package.json +10 -4
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
export interface IArchive {
|
|
17
|
+
id: "latest" | "preview" | "versioned" | string;
|
|
18
|
+
name: string;
|
|
19
|
+
path: string;
|
|
20
|
+
policies: Array<{
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
description: string;
|
|
24
|
+
}>;
|
|
25
|
+
rulesets: {
|
|
26
|
+
[key: string]: Array<{
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
description: string;
|
|
30
|
+
}>;
|
|
31
|
+
};
|
|
32
|
+
version: string;
|
|
33
|
+
latest?: boolean;
|
|
34
|
+
sunset?: boolean;
|
|
35
|
+
helpPath: string;
|
|
36
|
+
enginePath: string;
|
|
37
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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=IArchive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IArchive.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/config/IArchive.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;+EAc+E"}
|
|
@@ -0,0 +1,152 @@
|
|
|
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 { IArchive } from "./IArchive.js";
|
|
17
|
+
export declare enum eAssertResult {
|
|
18
|
+
ERROR = -1,
|
|
19
|
+
PASS = 0,
|
|
20
|
+
BASELINE_MISMATCH = 1,
|
|
21
|
+
FAIL = 2
|
|
22
|
+
}
|
|
23
|
+
export declare enum eRuleLevel {
|
|
24
|
+
violation = "violation",
|
|
25
|
+
potentialviolation = "potentialviolation",
|
|
26
|
+
recommendation = "recommendation",
|
|
27
|
+
potentialrecommendation = "potentialrecommendation",
|
|
28
|
+
manual = "manual",
|
|
29
|
+
pass = "pass",
|
|
30
|
+
ignored = "ignored"
|
|
31
|
+
}
|
|
32
|
+
export interface IConfig {
|
|
33
|
+
/**
|
|
34
|
+
* (optional) Specify the rule archive
|
|
35
|
+
*
|
|
36
|
+
* Run `npx achecker archives` for a list of valid ruleArchive ids and policy ids
|
|
37
|
+
* Default: "latest"
|
|
38
|
+
*/
|
|
39
|
+
ruleArchive?: "latest" | "preview" | "versioned" | string;
|
|
40
|
+
/**
|
|
41
|
+
* (optional) Specify one or many policies to scan.
|
|
42
|
+
*
|
|
43
|
+
* Run `npx achecker archives` for a list of valid ruleArchive ids and policy ids
|
|
44
|
+
* Default: ["IBM_Accessibility"]
|
|
45
|
+
*/
|
|
46
|
+
policies?: Array<"IBM_Accessibility" | string>;
|
|
47
|
+
/**
|
|
48
|
+
* (optional) Specify one or many violation levels on which to fail the test
|
|
49
|
+
*
|
|
50
|
+
* i.e. If specified violation then the testcase will only fail if
|
|
51
|
+
* a violation is found during the scan.
|
|
52
|
+
* Default: ["violation", "review"]
|
|
53
|
+
*/
|
|
54
|
+
failLevels?: eRuleLevel[];
|
|
55
|
+
/**
|
|
56
|
+
* (optional) Specify one or many violation levels which should be reported
|
|
57
|
+
*
|
|
58
|
+
* i.e. If specified violation then in the report it would only contain
|
|
59
|
+
* results which are level of violation.
|
|
60
|
+
* Default: ["violation", "review"]
|
|
61
|
+
*/
|
|
62
|
+
reportLevels?: eRuleLevel[];
|
|
63
|
+
/**
|
|
64
|
+
* (optional) In which fornats should the results be output
|
|
65
|
+
* Default: ["json"]
|
|
66
|
+
*/
|
|
67
|
+
outputFormat?: Array<"json" | "html" | "csv" | "disable" | "xlsx">;
|
|
68
|
+
/**
|
|
69
|
+
* (optional) Specify any labels that you would like associated to your scan
|
|
70
|
+
* Default: []
|
|
71
|
+
*/
|
|
72
|
+
label?: string[];
|
|
73
|
+
/**
|
|
74
|
+
* (optional) Where the scan results should be saved.
|
|
75
|
+
* Default: "results"
|
|
76
|
+
*/
|
|
77
|
+
outputFolder?: string;
|
|
78
|
+
/**
|
|
79
|
+
* (optional) Should the timestamp be included in the filename of the reports?
|
|
80
|
+
* Default: true
|
|
81
|
+
*/
|
|
82
|
+
outputFilenameTimestamp?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* (optional) Where the baseline results should be loaded from
|
|
85
|
+
* Default: "baselines"
|
|
86
|
+
*/
|
|
87
|
+
baselineFolder?: string;
|
|
88
|
+
/**
|
|
89
|
+
* (optional) Where the tool can read/write cached files (ace-node.js / archive.json)
|
|
90
|
+
* Default: `${os.tmpdir()}/accessibility-checker/`
|
|
91
|
+
*/
|
|
92
|
+
cacheFolder?: string;
|
|
93
|
+
/**
|
|
94
|
+
* (optional) For tools that scan files, which extensions should we include
|
|
95
|
+
* Default: ["html", "htm", "svg"]
|
|
96
|
+
*/
|
|
97
|
+
extensions?: string[];
|
|
98
|
+
}
|
|
99
|
+
export type IConfigInternal = IConfig & {
|
|
100
|
+
/**
|
|
101
|
+
* Run in debug mode
|
|
102
|
+
*/
|
|
103
|
+
DEBUG?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Spot to store parsed archive file
|
|
106
|
+
*/
|
|
107
|
+
ruleArchiveSet?: IArchive[];
|
|
108
|
+
/**
|
|
109
|
+
* Label to expose to reports
|
|
110
|
+
*/
|
|
111
|
+
ruleArchiveLabel?: string;
|
|
112
|
+
/**
|
|
113
|
+
* (optional) Rule server to pull the rules from and to use for help
|
|
114
|
+
* Default: "https://able.ibm.com/rules"
|
|
115
|
+
*/
|
|
116
|
+
ruleServer?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Path to the rule pack
|
|
119
|
+
*/
|
|
120
|
+
rulePack?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Path within the archive
|
|
123
|
+
*/
|
|
124
|
+
ruleArchivePath?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Version number of the selected archive
|
|
127
|
+
*/
|
|
128
|
+
ruleArchiveVersion?: string;
|
|
129
|
+
/**
|
|
130
|
+
* (optional) If the tool allows, should we capture screenshots
|
|
131
|
+
*/
|
|
132
|
+
captureScreenshots?: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* (optional) If the tool allows, should we run headless
|
|
135
|
+
*/
|
|
136
|
+
headless?: "shell" | boolean;
|
|
137
|
+
/**
|
|
138
|
+
* (optional) If the tool allows, set the maximum number of tabs to open
|
|
139
|
+
*/
|
|
140
|
+
maxTabs?: number;
|
|
141
|
+
/**
|
|
142
|
+
* Configuration filenames to try loading
|
|
143
|
+
*/
|
|
144
|
+
configFiles?: string[];
|
|
145
|
+
toolID?: string;
|
|
146
|
+
toolName?: string;
|
|
147
|
+
toolVersion?: string;
|
|
148
|
+
scanID?: string;
|
|
149
|
+
ignoreHTTPSErrors: boolean;
|
|
150
|
+
perfMetrics: boolean;
|
|
151
|
+
engineMode: "DEFAULT" | "REMOTE" | "INJECT";
|
|
152
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
exports.eRuleLevel = exports.eAssertResult = void 0;
|
|
19
|
+
var eAssertResult;
|
|
20
|
+
(function (eAssertResult) {
|
|
21
|
+
eAssertResult[eAssertResult["ERROR"] = -1] = "ERROR";
|
|
22
|
+
eAssertResult[eAssertResult["PASS"] = 0] = "PASS";
|
|
23
|
+
eAssertResult[eAssertResult["BASELINE_MISMATCH"] = 1] = "BASELINE_MISMATCH";
|
|
24
|
+
eAssertResult[eAssertResult["FAIL"] = 2] = "FAIL";
|
|
25
|
+
})(eAssertResult || (exports.eAssertResult = eAssertResult = {}));
|
|
26
|
+
var eRuleLevel;
|
|
27
|
+
(function (eRuleLevel) {
|
|
28
|
+
eRuleLevel["violation"] = "violation";
|
|
29
|
+
eRuleLevel["potentialviolation"] = "potentialviolation";
|
|
30
|
+
eRuleLevel["recommendation"] = "recommendation";
|
|
31
|
+
eRuleLevel["potentialrecommendation"] = "potentialrecommendation";
|
|
32
|
+
eRuleLevel["manual"] = "manual";
|
|
33
|
+
eRuleLevel["pass"] = "pass";
|
|
34
|
+
eRuleLevel["ignored"] = "ignored";
|
|
35
|
+
})(eRuleLevel || (exports.eRuleLevel = eRuleLevel = {}));
|
|
36
|
+
//# sourceMappingURL=IConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IConfig.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/config/IConfig.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;+EAc+E;;;AAI/E,IAAY,aAKX;AALD,WAAY,aAAa;IACrB,oDAAU,CAAA;IACV,iDAAQ,CAAA;IACR,2EAAqB,CAAA;IACrB,iDAAQ,CAAA;AACZ,CAAC,EALW,aAAa,6BAAb,aAAa,QAKxB;AAGD,IAAY,UAQX;AARD,WAAY,UAAU;IAClB,qCAAuB,CAAA;IACvB,uDAAyC,CAAA;IACzC,+CAAiC,CAAA;IACjC,iEAAmD,CAAA;IACnD,+BAAiB,CAAA;IACjB,2BAAa,CAAA;IACb,iCAAmB,CAAA;AACvB,CAAC,EARW,UAAU,0BAAV,UAAU,QAQrB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
export type Bounds = {
|
|
17
|
+
left: number;
|
|
18
|
+
top: number;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
//# sourceMappingURL=IBounds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IBounds.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/engine/IBounds.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;+EAc+E"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { Guideline } from "./IGuideline.js";
|
|
17
|
+
import { IEngineReport } from "./IReport.js";
|
|
18
|
+
export interface IChecker {
|
|
19
|
+
addGuideline(guideline: Guideline): any;
|
|
20
|
+
getGuidelines(): Guideline[];
|
|
21
|
+
getGuidelineIds(): string[];
|
|
22
|
+
check(node: Node | Document, guidelineIds?: string | string[]): Promise<IEngineReport>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
//# sourceMappingURL=IChecker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IChecker.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/engine/IChecker.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;+EAc+E"}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 { Rule } from "./IRule.js";
|
|
17
|
+
export interface IEngine {
|
|
18
|
+
/**
|
|
19
|
+
* Perform a scan on a document or subtree
|
|
20
|
+
* @param rulesetIds Array of ruleset ids of rulesets to use for this scan
|
|
21
|
+
* @param root Document or subtree to scan
|
|
22
|
+
*/
|
|
23
|
+
run(root: Document | Node, options?: {}): Promise<Report>;
|
|
24
|
+
enableRules(ruleIds: string[]): any;
|
|
25
|
+
getRule(ruleId: string): Rule;
|
|
26
|
+
getRulesIds(): string[];
|
|
27
|
+
getMessage(ruleId: string, ruleIdx: number | string, msgArgs?: string[]): string;
|
|
28
|
+
getHelp(ruleId: string, ruleIdx: number | string): string;
|
|
29
|
+
addRules(rule: Rule[]): any;
|
|
30
|
+
addRule(rule: Rule): any;
|
|
31
|
+
addNlsMap(map: NlsMap): any;
|
|
32
|
+
addHelpMap(map: NlsMap): any;
|
|
33
|
+
}
|
|
34
|
+
export type NlsMap = {
|
|
35
|
+
[key: string]: string[];
|
|
36
|
+
};
|
|
37
|
+
export type HelpMap = {
|
|
38
|
+
[key: string]: string[];
|
|
39
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
//# sourceMappingURL=IEngine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IEngine.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/engine/IEngine.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;+EAc+E"}
|
|
@@ -0,0 +1,53 @@
|
|
|
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 { eRulePolicy } from "./IRule.js";
|
|
17
|
+
export declare enum eToolkitLevel {
|
|
18
|
+
LEVEL_ONE = "1",
|
|
19
|
+
LEVEL_TWO = "2",
|
|
20
|
+
LEVEL_THREE = "3",
|
|
21
|
+
LEVEL_FOUR = "4"
|
|
22
|
+
}
|
|
23
|
+
export declare enum eGuidelineCategory {
|
|
24
|
+
ACCESSIBILITY = "Accessibility",
|
|
25
|
+
DESIGN = "Design",
|
|
26
|
+
OTHER = "Other"
|
|
27
|
+
}
|
|
28
|
+
export declare enum eGuidelineType {
|
|
29
|
+
DEFAULT = "default",
|
|
30
|
+
EXTENSION = "extension"
|
|
31
|
+
}
|
|
32
|
+
export type Checkpoint = {
|
|
33
|
+
num: string;
|
|
34
|
+
scId?: string;
|
|
35
|
+
name: string;
|
|
36
|
+
wcagLevel: string;
|
|
37
|
+
summary: string;
|
|
38
|
+
rules?: Array<{
|
|
39
|
+
id: string;
|
|
40
|
+
reasonCodes?: string[];
|
|
41
|
+
level: eRulePolicy;
|
|
42
|
+
toolkitLevel: eToolkitLevel;
|
|
43
|
+
enabled?: boolean;
|
|
44
|
+
}>;
|
|
45
|
+
};
|
|
46
|
+
export type Guideline = {
|
|
47
|
+
id: string;
|
|
48
|
+
name: string;
|
|
49
|
+
category: eGuidelineCategory;
|
|
50
|
+
description: string;
|
|
51
|
+
type?: eGuidelineType;
|
|
52
|
+
checkpoints: Array<Checkpoint>;
|
|
53
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
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.eGuidelineType = exports.eGuidelineCategory = exports.eToolkitLevel = void 0;
|
|
19
|
+
var eToolkitLevel;
|
|
20
|
+
(function (eToolkitLevel) {
|
|
21
|
+
eToolkitLevel["LEVEL_ONE"] = "1";
|
|
22
|
+
eToolkitLevel["LEVEL_TWO"] = "2";
|
|
23
|
+
eToolkitLevel["LEVEL_THREE"] = "3";
|
|
24
|
+
eToolkitLevel["LEVEL_FOUR"] = "4";
|
|
25
|
+
})(eToolkitLevel || (exports.eToolkitLevel = eToolkitLevel = {}));
|
|
26
|
+
var eGuidelineCategory;
|
|
27
|
+
(function (eGuidelineCategory) {
|
|
28
|
+
eGuidelineCategory["ACCESSIBILITY"] = "Accessibility";
|
|
29
|
+
eGuidelineCategory["DESIGN"] = "Design";
|
|
30
|
+
eGuidelineCategory["OTHER"] = "Other";
|
|
31
|
+
})(eGuidelineCategory || (exports.eGuidelineCategory = eGuidelineCategory = {}));
|
|
32
|
+
var eGuidelineType;
|
|
33
|
+
(function (eGuidelineType) {
|
|
34
|
+
eGuidelineType["DEFAULT"] = "default";
|
|
35
|
+
eGuidelineType["EXTENSION"] = "extension";
|
|
36
|
+
})(eGuidelineType || (exports.eGuidelineType = eGuidelineType = {}));
|
|
37
|
+
//# sourceMappingURL=IGuideline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IGuideline.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/engine/IGuideline.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;+EAc+E;;;AAI/E,IAAY,aAKX;AALD,WAAY,aAAa;IACrB,gCAAe,CAAA;IACf,gCAAe,CAAA;IACf,kCAAiB,CAAA;IACjB,iCAAgB,CAAA;AACpB,CAAC,EALW,aAAa,6BAAb,aAAa,QAKxB;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,qDAA+B,CAAA;IAC/B,uCAAiB,CAAA;IACjB,qCAAe,CAAA;AACnB,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;AAC3B,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { Bounds } from "./IBounds.js";
|
|
17
|
+
export type IMapResult = {
|
|
18
|
+
node: Node;
|
|
19
|
+
namespace: string;
|
|
20
|
+
role: string;
|
|
21
|
+
rolePath: string;
|
|
22
|
+
attributes: {
|
|
23
|
+
[key: string]: string;
|
|
24
|
+
};
|
|
25
|
+
bounds?: Bounds;
|
|
26
|
+
};
|
|
27
|
+
export interface IMapper {
|
|
28
|
+
reset(node: Node): void;
|
|
29
|
+
openScope(node: Node): IMapResult[];
|
|
30
|
+
closeScope(node: Node): IMapResult[];
|
|
31
|
+
getNamespace(): string;
|
|
32
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
//# sourceMappingURL=IMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IMapper.js","sourceRoot":"","sources":["../../../../../src-ts/lib/common/engine/IMapper.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;+EAc+E"}
|